/* Replicord GRC - module styles on top of tokens.css + panel.css (same visual language:
   warm canvas, near-black ink, chartreuse accent, Inter Tight + IBM Plex Mono). */

:root {
  --ok: #12704a; --ok-bg: #e6f4ea;
  --warn: #92400e; --warn-bg: #fef3c7;
  --err: #b42318; --err-bg: #fee4e2;
  --run: #9a3412; --run-bg: #fff7ed;
  --ins-bg: #dff3e4; --ins-ink: #0f5132;
  --del-bg: #fde2e1; --del-ink: #7a1d14;
  --binding: #17120e;
}

.content { max-width: 1360px; }
.nav-sub { padding-left: 18px; }
.foot-module { display: block; margin-bottom: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.sidebar-foot a { display: block; }

/* ---------- top bar ---------- */
.top-search { position: relative; flex: 1 1 420px; max-width: 560px; display: flex; align-items: center; }
.top-search .icon { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.top-search input {
  width: 100%; height: 40px; padding: 0 14px 0 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font: 400 14px/1 var(--font); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.top-search input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(23,18,14,.06); }
.mode-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.mode-pill .icon { width: 15px; height: 15px; }
.status-idle .status-dot { background: var(--ink-3); }

/* ---------- tags ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 6px; padding: 2px 7px; white-space: nowrap; background: var(--bg-alt); color: var(--ink-2); line-height: 1.5;
}
.tag.t-ok { background: var(--ok-bg); color: var(--ok); }
.tag.t-warning { background: var(--warn-bg); color: var(--warn); }
.tag.t-error { background: var(--err-bg); color: var(--err); }
.tag.t-running { background: var(--run-bg); color: var(--run); }
.tag.t-binding { background: var(--ink); color: var(--accent); }
.tag.t-accent { background: var(--accent); color: var(--accent-ink); }
.tag.t-outline { background: transparent; border: 1px solid var(--line); }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.cat-badge {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; flex: 0 0 auto;
  font: 600 11.5px/1 var(--mono); background: var(--bg-alt); color: var(--ink-2);
}
.cat-badge.cat-A, .cat-badge.cat-B { background: var(--ink); color: var(--accent); }

/* ---------- dashboard ---------- */
.section-head { display: flex; align-items: baseline; gap: 12px; margin: 30px 0 12px; }
.section-head:first-child { margin-top: 0; }
.section-head .letter { font: 500 11px/1 var(--mono); color: var(--accent-ink); background: var(--accent); border-radius: 5px; padding: 3px 6px; }
.section-head h2 { font-size: 19px; font-weight: 500; }
.section-head small { color: var(--ink-3); font-size: 13px; }
.kpi-grid.k6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi-grid.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi a.kpi-cover { color: inherit; }
.kpi .kpi-value.small { font-size: 24px; }
.kpi.kpi-alert { box-shadow: inset 3px 0 0 #f04438; }
.kpi.kpi-good { box-shadow: inset 3px 0 0 var(--accent); }
.stat-list { list-style: none; margin: 0; padding: 0; }
.stat-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.stat-list li:first-child { border-top: 0; padding-top: 0; }
.stat-list .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-list .num { font-family: var(--mono); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.event-date { font-family: var(--mono); font-size: 12px; color: var(--ink-2); white-space: nowrap; min-width: 82px; flex: 0 0 auto; }
.ask-box {
  background: var(--dark); color: var(--on-dark); border-radius: var(--radius); padding: 26px 28px; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 26px; align-items: center;
}
.ask-box h2 { font-size: 24px; letter-spacing: -0.03em; }
.ask-box p { color: var(--on-dark-2); margin-top: 8px; font-size: 14px; }
.ask-form { display: flex; gap: 8px; }
.ask-form input {
  flex: 1; min-width: 0; height: 48px; border-radius: 999px; border: 1px solid var(--dark-line); background: var(--dark-2); color: var(--on-dark);
  padding: 0 18px; font: 400 15px/1 var(--font); outline: none;
}
.ask-form input:focus { border-color: var(--accent); }
.ask-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ask-chip {
  border: 1px solid var(--dark-line); background: transparent; color: var(--on-dark-2); border-radius: 999px; padding: 6px 12px;
  font: 400 13px/1.2 var(--font); cursor: pointer; text-align: left;
}
.ask-chip:hover { border-color: var(--on-dark); color: var(--on-dark); }
.area-bars { display: grid; gap: 8px; }
.area-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) 70px; gap: 12px; align-items: center; font-size: 13.5px; }
.area-track { height: 8px; background: var(--bg-alt); border-radius: 99px; overflow: hidden; display: flex; }
.area-fill { height: 100%; background: var(--ink); }
.area-fill.soft { background: #b7b0a7; }

/* ---------- coverage ---------- */
.cov-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 6px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.cov-row:first-child { border-top: 0; padding-top: 0; }
.cov-title { font-size: 14px; font-weight: 500; }
.cov-sub { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-3); }
.cov-num { text-align: right; font-family: var(--mono); font-size: 13px; }
.meter { grid-column: 1 / -1; height: 8px; background: var(--bg-alt); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--ink); border-radius: 99px; }
.meter.is-full > span { background: var(--accent); box-shadow: inset 0 0 0 1px rgba(23,18,14,.25); }
.meter.is-low > span { background: #f04438; }
.dim-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.dim { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.dim .kpi-label { display: block; margin-bottom: 10px; }
.dim-value { font-size: 26px; font-weight: 500; letter-spacing: -0.04em; }
.dim-of { font-size: 14px; color: var(--ink-3); }
.dim p { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.alert-banner {
  display: flex; gap: 12px; align-items: flex-start; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px;
  background: var(--err-bg); color: var(--err); border: 1px solid #fbcdc9; font-size: 14px;
}
.alert-banner.ok { background: var(--ok-bg); color: var(--ok); border-color: #c6e7d0; }
.alert-banner .icon { margin-top: 2px; }
.alert-banner strong { display: block; margin-bottom: 2px; }

/* ---------- documents list ---------- */
.filter-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.filter-bar .select { width: 100%; max-width: none; height: 40px; font-size: 13.5px; border-radius: 10px; }
.filter-bar input[type=date], .filter-bar input[type=search] {
  height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); padding: 0 10px; font: 400 13.5px var(--font); color: var(--ink); width: 100%;
}
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 10px; flex-wrap: wrap; }
.doc-table td { vertical-align: top; }
.doc-table td.wrap { white-space: normal; min-width: 320px; }
.doc-table .doc-title { font-weight: 500; color: var(--ink); line-height: 1.35; }
.doc-table .doc-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.doc-table .doc-num { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.doc-table .doc-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; white-space: normal; }
.doc-table th button { all: unset; cursor: pointer; }
.doc-table th button:hover { color: var(--ink); }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 14px; font-size: 13.5px; color: var(--ink-2); }

/* ---------- document view ---------- */
.doc-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 14px; }
.doc-head h1 { font-size: 26px; line-height: 1.2; letter-spacing: -0.03em; margin-top: 10px; }
.doc-head .doc-en { color: var(--ink-3); font-size: 14px; margin-top: 6px; }
.doc-dates { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.doc-date { border-top: 1px solid var(--line); padding-top: 10px; }
.doc-date span { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.doc-date strong { display: block; font-weight: 500; font-size: 16px; margin-top: 4px; }
.doc-date small { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.doc-actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
/* Półka: a shelved document says so at the top of its card; the form asks for a reason. */
.shelf-banner { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: var(--bg-alt); border: 1px solid var(--line); font-size: 14px; }
.shelf-banner > .icon { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--ink-2); }
.shelf-sub { margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.shelf-form { margin-top: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); max-width: 760px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tab {
  all: unset; cursor: pointer; padding: 10px 14px; font-size: 14.5px; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.tab .chip-count { margin-left: 4px; }
.reader { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.toc { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; font-size: 13px; scrollbar-width: thin; }
.toc a { display: block; padding: 4px 8px; border-radius: 7px; color: var(--ink-2); line-height: 1.3; }
.toc a:hover { background: var(--bg); color: var(--ink); }
.toc .toc-div { font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding: 10px 8px 4px; }
.toc .toc-div:first-child { padding-top: 2px; }
.reader-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 13.5px; }
.reader-tools .select, .reader-tools input[type=date] { height: 38px; font-size: 13.5px; border-radius: 10px; }
.reader-tools input[type=date] { border: 1.5px solid var(--line); background: var(--surface); padding: 0 10px; font-family: var(--font); color: var(--ink); }
.provisions { display: flex; flex-direction: column; gap: 10px; }
.prov-division { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); padding: 18px 2px 2px; }
.prov-division strong { display: block; font-family: var(--font); text-transform: none; letter-spacing: -0.01em; font-size: 16px; font-weight: 500; color: var(--ink); margin-top: 4px; }
.provision { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; scroll-margin-top: 90px; }
.provision.is-target { box-shadow: 0 0 0 2px var(--ink); }
.provision.recital { background: transparent; }
.prov-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.prov-label { font-weight: 600; font-size: 15px; }
.prov-heading { color: var(--ink-2); font-size: 14.5px; }
.prov-tools { margin-left: auto; display: flex; gap: 6px; }
.prov-text { white-space: pre-wrap; font-size: 14.5px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.prov-text mark, .quote-mark { background: var(--accent); color: var(--accent-ink); padding: 0 2px; border-radius: 3px; }
.unit-highlight { background: #fbf7c4; border-radius: 4px; box-shadow: 0 0 0 3px #fbf7c4; }
.mini-btn {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); padding: 3px 8px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); white-space: nowrap;
}
.mini-btn:hover { border-color: var(--ink); color: var(--ink); }
.mini-btn .icon { width: 13px; height: 13px; }

/* ---------- versions and diff ---------- */
.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.diff-col { padding: 12px 14px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); }
.diff-col + .diff-col { border-left: 1px solid var(--line); }
.diff-col-head { font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; white-space: normal; }
del.d { background: var(--del-bg); color: var(--del-ink); text-decoration: line-through; text-decoration-color: rgba(122,29,20,.5); border-radius: 3px; }
ins.d { background: var(--ins-bg); color: var(--ins-ink); text-decoration: none; border-radius: 3px; }
.diff-item { padding: 14px 0; border-top: 1px solid var(--line); }
.diff-item:first-child { border-top: 0; padding-top: 0; }
.diff-item-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.version-table td { white-space: normal; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 92px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-item { display: grid; grid-template-columns: 82px 20px minmax(0, 1fr); gap: 0 0; padding: 8px 0; align-items: start; }
.tl-when { font-family: var(--mono); font-size: 12px; color: var(--ink-2); padding-top: 2px; }
.tl-when small { display: block; color: var(--ink-3); font-size: 10.5px; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); margin: 5px 0 0 6px; position: relative; z-index: 1; }
.tl-item.technical .tl-dot { border-color: var(--ink-3); }
.tl-item.legal .tl-dot { background: var(--accent); }
.tl-body { min-width: 0; }
.tl-title { font-size: 14.5px; font-weight: 500; }
.tl-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tl-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tl-desc { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; overflow-wrap: anywhere; }
.tl-month { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 18px 0 6px 112px; }
/* The shared design system (panel.css) lays out its own timeline with named grid areas; here
   .tl-body has no "body" area to go to, which opened a stray column and pushed events to the
   middle. Every part of an event stays in the three columns above, compactly. */
.timeline .tl-item { padding: 6px 0; border-top: 0; }
.timeline .tl-body { grid-area: auto; display: block; padding-top: 0; }
.timeline .tl-when { line-height: 1.35; }
.timeline .tl-title {
  font-size: 14px; line-height: 1.4; letter-spacing: -0.01em; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.timeline .tl-title .tag { margin-right: 6px; vertical-align: 1px; }
.timeline .tl-meta { margin-top: 2px; gap: 2px 10px; font-size: 12.5px; }
.timeline .tl-what { color: var(--ink-2); }
.timeline .tl-meta .mini-btn { padding-top: 0; padding-bottom: 0; }
.timeline .tl-month { padding: 12px 0 4px 102px; }
.timeline .tl-month:first-child { padding-top: 0; }

/* ---------- relations ---------- */
.rel-group { margin-bottom: 18px; }
.rel-group h3 { font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.rel-list { list-style: none; margin: 0; padding: 0; }
.rel-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rel-list li:first-child { border-top: 0; }
.rel-list .grow { flex: 1; min-width: 0; }
.rel-list .rel-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* ---------- chat ---------- */
.chat-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.chat-sessions { position: sticky; top: 80px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; max-height: calc(100vh - 100px); overflow-y: auto; }
.chat-sessions a { display: block; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; color: var(--ink-2); line-height: 1.3; }
.chat-sessions a:hover { background: var(--bg); color: var(--ink); }
.chat-sessions a.is-active { background: var(--bg); color: var(--ink); font-weight: 500; }
.chat-sessions small { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.chat-sessions-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 4px; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; color: var(--ink-3); }
.chat-sessions-head .mini-btn { text-transform: none; font-family: inherit; }
.chat-session { display: flex; align-items: flex-start; gap: 2px; }
.chat-session > a { flex: 1; min-width: 0; }
.chat-session-del { flex-shrink: 0; margin-top: 6px; border: 0; background: none; color: var(--ink-3); border-radius: 7px; padding: 4px; cursor: pointer; font-size: 11.5px; }
.chat-session-del:hover, .chat-session-del.is-armed { color: var(--ink); background: var(--bg); }
.chat-session-del svg { width: 14px; height: 14px; display: block; }
.chat-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.chat-thread { display: flex; flex-direction: column; gap: 14px; }
.bubble-user { align-self: flex-end; max-width: 78%; background: var(--ink); color: var(--bg); border-radius: 16px 16px 4px 16px; padding: 11px 16px; font-size: 15px; white-space: pre-wrap; }
.bubble-user small { display: block; color: var(--on-dark-2); font-size: 11.5px; margin-top: 4px; }
.answer { background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 18px 20px; }
.answer-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; font-size: 12.5px; color: var(--ink-3); }
.answer-text { font-size: 15px; line-height: 1.6; }
.answer-text p { margin: 0 0 10px; }
.answer-text p:last-child { margin-bottom: 0; }
.answer-text ol, .answer-text ul { margin: 0 0 10px; padding-left: 22px; }
.answer-text li { margin: 3px 0; }
.answer-text .md-h { font-weight: 600; margin-top: 12px; }
.cite-ref {
  all: unset; cursor: pointer; display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 3px; margin-left: 2px;
  border-radius: 5px; background: var(--accent); color: var(--accent-ink); font: 600 10.5px/1 var(--mono); position: relative; top: -2px;
}
.cite-ref:hover { background: var(--ink); color: var(--accent); }
.answer-warn { margin-top: 12px; font-size: 13px; color: var(--warn); background: var(--warn-bg); border-radius: 10px; padding: 8px 12px; }
.answer-limits { margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.answer-limits ul { margin: 4px 0 0; padding-left: 18px; }
.citations { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.citations-head { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.citation { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); transition: box-shadow .3s; }
.citation.is-flash { box-shadow: 0 0 0 2px var(--ink); }
.citation-top { display: flex; gap: 8px; align-items: flex-start; }
.citation-num { flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--ink); color: var(--accent); font: 600 11px/1 var(--mono); }
.citation-label { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; line-height: 1.35; }
.citation-label small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.citation-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.citation-quote { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; border-left: 2px solid var(--accent); padding-left: 10px; }
.citation-quote[hidden] { display: none; }
.stages { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-2); padding: 14px 18px; border: 1px dashed var(--line); border-radius: 14px; }
.stage { display: flex; gap: 8px; align-items: center; }
.stage .icon { width: 15px; height: 15px; }
.stage.is-done { color: var(--ink); }
.stage.is-done .icon { color: var(--ink); background: var(--accent); border-radius: 50%; padding: 1px; }
.chat-composer { position: sticky; bottom: 0; background: linear-gradient(to top, var(--bg) 80%, rgba(244,242,239,0)); padding: 14px 0 8px; }
.composer-box { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px; box-shadow: 0 8px 24px rgba(23,18,14,.06); }
.composer-box textarea {
  width: 100%; border: 0; outline: none; resize: none; font: 400 15px/1.5 var(--font); color: var(--ink); background: transparent; padding: 6px 8px; min-height: 48px; max-height: 200px;
}
.composer-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.composer-row .grow { flex: 1; }
.composer-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.composer-row input[type=date] { height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); padding: 0 6px; font: 400 13px var(--font); color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--bg); }
.seg button { all: unset; cursor: pointer; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; color: var(--ink-2); }
.seg button.is-active { background: var(--ink); color: var(--bg); }
.context-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 3px 4px 3px 10px; }
.context-chip button { all: unset; cursor: pointer; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; }
.context-chip button:hover { background: rgba(0,0,0,.1); }
.disclaimer { font-size: 12px; color: var(--ink-3); margin-top: 6px; text-align: center; }
.plan-details { margin-top: 12px; font-size: 13px; }
.plan-details summary { cursor: pointer; color: var(--ink-2); }
.plan-details ol { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); }
.chat-empty { text-align: left; padding: 30px 0 10px; }
.chat-empty h1 { font-size: 34px; }
.chat-empty .ask-chips { margin-top: 18px; }
.chat-empty .ask-chip { color: var(--ink-2); border-color: var(--line); background: var(--surface); }
.chat-empty .ask-chip:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- monitoring ---------- */
.steps-log { list-style: none; margin: 0; padding: 0; font-size: 13px; max-height: 420px; overflow-y: auto; }
.steps-log li { display: grid; grid-template-columns: 70px 80px minmax(0, 1fr); gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); align-items: start; }
.steps-log li:first-child { border-top: 0; }
.steps-log .s-time { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.steps-log .s-msg { overflow-wrap: anywhere; }
.steps-log .s-error { color: var(--err); }
.steps-log .s-warn { color: var(--warn); }
.progress { height: 6px; background: var(--bg-alt); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; background: var(--ink); transition: width .4s; }
.review-item { border-top: 1px solid var(--line); padding: 14px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
.review-item:first-child { border-top: 0; padding-top: 0; }
.review-item h3 { font-size: 15px; font-weight: 500; }
.review-reason { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.review-proposal { font-size: 13px; margin-top: 6px; background: var(--bg); border-radius: 10px; padding: 8px 10px; overflow-wrap: anywhere; }
.review-decisions { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.review-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
/* A long act title wraps inside the task (the shared .card-link does not wrap), and the decision
   buttons sit at the top right of every task - the same place whatever its length (the shared
   panel.css pushes them to the bottom of the column). */
.review-item .card-link { white-space: normal; overflow-wrap: anywhere; }
.review-item > .review-actions { justify-content: flex-start; align-self: start; margin-top: 0; }
.review-actions input { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font: 400 13px var(--font); background: var(--bg); }
.gap-row td { white-space: normal; }
.source-row td { white-space: normal; vertical-align: top; }
.source-name { font-weight: 500; }
.source-url { font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.btn-xs { height: 30px; padding: 0 12px; font-size: 13px; }
.btn .icon { width: 16px; height: 16px; }

.login-mode .sidebar, .login-mode .topbar { display: none; }
.login-mode .app { grid-template-columns: 1fr; }
.login-card { max-width: 420px; margin: 12vh auto 0; }
.login-back { margin-top: 18px; font-size: 13.5px; color: var(--ink-2); }
.login-back a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Public home page (D-038): the visitor's "/" - no panel chrome, full-width sections. */
.public-mode .sidebar, .public-mode .topbar { display: none; }
.public-mode .app { grid-template-columns: 1fr; }
.public-mode .content { padding: 0; max-width: none; }
.public-top { display: flex; align-items: center; gap: 10px; padding-top: 22px; padding-bottom: 22px; }
.public-spacer { flex: 1; }
.public-hero { padding-top: 9vh; padding-bottom: 72px; }
.public-home .public-hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.04; letter-spacing: -0.045em; max-width: 900px; }
.public-lead { font-size: 19px; line-height: 1.5; color: var(--ink-2); margin-top: 22px; max-width: 760px; }
.public-actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.public-section { padding-top: 56px; padding-bottom: 56px; }
.public-section h2, .public-band h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.12; }
.public-sub { color: var(--ink-2); margin-top: 8px; }
.public-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.public-card { display: flex; flex-direction: column; gap: 10px; }
.public-card h3 { font-size: 19px; }
.public-card p { font-size: 15px; color: var(--ink-2); }
.public-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.public-home .badge { white-space: nowrap; flex-shrink: 0; }
.public-rows { list-style: none; margin: 28px 0 0; padding: 0; border-bottom: 1px solid var(--line); }
.public-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 12px 48px; padding: 28px 0; border-top: 1px solid var(--line); }
.public-row-head h3 { font-size: 22px; line-height: 1.2; margin-top: 6px; }
.public-row-head h3 .badge { vertical-align: 4px; margin-left: 6px; }
.public-num { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--ink-3); }
.public-row-lead { font-weight: 500; margin-top: 8px; }
.public-row-body p { font-size: 16px; color: var(--ink-2); }
.public-row-body p + p { margin-top: 12px; }
.public-row-body .public-chain { font-family: var(--mono); font-size: 13.5px; color: var(--ink); }
.public-row-body .public-status { font-size: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.public-status strong { color: var(--ink); font-weight: 500; }
.public-band { background: var(--dark); color: var(--on-dark); padding: 64px 0; margin: 24px 0; }
.public-band-sub { color: var(--on-dark-2); margin-top: 12px; max-width: 720px; }
.public-principles { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.public-principles li { padding-top: 16px; border-top: 1px solid var(--dark-line); }
.public-principles strong { font-weight: 500; font-size: 18px; color: var(--on-dark); }
.public-principles p { color: var(--on-dark-2); font-size: 15.5px; margin-top: 6px; }
.public-contact { padding: 56px 0 48px; border-top: 1px solid var(--line); }
.public-contact h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.12; }
.public-form { max-width: 760px; margin-top: 24px; }
.public-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.public-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.public-privacy { font-size: 13.5px; color: var(--ink-3); }
.public-sent { margin-top: 24px; max-width: 760px; padding: 18px 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-weight: 500; }
.public-talk { padding: 8px 0 40px; }
.public-talk h2 { font-size: clamp(22px, 3vw, 28px); line-height: 1.15; }
.public-talk-box { margin-top: 16px; max-width: 760px; }
.public-talk-form { max-width: 420px; }
.public-talk-address { font-size: 20px; font-weight: 500; overflow-wrap: anywhere; }
.public-talk-address a { text-decoration: underline; }
.public-privacy-note { padding: 24px 0 32px; border-top: 1px solid var(--line); max-width: 860px; }
.public-privacy-note h3 { font-size: 16px; margin-bottom: 8px; }
.public-privacy-note p { font-size: 14px; color: var(--ink-2); }
.public-privacy-note p + p { margin-top: 8px; }
.public-foot { display: flex; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); }
.public-foot a:hover { color: var(--ink); }
/* Footer skyline (owner's Claude Design, 29.10): the mural stands on the closing hairline, right of
   "Chcesz porozmawiać?" and "Prywatność" - an ending, not a banner. .wla only reserves the mural's
   aspect ratio; assets/warsaw/living-architecture.js draws one canvas inside it. */
.public-foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: 0 56px; align-items: end; }
.public-skyline { min-width: 0; margin-top: -40px; }
.wla {
  --skyline-ink: var(--ink-3);   /* resting tone of the mural */
  --skyline-ink-lit: 46, 41, 37; /* rgb triplet: tone where the light falls */
  --skyline-glow: 255, 253, 247; /* rgb triplet: paper highlight under the light */
  --skyline-accent: var(--accent);
  position: relative; display: block; width: 100%; aspect-ratio: 1200 / 1070; user-select: none; pointer-events: none;
}
.wla > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
@media (max-width: 900px) { .public-foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 0 32px; } }
@media (max-width: 760px) {
  .public-foot-grid { grid-template-columns: minmax(0, 1fr); }
  .public-skyline { margin-top: 0; max-width: 460px; margin-left: auto; width: 100%; }
  .public-home .wrap { padding-left: 16px; padding-right: 16px; }
  .public-hero { padding-top: 40px; padding-bottom: 48px; }
  .public-lead { font-size: 17px; }
  .public-section { padding-top: 40px; padding-bottom: 40px; }
  .public-grid { grid-template-columns: minmax(0, 1fr); }
  .public-row { grid-template-columns: minmax(0, 1fr); padding: 22px 0; }
  .public-row-head h3 { font-size: 20px; }
  .public-principles { grid-template-columns: minmax(0, 1fr); }
  .public-form-row { grid-template-columns: minmax(0, 1fr); }
  .public-contact { padding: 40px 0 36px; }
  .public-band { padding: 48px 0; }
}

/* Wyszukiwarka podmiotów ICT and Podmioty (D-042) */
.public-top-link { font-size: 14.5px; color: var(--ink-2); margin-right: 8px; }
/* "Narzędzia" in the top of a public page (owner's design 1b, 31.10): areas, a search, the tools in groups. */
.public-top { position: relative; }
.tm { display: inline-flex; margin-right: 4px; }
.tm-trig { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 14px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.tm-trig:hover, .tm.is-open .tm-trig { color: var(--ink); background: var(--hover-wash); }
.tm-trig:focus-visible, .tm-item:focus-visible, .tm-area:focus-visible, .tm-foot a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tm-chev { width: 14px; height: 14px; transition: transform .2s var(--ease-quiet); }
.tm.is-open .tm-chev { transform: rotate(180deg); }
.tm-panel { position: absolute; top: calc(100% - 10px); right: 24px; z-index: 50; width: 780px; max-width: calc(100vw - 48px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-menu); transform-origin: top right; opacity: 0; transform: translateY(-4px) scale(.985); visibility: hidden; pointer-events: none; transition: opacity .16s var(--ease-quiet), transform .16s var(--ease-quiet), visibility 0s .16s; text-align: left; }
.tm-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.tm.is-open .tm-panel { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity .18s var(--ease-quiet), transform .18s var(--ease-quiet); }
.tm-search { display: flex; align-items: center; gap: 10px; margin: 12px 12px 0; padding: 0 12px; height: 44px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); }
.tm-search .tm-ico { width: 17px; height: 17px; color: var(--ink-3); }
.tm-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); outline: 0; box-shadow: none; padding: 0; height: auto; }
.tm-search:focus-within { border-color: var(--ink); box-shadow: var(--shadow-focus); }
.tm-search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.tm kbd { font-family: var(--mono); font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: var(--surface); }
.tm-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 300px; }
.tm-areas { border-right: 1px solid var(--line); padding: 12px 8px; display: grid; align-content: start; gap: 2px; }
.tm-area { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 9px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.tm-area:hover { background: var(--bg); }
.tm-area[aria-selected="true"] { background: var(--bg); color: var(--ink); font-weight: 500; box-shadow: var(--shadow-nav-active); }
.tm-n { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.tm-groups { padding: 8px 8px 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; align-content: start; }
.tm-grp h4 { margin: 0; padding: 10px 10px 4px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; }
.tm-grp ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tm-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) 14px; gap: 11px; align-items: center; padding: 8px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; transition: background .15s; }
.tm-tile { width: 32px; height: 32px; border-radius: 8px; background: var(--bg-alt); display: grid; place-items: center; box-sizing: border-box; transition: background .15s; }
.tm-tile .tm-ico { width: 16px; height: 16px; color: var(--ink); }
.tm-txt { display: block; min-width: 0; }
.tm-t { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14.5px; font-weight: 500; letter-spacing: -.01em; }
.tm-d { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.tm-go { display: grid; place-items: center; color: var(--ink); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.tm-go-ico { width: 14px; height: 14px; }
a.tm-item:hover, a.tm-item:focus-visible { background: var(--bg); }
a.tm-item:hover .tm-tile, a.tm-item:focus-visible .tm-tile, a.tm-item.is-current .tm-tile { background: var(--accent); }
a.tm-item:hover .tm-go, a.tm-item:focus-visible .tm-go { opacity: 1; transform: none; }
.tm-item.is-soon { cursor: default; }
.tm-item.is-soon .tm-tile { background: transparent; border: 1px dashed #c4bdb3; }
.tm-item.is-soon .tm-tile .tm-ico { color: var(--ink-3); }
.tm-item.is-soon .tm-t { color: var(--ink-2); }
.tm-badge { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: var(--bg-alt); color: var(--ink-2); font-weight: 400; white-space: nowrap; }
.tm-example { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); border: 1px dashed #c4bdb3; border-radius: 4px; padding: 1px 5px; font-weight: 400; }
.tm mark { background: var(--accent); color: var(--ink); border-radius: 3px; padding: 0 1px; }
.tm-empty { grid-column: 1 / -1; margin: 0; padding: 40px 16px; text-align: center; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
.tm-empty a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.tm-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 12px 18px; font-size: 13.5px; color: var(--ink-2); background: var(--bg); border-radius: 0 0 16px 16px; }
.tm-foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 500; text-decoration: none; white-space: nowrap; }
.tm-arrow { width: 14px; height: 14px; transition: transform .15s; }
.tm-foot a:hover .tm-arrow { transform: translateX(2px); }
.tm-scrim { display: none; }
/* a phone: the panel spans the screen under the top, the areas a strip, the rest dimmed; touch only */
@media (max-width: 720px) {
  .tm-trig { padding: 0 10px 0 12px; }
  .tm-panel { top: 100%; left: 0; right: 0; width: auto; max-width: none; border-radius: 0; border-width: 1px 0; max-height: calc(100vh - 84px); overflow: auto; }
  .tm-panel::before { display: none; }
  .tm-body { grid-template-columns: 1fr; min-height: 0; }
  .tm-areas { border-right: 0; border-bottom: 1px solid var(--line); display: flex; overflow-x: auto; padding: 8px; }
  .tm-area { flex: 0 0 auto; }
  .tm-groups { grid-template-columns: 1fr; }
  .tm-item { padding: 12px 8px; min-height: 56px; }
  .tm-go { opacity: 1; transform: none; }
  .tm kbd { display: none; }
  .tm-foot { border-radius: 0; }
  .tm-scrim { position: fixed; inset: 84px 0 0; background: rgba(23, 18, 14, .18); z-index: 40; }
  .tm.is-open .tm-scrim { display: block; }
}
@media (prefers-reduced-motion: reduce) { .tm-panel, .tm.is-open .tm-panel { transform: none !important; transition: opacity .1s; } .tm-go, .tm-tile, .tm-chev { transition: none; } }
.public-top-link:hover { color: var(--ink); }
/* The search field sits at the bottom of its card, level with the neighbouring card's end (D-047). */
.public-card .ent-search { margin-top: auto; padding-top: 6px; }
.ent-search { display: flex; gap: 10px; margin-top: 4px; }
.ent-search input {
  flex: 1; min-width: 0; height: 48px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font: 400 16px/1 var(--font); outline: none;
}
.ent-search input:focus { border-color: var(--ink); }
.ent-search .btn { height: 48px; flex-shrink: 0; }
/* The frame of a tool page (owner, 31.10 - every tool from now on): the head with the eyebrow close to the title,
   the data panel top right with the tool's own switches under it; "Zostaw opinię o tym narzędziu" at the bottom. */
.tool-page { padding-top: 5vh; padding-bottom: 32px; }
.tool-page.in-panel { padding-top: 0; }
.tool-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; margin-bottom: 28px; }
.tool-head-l { flex: 1 1 520px; min-width: 0; }
.tool-head .eyebrow { margin: 0; }
.tool-head h1 { font-size: clamp(30px, 4.6vw, 44px); line-height: 1.08; margin: 8px 0 0; }
.tool-lead { font-size: 16px; color: var(--ink-2); margin: 10px 0 0; max-width: 640px; line-height: 1.5; text-wrap: pretty; }
.tool-head-r { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: -8px; }
.tool-head-r [data-dm-host]:empty { display: none; }
@media (max-width: 960px) { .tool-head-r { align-items: flex-start; margin-top: 0; } }
@media (max-width: 640px) { .tool-page { padding-top: 16px; } }
.tool-fb { padding: 4px 0 40px; }
.tool-fb-toggle { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; transition: color .15s, text-decoration-color .15s; }
.tool-fb-toggle:hover { color: var(--ink); text-decoration-color: var(--ink); }
.tool-fb-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tool-fb-ico { width: 16px; height: 16px; }
.tool-fb-form { max-width: 560px; margin-top: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.tool-fb-form textarea { width: 100%; box-sizing: border-box; }
.tool-fb-note { font-size: 12.5px; color: var(--ink-3); margin: 6px 0 0; }
.tool-fb-sent { font-size: 14px; color: var(--ink-2); margin: 0; }
.ent-number-hint { margin: 10px 0 0; max-width: 760px; }
.ent-search-hint { margin: 6px 0 22px; }
.ent-results > * + * { margin-top: 14px; }
.ent-results .card + .card, .ent-results .card + .grid-2, .ent-results .grid-2 + .card { margin-top: 14px; }
.ent-results .grid-2 { margin-bottom: 0; }
.ent-results .grid-2 > .card { margin-top: 0; }
.ent-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.ent-head .ent-name { font-size: 26px; line-height: 1.15; overflow-wrap: anywhere; }
.ent-save { border: 1.5px solid var(--ink); }
.ent-save-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ent-save-head h2 { font-size: 18px; }
.ent-save p { font-size: 15px; color: var(--ink-2); }
.ent-save p a { color: var(--ink); text-decoration: underline; }
.ent-ids { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ent-id { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 8px; background: var(--bg-alt); font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.ent-id-k { padding: 1px 6px; border-radius: 6px; background: var(--surface); font-family: var(--font); font-size: 11.5px; font-weight: 500; color: var(--ink-2); }
.ent-facts dd .tag { margin-left: 4px; vertical-align: 1px; }
.ent-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.ent-note { display: flex; gap: 8px; align-items: flex-start; }
.ent-note .icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.ent-note-error .icon { color: var(--err); }
.ent-note-warning .icon { color: var(--warn); }
.ent-note-info .icon { color: var(--ink-3); }
.ent-note a { text-decoration: underline; }
.ent-sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 14px; }
.ent-source-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ent-sources a { text-decoration: underline; }
.ent-table td.ent-wrap { white-space: normal; overflow-wrap: anywhere; min-width: 180px; }
.ri-fields-form .field.is-proposed input { border-color: var(--ink); background: #fffbeb; }
/* Dostawcy ICT prościej (D-048): the three steps, the first provider, adding one from the registers */
.tp-steps3 { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tp-steps3 li { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.tp-steps3 li > div { flex: 1; min-width: 0; }
.tp-steps3 strong { display: block; font-size: 14.5px; font-weight: 500; }
.tp-steps3 small { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.tp-step-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; background: var(--bg-alt); color: var(--ink); }
.tp-steps3.is-state li.is-done .tp-step-n { background: var(--accent); color: var(--accent-ink); }
.tp-steps3.is-state li.is-todo { border-color: var(--warn); }
.tp-steps3.is-state li.is-todo .tp-step-n { background: var(--warn-bg); color: var(--warn); }
.tp-steps3 .mini-btn { flex: none; align-self: center; }
.tp-first p { font-size: 15px; color: var(--ink-2); max-width: 760px; }
.tp-more { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.tp-more > summary { cursor: pointer; font-weight: 500; font-size: 14.5px; }
.tp-more[open] > summary { margin-bottom: 10px; }
.tp-pv-lead { margin: 0 0 12px; }
.tp-pv .ent-search { margin-bottom: 6px; }
.ent-recent { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; font-size: 14.5px; }
.tp-pv-firm { margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.tp-pv-firm h3 { font-size: 17px; margin-bottom: 8px; overflow-wrap: anywhere; }
.link-btn { background: none; border: none; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; text-align: left; }
.ent-known { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; margin: 6px 0; }
.ent-known .icon { flex: none; width: 18px; height: 18px; color: var(--ok); margin-top: 1px; }
.ent-known a { text-decoration: underline; }
.ent-filter { margin-bottom: 12px; }
.ent-actions { display: flex; gap: 6px; justify-content: flex-end; }
.ent-snapshot { margin: 8px 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-alt); }
.ri-origin { color: var(--ink-2); }
@media (max-width: 760px) {
  .public-top-link { display: none; }
  .ent-search { flex-direction: column; }
  .ent-search input { flex: none; width: 100%; }
  .ent-search .btn { width: 100%; justify-content: center; }
  .ent-head .ent-name { font-size: 22px; }
  .tp-steps3 { grid-template-columns: minmax(0, 1fr); }
  .ent-actions { justify-content: flex-start; }
  /* On a phone a row is a short block: field, value, register - nothing hidden to the right. */
  .ent-table thead { display: none; }
  .ent-table, .ent-table tbody, .ent-table tr, .ent-table td { display: block; width: 100%; }
  .ent-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ent-table tr:last-child { border-bottom: none; }
  .ent-table td, .ent-table td.ent-wrap { padding: 2px 0; border-bottom: none; white-space: normal; min-width: 0; overflow-wrap: anywhere; }
}

.print-only { display: none; }
@media print {
  .sidebar, .topbar, .tabs, .doc-actions-row, .reader-tools, .toc, .chat-composer { display: none !important; }
  .app { display: block; }
  .reader { display: block; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .kpi-grid.k6, .kpi-grid.k5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dim-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .doc-dates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ask-box { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .reader, .chat-layout { grid-template-columns: 1fr; }
  .toc, .chat-sessions { position: static; max-height: 260px; }
  .top-search { display: none; }
}
@media (max-width: 760px) {
  .kpi-grid.k6, .kpi-grid.k5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dim-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-dates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diff-grid { grid-template-columns: 1fr; }
  .diff-col + .diff-col { border-left: 0; border-top: 1px solid var(--line); }
  .area-row { grid-template-columns: 1fr 50px; }
  .area-row .area-track { grid-column: 1 / -1; }
  .timeline::before { left: 4px; }
  .tl-item { grid-template-columns: 14px minmax(0, 1fr); }
  .tl-when { grid-column: 2; order: -1; }
  .tl-dot { grid-row: 1 / span 2; margin-left: 0; }
  .tl-month { padding-left: 20px; }
  .review-item { grid-template-columns: 1fr; }
  .bubble-user { max-width: 92%; }
  .doc-head { padding: 18px; }
  .doc-head h1 { font-size: 21px; }
  .steps-log li { grid-template-columns: 1fr; gap: 2px; }
  .content { padding: 20px 16px 60px; }
  .ask-box { padding: 20px; }
  .ask-form { flex-wrap: wrap; }
  .ask-form .btn { width: 100%; }
  .ask-chip { white-space: normal; }
}

/* ---------- accounts ---------- */
/* A reader never sees actions reserved for administrators (the API refuses them anyway). */
.role-reader [data-admin] { display: none !important; }
#user-box { display: flex; align-items: center; gap: 8px; }
.user-chip { max-width: 260px; }
.user-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-role { color: var(--ink-3); font-size: 12px; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.secret-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.secret-value { font: 500 16px var(--mono, 'IBM Plex Mono', monospace); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; user-select: all; word-break: break-all; }
@media (max-width: 760px) {
  .user-chip-name, .user-chip-role { display: none; }
}
/* .switch-row hides its input (it styles a separate switch); radios here stay visible */
.radio-row { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 3px 0; cursor: pointer; }
.radio-row input { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }

/* ---------- link targets (markTargets): the element a link was about, marked and in view ---------- */
.is-target { background: #f7fbd2; box-shadow: inset 4px 0 0 var(--ink); border-radius: 8px; animation: target-in 1.8s ease-out; }
tr.is-target { background: none; box-shadow: none; animation: none; }
tr.is-target > td { background: #f7fbd2; animation: target-in 1.8s ease-out; }
tr.is-target > td:first-child { box-shadow: inset 4px 0 0 var(--ink); padding-left: 14px; }
.cov-row.is-target { padding: 12px 10px 12px 14px; }
@keyframes target-in { 0%, 35% { background: var(--accent); } }
.target-note {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 12px; padding: 10px 14px;
  border-radius: var(--radius-sm); background: #f7fbd2; font-size: 13.5px; color: var(--ink-2);
}
.target-note .icon { width: 16px; height: 16px; color: var(--ink); }
.target-note .btn { margin-left: auto; }
/* A long note keeps its text beside the icon; on a narrow screen the button wraps under it. */
.held-note { align-items: flex-start; }
.held-note .icon { flex: none; margin-top: 2px; }
.held-note > span { flex: 1 1 240px; }

/* ---------- regulatory map (Akty prawne -> DORA) ---------- */
.map-view .page-actions { flex-wrap: wrap; }
.map-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.map-indicator { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.map-ind-label { display: flex; align-items: center; gap: 7px; margin: 0; font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.map-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: 0 0 auto; }
.tone-ok .map-dot { background: #12b76a; }
.tone-warning .map-dot { background: #f79009; }
.tone-error .map-dot { background: #f04438; }
.map-ind-value { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.3; }
.map-ind-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.map-indicator .card-link { margin-top: auto; padding-top: 6px; }
.map-strong { color: var(--ink); font-weight: 500; }
a.map-strong { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
a.map-strong:hover { text-decoration-color: var(--ink); }
.map-warn { color: var(--warn); }
.map-attention { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; margin-bottom: 22px; }
.map-attention-head { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 14px; font-weight: 500; }
.map-attention-head .icon { width: 16px; height: 16px; }
.map-attention ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.map-attention li { display: flex; align-items: baseline; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.map-attention a { color: var(--ink-2); }
.map-attention .mini-btn { flex: none; }
.watch-banner { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; }
.watch-banner > .icon { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.watch-banner .form-actions { margin-top: 10px; }
.watch-note { display: flex; gap: 6px; align-items: center; margin-top: 12px; }
.watch-note .icon { width: 15px; height: 15px; flex: none; }
.map-attention a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.map-roots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; align-items: start; }
.map-root { min-width: 0; }
/* A basic act: a white card like the others, set apart only by the accent edge on top and a larger title. */
.map-root-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px; width: 100%; padding: 22px 22px 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  box-shadow: inset 0 4px 0 var(--accent); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s;
}
.map-root-card:hover { border-color: var(--ink-3); }
.map-root-card .eyebrow { margin: 0; }
.map-root-title { font-size: 24px; font-weight: 500; line-height: 1.15; }
.map-root-role { font-size: 14px; color: var(--ink-2); }
.map-root-card .tag-row { margin-top: 2px; }
.map-root-more { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.map-root-card:hover .map-root-more { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.map-root-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.map-root-card.is-missing { border-style: dashed; box-shadow: none; cursor: default; }
.map-root-card.is-missing .map-root-role, .map-root-card.is-missing .eyebrow { color: var(--ink-3); }
/* Branches hang from their act on a thin line - connections without a graph. */
.map-branches { display: grid; gap: 8px; margin-left: 22px; padding: 10px 0 0 18px; border-left: 2px solid var(--line); }
.map-branch { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); min-width: 0; }
.map-branches > .map-branch::before { content: ''; position: absolute; left: -20px; top: 21px; width: 18px; border-top: 2px solid var(--line); }
.map-branch > summary { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none; font-size: 14.5px; }
.map-branch > summary::-webkit-details-marker { display: none; }
.map-branch > summary::before {
  content: ''; flex: 0 0 auto; width: 8px; height: 8px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: rotate(-45deg); transition: transform .15s;
}
.map-branch[open] > summary::before { transform: rotate(45deg); }
.map-branch > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: var(--radius-sm); }
.map-branch-label { flex: 1; min-width: 0; font-weight: 500; }
.map-rel { display: inline-block; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font: 400 11px/1.5 var(--mono); color: var(--ink-2); white-space: nowrap; }
.map-items { list-style: none; margin: 0; padding: 0 6px 6px; }
.map-item { border-top: 1px solid var(--line); }
.map-item-btn {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'tags main state'; align-items: start; gap: 10px;
  width: 100%; padding: 10px 8px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.map-item-btn:hover { background: var(--bg); }
.map-item-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.map-item-tags { grid-area: tags; padding-top: 1px; }
.map-item-main { grid-area: main; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.map-item-state { grid-area: state; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.map-item-name { font-size: 14px; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.map-item-sub, .map-item-link, .map-item-note { font-size: 12.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.map-item-link { color: var(--ink-2); }
.map-item-note { font-style: italic; }
.map-item.is-external { padding: 10px 8px; }
.map-item.is-external .map-item-name { display: inline-flex; align-items: center; gap: 5px; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.map-item.is-external .map-item-name .icon { width: 13px; height: 13px; }
.map-item.is-external .map-item-sub { display: block; margin-top: 2px; }
.map-empty { margin: 0; padding: 4px 14px 12px; font-size: 13.5px; color: var(--ink-3); }

.map-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.map-group { scroll-margin-top: 80px; }
.map-group > .map-branch, .map-group > .map-empty { margin-top: 8px; }
.map-group-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.map-group-head h2 { font-size: 18px; font-weight: 500; }
.map-group-head .card-link { margin-left: auto; }
.map-group-note { margin: 6px 0 4px; font-size: 13px; color: var(--ink-2); }
.map-group.is-collapsed > summary { list-style: none; cursor: pointer; }
.map-group.is-collapsed > summary::-webkit-details-marker { display: none; }
.map-group.is-collapsed > summary .map-group-head h2::after { content: ' ▸'; color: var(--ink-3); font-size: 14px; }
.map-group.is-collapsed[open] > summary .map-group-head h2::after { content: ' ▾'; }
.map-legend { margin: 18px 0 0; font-size: 12.5px; line-height: 1.9; color: var(--ink-3); }

.map-panel h3 { margin: 20px 0 8px; font: 500 11.5px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.map-official { margin: 0 0 10px; font-size: 14.5px; line-height: 1.5; }
.map-panel .tag-row { margin-bottom: 14px; }
.map-panel .map-empty { padding: 0; }
.map-panel-rels, .map-panel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; overflow-wrap: anywhere; }
.map-panel-rels a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.map-panel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

@media (max-width: 1100px) {
  .map-status, .map-roots, .map-groups { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .map-branches { margin-left: 10px; padding-left: 12px; }
  .map-branches > .map-branch::before { left: -14px; width: 12px; }
  .map-item-btn { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'tags state' 'main main'; gap: 6px 10px; }
  /* The relation goes under the branch name, so the name keeps the width. */
  .map-branch > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'chev label count' '. rel .'; gap: 4px 10px; align-items: center; }
  .map-branch > summary::before { grid-area: chev; }
  .map-branch > summary .map-branch-label { grid-area: label; }
  .map-branch > summary .map-rel { grid-area: rel; justify-self: start; }
  .map-branch > summary .count-badge { grid-area: count; }
  .map-root-title { font-size: 21px; }
}

/* Źródła: an error a later successful check has resolved - history, not an alarm */
.error-resolved { color: var(--ink-3); font-size: 13px; }
.error-resolved .tag { margin-bottom: 4px; }

/* Źródła: a scan in progress (sources.js liveScan) */
.alert-banner.scan-live { background: var(--surface); border-color: var(--line); color: var(--ink); align-items: flex-start; }
.alert-banner.scan-live .spinner { margin-top: 2px; flex: none; }
.alert-banner.scan-live > div { flex: 1; min-width: 0; display: grid; gap: 6px; }
.alert-banner.scan-live strong { margin: 0; }
.alert-banner.scan-live .meter { max-width: 420px; }
.scan-live-note { font-size: 13px; color: var(--ink-3); }
.scan-mark { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }
.scan-mark.is-running { color: var(--ink); font-weight: 500; }
.scan-mark .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; animation: pulse 1.4s ease-in-out infinite; }

/* Karta aktu: the act's title bar after the header scrolls away (P-010) and "Przejdź do jednostki" */
.doc-float { position: sticky; top: 64px; height: 0; z-index: 25; }
.doc-float-bar {
  position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 10px 24px -18px rgba(23, 18, 14, .45); opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.doc-float.is-on .doc-float-bar { opacity: 1; transform: none; pointer-events: auto; }
.doc-float-id { font-family: var(--mono); font-size: 12px; color: var(--ink-3); flex: none; }
.doc-float-title { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 500; }
.doc-float-jump { flex: 0 0 300px; min-width: 0; }
/* The unit a jump lands on: its text clear of the marker line on the left. */
.prov-para.is-target { padding: 6px 10px 6px 16px; }
.doc-float-jump:empty { display: none; }
.doc-float.is-on ~ #tab-body .toc { top: 132px; max-height: calc(100vh - 150px); }
/* With the page's scroll-padding-top (80px, tokens.css): the unit lands just below the title bar. */
#tab-body [id^="p-"] { scroll-margin-top: 56px; }
.unit-jump { position: relative; flex: 0 1 300px; min-width: 200px; }
.unit-jump input {
  width: 100%; height: 38px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface);
  padding: 0 10px; font: 400 13.5px var(--font); color: var(--ink);
}
.unit-jump input:focus { outline: none; border-color: var(--ink); }
.doc-float .unit-jump { min-width: 0; flex-basis: 100%; }
.doc-float .unit-jump input { height: 32px; }
.unit-suggest {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); max-height: 320px; overflow-y: auto; padding: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 30px -18px rgba(23, 18, 14, .5);
}
.unit-suggest button {
  all: unset; box-sizing: border-box; display: block; width: 100%; padding: 6px 8px; border-radius: 7px; cursor: pointer;
  font-size: 13.5px; line-height: 1.35;
}
.unit-suggest button:hover, .unit-suggest button:focus-visible { background: var(--bg-alt); }
.unit-suggest small { display: block; color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit-none { padding: 6px 8px; color: var(--ink-3); font-size: 13px; }
@media (max-width: 760px) {
  .doc-float-bar { flex-wrap: wrap; gap: 6px 10px; }
  .doc-float-title { flex-basis: 50%; }
  .doc-float-jump { flex: 1 1 100%; order: 3; }
  .unit-jump { flex-basis: 100%; min-width: 0; }
  #tab-body [id^="p-"] { scroll-margin-top: 96px; }
}
@media print { .doc-float, .unit-jump { display: none !important; } }

/* ---------- navigation: GRC overview, areas (DORA, AML, RODO), modules (nav.js, modules.js) ---------- */
/* Top level - Przegląd, DORA, AML, RODO: the same size and weight, one under another. */
.nav-item.nav-top { font-weight: 500; color: var(--ink); }
.nav-area { margin-top: 2px; }
button.nav-toggle { width: 100%; box-sizing: border-box; border: 0; background: none; font-family: inherit; line-height: inherit; text-align: left; cursor: pointer; }
button.nav-toggle:hover { background: rgba(23,18,14,.05); }
.nav-toggle:focus-visible, .nav-chev-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
/* Fold and unfold: a chevron pointing down when folded, up when unfolded. */
.nav-chev { margin-left: auto; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; color: var(--ink-2); transition: transform .15s ease; }
.nav-chev .icon { width: 18px; height: 18px; }
.nav-chev.is-open { transform: rotate(180deg); }
.nav-row { display: flex; align-items: center; gap: 2px; }
.nav-row > .nav-item { flex: 1; min-width: 0; }
/* A module name too long for the menu goes to a second line instead of being cut (D-067). */
.nav-level .nav-label { white-space: normal; text-overflow: clip; line-height: 1.3; }
.nav-chev-btn {
  flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-chev-btn:hover { background: rgba(23,18,14,.06); }
.nav-chev-btn .nav-chev { margin: 0; }
/* Levels below: modules of an area, then the views of a module - each indented along a guide line. */
.nav-level, .nav-children { margin: 2px 0 6px 19px; padding-left: 6px; border-left: 1px solid var(--line); }
.nav-item.nav-child { padding: 5px 10px; font-size: 13.5px; }
/* Something in Centrum monitoringu needs action: orange, red for a source that could not be checked. */
.nav-dot { flex: none; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; }
.nav-dot-warning { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.nav-dot-error { background: #d92d20; box-shadow: 0 0 0 3px rgba(217,45,32,.16); }
.nav-system { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- GRC dashboard (views/dashboard.js) ---------- */
.kpi-empty .kpi-value { color: var(--ink-3); }
.kpi-empty .kpi-sub a, .area-live a, .module-owner a { text-decoration: underline; text-underline-offset: 3px; }
.area-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.area-card { display: flex; flex-direction: column; gap: 10px; }
.area-card .card-head { margin-bottom: 0; }
.area-summary { font-size: 13.5px; color: var(--ink-2); }
.area-measures { display: grid; gap: 4px; margin: 0; font-size: 13.5px; }
.area-measures > div { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 4px; }
.area-measures dt { color: var(--ink-2); }
.area-measures dd { margin: 0; color: var(--ink-3); font-family: var(--mono); }
.area-live { font-size: 13.5px; background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.area-card .card-link { margin-top: auto; }
.shared-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.shared-card p { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }

/* ---------- a module in preparation (views/module.js) ---------- */
.module-features { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.module-shared { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; list-style: disc; }
.module-owner { color: var(--ink-3); }
.module-sub { font-size: 13px; font-weight: 500; color: var(--ink-2); margin: 4px 0 6px; }
.module-sub ~ .module-sub { margin-top: 14px; }
.module-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.module-pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
[data-module] .notice { margin-bottom: 14px; }
@media (max-width: 1180px) {
  .area-grid { grid-template-columns: minmax(0, 1fr); }
  .shared-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shared-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Źródła: przegląd źródeł, candidates for new sources (sources.js, D-015) ---------- */
.source-review { margin-top: 14px; }
.review-when { font-size: 14px; color: var(--ink-2); margin: 4px 0 8px; }
.cand-list { list-style: none; margin: 0; padding: 0; }
.cand { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.cand-ev { font-size: 13px; color: var(--ink-2); margin-top: 4px; overflow-wrap: anywhere; }
.cand-ev a { text-decoration: underline; text-underline-offset: 3px; }
.cand-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; max-width: 420px; }
.cand-actions input { height: 32px; min-width: 180px; flex: 1 1 180px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font: 400 13px var(--font); background: var(--bg); }
.cand-decision { font-size: 13px; color: var(--ink-2); text-align: right; max-width: 360px; }
.cand-decision .source-url { display: block; }
.cand-group { margin-top: 10px; }
.cand-group > summary { cursor: pointer; font-size: 14px; color: var(--ink-2); padding: 6px 0; }
@media (max-width: 760px) {
  .cand { grid-template-columns: minmax(0, 1fr); }
  .cand-actions, .cand-decision { justify-content: flex-start; text-align: left; max-width: none; }
}

/* ---------- Centrum weryfikacji: plain-language help at each task (monitoring.js) ---------- */
.review-guide { margin-top: 10px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); max-width: 820px; }
.review-guide p { margin: 0; }
.review-guide strong { color: var(--ink); font-weight: 500; }
.review-effects { margin: 0; padding-left: 18px; display: grid; gap: 2px; font-size: 13px; }
.review-suggestion { margin-top: 4px; padding: 8px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); display: grid; gap: 4px; }
.review-suggestion.is-ai { border-style: dashed; }
.review-suggestion-head { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.review-suggestion-head .icon { width: 14px; height: 14px; }
.review-suggestion-head .muted-inline { text-transform: none; letter-spacing: 0; font-family: var(--font); }
.review-suggestion-note { font-size: 12.5px; color: var(--ink-3); }
.review-tech { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.review-tech > summary { cursor: pointer; }
.review-tech code { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.review-actions { min-width: 190px; }

/* Obowiązki regulacyjne (D-019, D-021): register by area and sub-area, and the card of one obligation. */
.ob-area { margin-top: 22px; }
.ob-area-title { font-size: 18px; margin: 0 0 10px; display: flex; align-items: baseline; gap: 10px; }
.ob-group { margin-bottom: 16px; }
.ob-group .card-head h3 { margin: 0; font-size: 15px; }
.ob-row-tags { margin-top: 6px; gap: 6px; align-items: center; }
/* Long statements wrap (two lines at most) so the basis and status columns stay in the card. */
.ob-table td { white-space: normal; vertical-align: top; }
.ob-table .doc-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ob-code-inline { font-family: var(--mono); font-size: 12.5px; margin-right: 4px; }
.ob-elements, .ob-rejections { margin-bottom: 16px; }
.ob-rejections > summary { cursor: pointer; line-height: 1.5; }
.ob-rejections .rel-list { margin-top: 10px; }
.ob-table .ob-code { white-space: nowrap; font-family: var(--mono); font-size: 12.5px; }
.ob-table .ob-basis { min-width: 150px; font-size: 13px; }
.ob-grid { margin: 16px 0; }
.ob-statement { font-size: 16px; line-height: 1.5; margin: 0 0 14px; }
.ob-basis-main { font-size: 14px; font-weight: 500; }
.ob-quote { margin: 10px 0 0; padding: 10px 14px; border-left: 3px solid var(--line); background: var(--bg-alt); border-radius: 0 8px 8px 0; font-size: 14px; line-height: 1.5; white-space: pre-line; }
.ob-interpretive { margin-top: 12px; font-size: 14px; }
.ob-interpretive > summary { cursor: pointer; color: var(--ink-2); }

/* Obszary realizacji (D-021, D-067, D-068): the catalogue, the card of one mechanism, "Jak realizujemy". */
.mech-table .mech-count { white-space: nowrap; font-size: 13px; }
.mech-control, .mech-checklist, .ob-mechanisms { margin-bottom: 16px; }
.ok-line { display: flex; gap: 8px; align-items: center; }

/* Weryfikacja obowiązków (D-021): paragraphs on the left, the provision and its proposals on the right. */
.ver-stats { margin-top: 4px; }
.ver-layout { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 14px; }
.ver-units { padding: 10px; max-height: calc(100vh - 140px); overflow: auto; position: sticky; top: 80px; }
.ver-units ul { list-style: none; margin: 0; padding: 0; }
.ver-toggle { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); padding: 4px 6px 10px; }
.ver-unit-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px; cursor: pointer; font: inherit; color: inherit; }
.ver-unit-btn strong { font-weight: 500; font-size: 13.5px; }
.ver-unit-btn small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.ver-unit-btn:hover, .ver-unit-btn.is-active { background: var(--bg-alt); }
.ver-provision { margin-bottom: 4px; }
.ver-all { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.ver-entry { margin-bottom: 12px; }
.ver-entry.is-done { opacity: .75; }
.ver-entry-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; flex-wrap: wrap; }
.ver-statement { margin: 6px 0; line-height: 1.5; }
.ver-mech { margin-top: 8px; }
.ver-reject { margin-top: 10px; }
@media (max-width: 860px) {
  .ver-layout { grid-template-columns: 1fr; }
  .ver-units { position: static; max-height: 320px; }
}
.ver-entry .review-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; }
.ver-entry .review-actions .btn { width: auto; }

/* Weryfikacja jednostka po jednostce (D-022): przepis z budową, rola wyliczenia, pozycje w drzewie. */
.ver-act { margin: 0 0 6px; }
.ver-batch-btn { width: 100%; justify-content: center; margin: 0 0 8px; }
.ver-batch { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ver-batch-ask { margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.ver-batch-ask p { margin: 0 0 6px; }
.ver-batch-ask strong { color: var(--ink); }
.ver-batch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ver-article { margin-top: 8px; }
.ver-article-title { margin: 8px 6px 2px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.ver-article-title small { font-weight: 400; color: var(--ink-3); }
.ver-text { font-size: 14.5px; line-height: 1.55; }
.ver-text p { margin: 0 0 8px; }
.ver-plain { white-space: pre-line; }
.ver-points { list-style: none; margin: 0 0 8px; padding-left: 18px; }
.ver-points li { margin: 4px 0; }
.ver-points .ver-points { margin: 4px 0 0; }
.ver-resolution p { margin: 0 0 6px; line-height: 1.5; }
.ver-roles { border: 0; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.ver-roles legend { font-size: 13.5px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.ver-role { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.ver-role.is-active { border-color: var(--ink); background: var(--bg-alt); }
.ver-role small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.ver-warnings { margin: 12px 0 0; padding: 10px 14px; list-style: none; background: var(--warn-bg); color: var(--warn); border-radius: 10px; font-size: 13.5px; display: grid; gap: 4px; }
.ver-elements { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.ver-elements ol, ol.ver-elements { list-style: none; margin: 0; padding: 0; }
.ver-elements-head { margin: 0 0 6px; font-size: 12.5px; color: var(--ink-3); }
.ver-element { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.ver-element:last-child { border-bottom: 0; }
.ver-element.is-done { opacity: .75; }
.ver-element-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.ver-element-marker { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); min-width: 64px; }
.ver-element-text { flex: 1 1 260px; line-height: 1.45; }
.ver-element-meta { display: inline-flex; gap: 6px; align-items: center; }
.ver-element-actions .btn { padding: 2px 8px; font-size: 12.5px; }
.ver-form { margin-top: 12px; display: grid; gap: 10px; }
.ver-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.ver-help { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); display: grid; gap: 2px; }
.ver-add, .ver-confirm, .ver-closed { margin-bottom: 12px; }
.ver-add > summary, .ver-closed > summary, .ver-hint > summary { cursor: pointer; font-weight: 500; display: flex; gap: 8px; align-items: center; }
/* Obowiązek: mechanizm, zastosowanie, przepis krajowy - ze zmianą przez osobę (D-026 C2). */
.ver-meta { margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 13px; }
.ver-meta > div { display: grid; grid-template-columns: 120px 1fr; gap: 8px; align-items: baseline; }
.ver-meta dt { color: var(--ink-3); font-size: 12.5px; }
.ver-meta dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ver-meta .btn { padding: 2px 10px; font-size: 12.5px; }
.ver-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink-2); line-height: 1.4; max-width: 100%; }
.ver-chip.is-main { border-color: var(--ink-3); color: var(--ink); }
.ver-chip em { font-style: normal; color: var(--ink-3); }
.ver-chip-x { border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 14px; line-height: 1; padding: 0 2px; }
.ver-element-cond { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0 74px; font-size: 12.5px; }
@media (max-width: 600px) { .ver-element-cond { margin-left: 0; } }
.ver-chip-x:hover { color: var(--danger, #b42318); }
.ver-chip-act { font-size: 12px; text-decoration: underline; }
.ver-chip.is-suggested { border-style: dashed; border-color: var(--warning, #b54708); }
.ver-chip.is-withdrawn { color: var(--ink-3); }
/* D-031 (P-022): a new wording of a decided unit, and the questions outside the register's scope. */
.ver-change { border-color: var(--warn); }
.ver-change-texts { gap: 16px; }
.ver-change-label { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.ver-scope-changes .rel-list > li { align-items: flex-start; }
.ver-scope-form { margin-top: 8px; }
.ver-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-right: 14px; }
.ver-out-of-scope { margin-top: 24px; }
.ver-out-of-scope summary { cursor: pointer; }
.ver-stats { margin-bottom: 6px; }
.ver-stats-foot { margin: 0 0 16px; font-size: 13px; color: var(--ink-3); }
.ver-section-head { margin: 22px 0 12px; }
.ver-section-head h2 { margin: 0 0 4px; font-size: 20px; }
.ver-section-head p { margin: 0; font-size: 14px; color: var(--ink-2); }
.ver-candidates { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.ver-candidates legend { font-size: 13px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.ver-candidate { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.ver-candidate small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
@media (max-width: 600px) {
  .ver-meta > div { grid-template-columns: 1fr; gap: 2px; }
}
/* Wskazówka prawnika dla AI przy jednostce (D-025). */
.ver-hint { margin: 4px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.ver-hint > summary { font-size: 13.5px; }
.ver-hint .ver-form { margin-top: 10px; }
.ver-hint .form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ver-confirm { display: grid; gap: 10px; }

/* Profil instytucji i zastosowanie obowiązków (D-021, Etap 3c). */
.ob-status-cell { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ob-reasons { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.profile-list { display: grid; gap: 14px; margin-top: 14px; }
.profile-answer { display: flex; flex-wrap: wrap; gap: 16px; margin: 4px 0 8px; }
.profile-choice { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.profile-item .select { max-width: 100%; }
/* D-036: proposed tools - red with "(propozycja)" until the owner verifies them. */
.tool-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tool-item { padding: 9px 0; border-top: 1px solid var(--line); }
.tool-item:first-child { border-top: 0; }
.tool-name { color: var(--err); font-weight: 500; }
.tool-flag { color: var(--err); font-size: 12.5px; }
.tool-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; overflow-wrap: anywhere; }
.tool-item.is-na .tool-name, .tool-item.is-na .tool-flag { opacity: .55; text-decoration: line-through; }
.tool-more { margin-top: 6px; font-size: 13.5px; }
.tool-more summary { cursor: pointer; color: var(--ink-2); }
.tool-line { margin: 6px 0 0; }
.tool-combines { margin: 4px 0 0; padding-left: 18px; }
.tool-count { color: var(--err); font-weight: 500; }
.mech-tools { margin-bottom: 14px; }
.profile-history { margin-top: 8px; font-size: 13.5px; }
.profile-history summary { cursor: pointer; color: var(--ink-2); }
.profile-history .rel-list { margin-top: 6px; }

/* Rejestr informacji (MR-19, D-028, D-029): daily work on contracts on the first screen; the DORA
   tables, MR-19 compliance and the history one tab away; contract, help and law-change panels in the drawer. */
.ri .page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ri-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ri-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; min-width: 0; }
.ri-stats > div + div { border-left: 1px solid var(--line); }
.ri-stats strong { font-size: 26px; font-weight: 500; letter-spacing: -0.04em; line-height: 1.15; margin-top: 6px; }
.ri-stats small { font-size: 12.5px; color: var(--ink-3); }
.ri-banner { display: flex; gap: 12px; align-items: center; margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); border: 1px solid #fcd34d; font-size: 14px; }
.ri-banner > .icon { flex: none; }
.ri-banner .grow { flex: 1; min-width: 0; }
.ri-banner strong { color: #78350f; }
.ri-toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 14px; }
.ri-search { flex: 1 1 260px; max-width: 420px; padding: 0 12px; }
.ri-asof { display: inline-flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--ink-2); }
.ri-asof-note { display: flex; gap: 8px; align-items: center; margin: -4px 0 12px; font-size: 13.5px; color: var(--ink-2); }
.ri-asof-note .icon { width: 16px; height: 16px; flex: none; }
.ri-contracts td { vertical-align: top; white-space: normal; }
.ri-contracts td.ri-ref { white-space: nowrap; }
.ri-open { all: unset; cursor: pointer; font-family: var(--mono); font-size: 13px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.ri-open:hover { color: var(--ink); text-decoration-thickness: 2px; }
.ri-open:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.ri-date-cell { white-space: nowrap; font-size: 13px; color: var(--ink-2); }
.ri-empty { padding: 34px 24px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.ri-empty h3 { font-size: 19px; }
.ri-empty p { color: var(--ink-2); font-size: 14.5px; margin: 6px auto 16px; max-width: 520px; }
.ri-lead { color: var(--ink-2); font-size: 14.5px; margin: 0 0 14px; max-width: 860px; }
.ri-bullets { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.ri-bullets li + li { margin-top: 3px; }
.ri-code { display: inline-block; padding: 1px 6px; border-radius: 6px; background: var(--bg-alt); color: var(--ink); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.ri-codes { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.ri-prov { font-size: 12.5px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.ri-prov-cell, .ri-code-cell { white-space: nowrap; }
.ri-form-head { margin-bottom: 14px; }
.ri-form-head .kv { margin-bottom: 0; }
.ri-form-head .notice { margin: 14px 0 0; }
.ri-tpl-table td { vertical-align: top; white-space: normal; }
.ri-contents { font-size: 13px; color: var(--ink-2); min-width: 260px; }
.ri-versions-card { margin-top: 14px; }
.ri-versions-card > summary { cursor: pointer; font-size: 14.5px; }
.ri-versions { margin-top: 14px; }
.ri-two p { font-size: 14px; color: var(--ink-2); }
.ri-two .card-head { margin-bottom: 8px; }
.ri-filter { margin: 0 0 6px; }
.ri-items > li[hidden], .ri-group[hidden] { display: none; }
.ri-item-way { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 118px; }
.ri-items .rel-sub a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ri-ways-box { margin-top: 14px; font-size: 13.5px; }
.ri-ways-box > summary { cursor: pointer; color: var(--ink-2); }
.ri-ways { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 14px; margin: 10px 0 0; }
.ri-ways > div { display: contents; }
.ri-ways dt { margin: 0; }
.ri-ways dd { margin: 0; color: var(--ink-2); }
.ri-approve { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ri-form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ri-form-row .grow { flex: 1 1 260px; }
.ri-form-row input[type="date"] { min-width: 170px; }
[data-journal] .rel-list li { align-items: baseline; }
.ri-contract .kv { margin-bottom: 16px; }
.ri-drawer-form { margin: 6px 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.ri-drawer-form input[readonly] { color: var(--ink-3); background: var(--bg-alt); }
.ri-kind { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.ri-kind legend { font-size: 13.5px; font-weight: 500; margin-bottom: 4px; padding: 0; }
.ri-kind label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.ri-kind label small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.ri-kind input { margin-top: 3px; }
[data-kind][hidden] { display: none; }
.ri-timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: grid; gap: 14px; }
.ri-timeline li { position: relative; font-size: 14px; }
.ri-timeline li::before { content: ''; position: absolute; left: -22px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); }
.ri-tl-reason { margin-top: 4px; color: var(--ink-2); }
.ri-diff { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; display: grid; gap: 2px; }
.ri-diff span { color: var(--ink-3); }
.ri-diff del { background: var(--del-bg); color: var(--del-ink); text-decoration: line-through; padding: 0 3px; border-radius: 3px; }
.ri-diff ins { background: var(--ins-bg); color: var(--ins-ink); text-decoration: none; padding: 0 3px; border-radius: 3px; }
.ri-change-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ri-change-list > li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.ri-change-list > li.is-done { border-color: #c6e7d0; background: var(--ok-bg); }
.ri-change-list p { margin-top: 6px; font-size: 14px; }
.ri-change-text { color: var(--ink-2); }
.ri-change-list .form { margin-top: 10px; }
.ri-decision { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.ri-decision label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.ri-help .module-sub:first-child { margin-top: 0; }
.ri-daily { display: grid; gap: 10px; margin: 0 0 8px; font-size: 14px; }
.ri-daily dt { font-weight: 500; }
.ri-daily dd { margin: 2px 0 0; color: var(--ink-2); }
.ri-help-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 14px; }
@media print {
  .ri .page-actions, .ri-toolbar, .ri .tabs, .ri-banner button, .ri-approve, .ri-filter, [data-export] { display: none !important; }
  .ri-items > li[hidden], .ri-group[hidden] { display: revert !important; }
}
@media (max-width: 760px) {
  .ri-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ri-stats > div:nth-child(3) { border-left: 0; }
  .ri-stats > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .ri-banner { flex-wrap: wrap; }
  .ri-search { max-width: none; }
  .ri-ways { grid-template-columns: 1fr; gap: 4px; }
  .ri-ways dd { margin-bottom: 8px; }
  .ri-items li { flex-wrap: wrap; }
  .ri-item-way { flex-direction: row; min-width: 0; }
  .ri-contents { min-width: 220px; }
  /* On a phone the list keeps what identifies a contract and its state; the dates are on its card. */
  .ri-contracts th:nth-child(4), .ri-contracts td:nth-child(4), .ri-contracts th:nth-child(6), .ri-contracts td:nth-child(6) { display: none; }
}
/* Dostawcy ICT (D-030, D-031): the summary with a tile per page, the pages ("Do zrobienia" of each), the
   contract card with the five parts of its life cycle (RTS 2024/1773 art. 4) and the provider card. Builds on .ri-*. */
.tp .page-head .eyebrow a { color: inherit; }
.tp-todo-more { margin-top: 8px; }
.tp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tp-tile { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; transition: border-color .15s; }
.tp-tile:hover, .tp-tile:focus-visible { border-color: var(--ink-3); }
.tp-tile-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tp-tile-head h2 { font-size: 16px; margin: 0; }
.tp-tile-main { margin: 6px 0 0; font-weight: 500; }
.tp-tile-sub { margin: 0; font-size: 13px; color: var(--ink-3); }
.tp-tiles-foot { margin: 12px 0 0; font-size: 13px; color: var(--ink-3); }
.tp-requirements { margin-top: 16px; }
.tp-todo { margin-bottom: 16px; }
.tp-todo .card-head { margin-bottom: 8px; }
.tp-todo-list { list-style: none; margin: 0; padding: 0; }
.tp-todo-list li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.tp-todo-list li:first-child { border-top: 0; padding-top: 2px; }
.tp-todo-list li > .icon { flex: none; width: 18px; height: 18px; color: var(--warn); }
.tp-todo-list .grow { flex: 1; min-width: 0; }
.tp-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--ink); font: 500 12px/1 var(--mono); flex: none; margin-right: 8px; background: var(--surface); }
.tp-num-policy { border-style: dashed; }
.tp-sub a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.tp-tags { margin: -14px 0 16px; }
.tp-mode { margin-bottom: 16px; }
.tp-mode .ri-drawer-form { margin: 0; background: var(--surface); }
.tp-stepper { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tp-step-link { display: flex; gap: 2px; align-items: flex-start; height: 100%; padding: 12px 12px 12px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: inherit; transition: border-color .15s; }
.tp-step-link:hover { border-color: var(--ink); }
.tp-step-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tp-step-text { display: flex; flex-direction: column; min-width: 0; }
.tp-step-text strong { font-size: 14px; font-weight: 500; line-height: 1.25; }
.tp-step-text small { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.tp-step.is-done .tp-num, .tp-step.is-partial .tp-num { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.tp-step.is-todo .tp-step-link { border-color: #fcd34d; background: var(--warn-bg); }
.tp-step.is-todo .tp-num { border-color: var(--warn); color: var(--warn); }
.tp-step.is-todo small { color: var(--warn); }
.tp-step.is-na .tp-step-link, .tp-step.is-later .tp-step-link, .tp-step.is-wait .tp-step-link { background: var(--bg); }
.tp-step.is-na .tp-num, .tp-step.is-later .tp-num, .tp-step.is-wait .tp-num { border-color: var(--ink-3); color: var(--ink-3); }
.tp-part { margin-bottom: 14px; scroll-margin-top: 80px; }
.tp-part .card-head { margin-bottom: 4px; flex-wrap: wrap; }
.tp-part .card-head h2 { display: flex; align-items: center; }
.tp-basis { font-size: 12.5px; color: var(--ink-3); margin-bottom: 12px; }
.tp-part.is-later, .tp-part.is-na, .tp-part.is-wait { background: var(--bg); }
.tp-question p + p { margin-top: 8px; }
.tp-assess { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.tp-choice { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 14px; }
.tp-choice legend { width: 100%; font-size: 13.5px; font-weight: 500; margin-bottom: 4px; padding: 0; }
.tp-choice label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.tp-choice .field-hint { width: 100%; }
.tp-choice .date-input { height: 34px; }
.tp-when { flex-direction: column; align-items: flex-start; gap: 6px; }
.tp-when .date-input { margin-left: 24px; }
.tp-later, .tp-na { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink-2); margin-top: 12px; }
.tp-later > .icon, .tp-na > .icon { flex: none; width: 16px; height: 16px; margin-top: 3px; }
.tp-later a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.tp-na > .icon { color: var(--ok); }
.tp-part-group { margin-bottom: 10px; scroll-margin-top: 80px; }
.tp-part-group > summary { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; cursor: pointer; list-style: none; }
.tp-part-group > summary::-webkit-details-marker { display: none; }
.tp-part-group > summary .card-meta { margin-left: auto; }
.tp-part-group[open] > summary { margin-bottom: 10px; }
.tp-providers td { vertical-align: middle; }
/* Long names and headers wrap, so the row's actions stay in sight (owner, 31.10). */
.tp-providers th, .tp-providers td:first-child { white-space: normal; }
.tp-providers td:first-child { min-width: 220px; overflow-wrap: anywhere; }
.tp-row-actions { white-space: nowrap; text-align: right; }
.tp-row-actions .mini-btn + .mini-btn { margin-left: 6px; }
[data-provider-note] { margin-bottom: 12px; }
@media (max-width: 960px) {
  .tp-stepper { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .tp-stepper { grid-template-columns: 1fr 1fr; }
  .tp-todo-list li { flex-wrap: wrap; }
  .tp-part-group > summary .card-meta { margin-left: 0; width: 100%; }
}
.module-parts { margin-bottom: 14px; }

/* D-036: Mapa - act -> obligation -> mechanism -> tool. */
.mm-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 6px 0 16px; }
.mm-step { position: relative; display: flex; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mm-step > .icon { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.mm-step p { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.mm-step .mm-step-count { font-size: 12.5px; color: var(--ink-3); }
.mm-step-n { position: absolute; top: -9px; left: 12px; padding: 0 7px; font: 500 11px/18px var(--mono); background: var(--ink); color: var(--surface); border-radius: 9px; }
.mm-step:not(:last-child)::after { content: '→'; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 14px; }
.mm-example { margin-bottom: 16px; }
.mm-path { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.mm-path li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: baseline; overflow-wrap: anywhere; }
.mm-path-label { font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.mm-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin-bottom: 10px; }
.mm-filter .card-note { margin: 0 0 8px; }
.mm-head, .mm-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1.3fr) minmax(0, 1.6fr); gap: 14px; }
.mm-head { padding: 0 16px 6px; font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.mm-card { padding: 0; }
.mm-row { padding: 12px 16px; border-top: 1px solid var(--line); }
.mm-row:first-child { border-top: 0; }
.mm-cell { min-width: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.mm-acts { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.mm-act { font: 500 12px/1 var(--mono); padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.mm-act span { color: var(--ink-3); }
.mm-act.is-active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.mm-act.is-active span { color: var(--surface); }
.mm-obligations summary { cursor: pointer; }
.mm-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.mm-tools .mm-list { margin: 0; }
.mm-tools li.is-na .tool-name, .mm-tools li.is-na .tool-flag { opacity: .55; text-decoration: line-through; }
.mm-mechanism .tag-row { margin-top: 4px; }
@media (max-width: 900px) {
  .mm-steps { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .mm-step:not(:last-child)::after { content: '↓'; right: auto; left: 50%; top: auto; bottom: -15px; transform: none; }
  .mm-head { display: none; }
  .mm-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .mm-path li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* Register fields (D-040): the act's fields on the provider card and the functions of the register. */
.ri-fields { margin: 0; }
.ri-fields [data-missing] dt { color: var(--warn); }
.ri-fields dd { min-width: 0; overflow-wrap: anywhere; }
.ri-instr summary { cursor: pointer; font-size: 12px; color: var(--ink-3); }
.ri-instr p { white-space: pre-line; font-size: 12.5px; color: var(--ink-2); margin: 4px 0 0; }
.ri-mode { margin: 0; }
.ri-fields-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 18px; }
.ri-fields-grid select { max-width: 100%; }
.ri-kind { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin: 8px 0 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; }
.ri-kind legend { font-size: 12px; color: var(--ink-3); padding: 0 4px; }
.ri-kind label { display: inline-flex; align-items: center; gap: 6px; }
.ri-changes { margin: 4px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--ink-2); }
.ri-fn-table td { vertical-align: top; }
.ri-fn-panel { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
@media (max-width: 640px) {
  .ri-fields { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .ri-fields dd { margin-bottom: 8px; }
}

.ri-open.link-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--accent); }
.ri-fn-table tr.is-muted td { color: var(--ink-3); }

/* Narzędzia DORA: three tools side by side (D-049) */
.public-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.public-card-action { margin-top: auto; align-self: flex-start; }
/* Three to a row: the search field takes the card's width and its button goes under it, like the classifier's. */
.public-grid-3 .ent-search { flex-direction: column; align-items: flex-start; }
.public-grid-3 .ent-search input { flex: none; width: 100%; }
@media (max-width: 1000px) { .public-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .public-grid-3 { grid-template-columns: minmax(0, 1fr); } }
/* Four tools (D-050): two by two; the search field in a column like in three. */
.public-grid-tools .ent-search { flex-direction: column; align-items: flex-start; }
.public-grid-tools .ent-search input { flex: none; width: 100%; }

/* Klasyfikacja incydentów ICT (D-049; one view since D-057, values from the design handoff "incident-classifier-v2"):
   the form on the left, the result as the answers come in beside it. The only colour literal is #c4bdb3 (outlines). */
.ic-ico { width: 16px; height: 16px; flex: none; }
.ic-link { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; transition: text-decoration-color .15s; }
.ic-link:hover { text-decoration-color: var(--ink); }
.ic-link[disabled] { opacity: .35; pointer-events: none; }
.ic-tag { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; background: var(--ink); color: var(--bg); white-space: nowrap; }
.cx button:focus-visible, .cx a:focus-visible, .cx input:focus-visible, .cx summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* glyphs and verdict marks: the state is in the shape and the label, never in colour alone */
.ic-g { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; box-sizing: border-box; font: 600 11px/1 var(--mono); }
.ic-g .ic-ico { width: 12px; height: 12px; stroke-width: 2.4; }
.ic-g.met { background: var(--ink); color: var(--bg); }
.ic-g.not { border: 1.5px solid #c4bdb3; color: var(--ink-3); }
.ic-g.unknown { border: 1.5px dashed var(--ink-2); color: var(--ink-2); }
/* not answered yet: a small dot, not a ring - nothing here to click; the answer is given on the switch */
.ic-g.empty::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.cx-row-main > .ic-g, .cx-row-txt { cursor: default; }
/* does not affect the result: a dot as well - never a ring that looks like something to tick */
.ic-g.moot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #c4bdb3; }
.ic-verdict.compact { display: inline-flex; align-items: center; gap: 8px; }
.ic-verdict.compact .ic-vtitle { font-weight: 500; font-size: 14px; }
.ic-vmark { width: 10px; height: 10px; border-radius: 2px; box-sizing: border-box; flex: none; }
.v-major .ic-vmark { background: var(--ink); box-shadow: 3px 3px 0 var(--accent); }
.v-not_major .ic-vmark, .v-not_applicable .ic-vmark { border: 1.5px solid var(--ink-2); }
.v-open .ic-vmark { border: 1.5px dashed var(--ink-2); }
/* page */
.cx-mode { display: inline-flex; padding: 3px; background: var(--bg-alt); border-radius: 999px; gap: 2px; }
.cx-mode button { all: unset; cursor: pointer; height: 34px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background .15s, color .15s; }
.cx-mode button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-nav-active); }
.cx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; align-items: start; }
.cx-form .notice { margin-bottom: 12px; }
.cx-progress { white-space: nowrap; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .05em; color: var(--ink-3); padding-bottom: 10px; }
.cx-legend { display: flex; gap: 14px; font-family: var(--font); letter-spacing: 0; font-size: 12.5px; }
.cx-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.cx-legend .ic-g { width: 14px; height: 14px; font-size: 9px; }
.cx-legend .ic-g .ic-ico { width: 9px; height: 9px; }
.cx-group { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; overflow: hidden; }
.cx-group-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.cx-group-h h2 { font-size: 17px; letter-spacing: -.02em; margin: 0; }
.cx-group-b { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.cx-group-n { font-size: 13.5px; color: var(--ink-2); padding: 4px 20px 0; margin: 0; }
.cx-collapsed { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 10px 20px 16px; font-size: 13.5px; color: var(--ink-3); }
.cx-rows { list-style: none; margin: 8px 0 0; padding: 0; }
.cx-row { border-top: 1px solid var(--line); padding: 12px 20px; }
.cx-rows .cx-row:first-child { border-top: 0; }
.cx-row-main { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.cx-row-t { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.cx-n { font-family: var(--mono); font-size: 11px; color: var(--ink-3); font-weight: 400; }
.cx-row-q { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; line-height: 1.4; text-wrap: pretty; }
.cx-i { all: unset; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--ink-3); transition: background .15s, color .15s; }
.cx-i .ic-ico { width: 14px; height: 14px; }
.cx-i:hover, .cx-i.on { background: var(--hover-wash); color: var(--ink); }
.cx-tri { position: relative; display: inline-flex; padding: 3px; background: var(--bg-alt); border-radius: 999px; gap: 2px; flex: none; }
/* A click on the mark or the question: a light frame runs once around the switch, then fades. */
@property --cx-sweep { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.cx-tri.cx-hint { animation: cx-wash 1.2s ease-out; }
.cx-tri.cx-hint::after { content: ""; position: absolute; inset: -4px; border-radius: 999px; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--cx-sweep), transparent 0deg, var(--ink-2) 70deg, transparent 150deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: cx-sweep 1.2s ease-in-out forwards; }
@keyframes cx-sweep { 0% { --cx-sweep: 0deg; opacity: 0; } 15% { opacity: 1; } 75% { opacity: 1; } 100% { --cx-sweep: 360deg; opacity: 0; } }
@keyframes cx-wash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 30% { box-shadow: 0 0 0 4px var(--hover-wash); } }
.cx-tri-b { all: unset; cursor: pointer; height: 30px; min-width: 44px; padding: 0 12px; box-sizing: border-box; text-align: center; border-radius: 999px; font-size: 13.5px; font-weight: 500; line-height: 30px; color: var(--ink-2); transition: background .15s, color .15s; }
.cx-tri-b:hover { color: var(--ink); }
.cx-tri-b.on { background: var(--ink); color: var(--bg); }
.cx-tri-b.unknown.on { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.cx-row.moot .cx-row-t, .cx-row.moot .cx-row-q { color: var(--ink-3); }
.cx-moot { font-family: var(--mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.cx-conds { margin: 10px 0 2px 32px; display: grid; gap: 6px; }
.cx-sub-l { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
.cx-cond { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 18px 44px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; line-height: 1.45; transition: border-color .15s, background .15s; }
.cx-cond:hover { border-color: #c4bdb3; }
.cx-cond.on { border-color: var(--ink); background: var(--bg); }
.cx-box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #c4bdb3; display: grid; place-items: center; box-sizing: border-box; margin-top: 1px; }
.cx-cond.on .cx-box { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.cx-box .ic-ico { width: 12px; height: 12px; stroke-width: 2.4; }
.cx-cond-l { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); padding-top: 1px; }
.cx-est { display: flex; align-items: center; gap: 8px; margin: 10px 0 0 32px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.cx-est input { accent-color: var(--ink); margin: 0; }
.cx-unk { display: grid; gap: 3px; margin: 10px 0 0 32px; padding: 9px 12px; border: 1px dashed #c4bdb3; border-radius: 10px; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.cx-unk b { font-weight: 500; color: var(--ink); }
.cx-info { margin: 10px 0 0 32px; padding: 12px 14px; border-radius: 10px; background: var(--bg-alt); font-size: 13.5px; color: var(--ink-2); line-height: 1.5; display: grid; gap: 8px; }
.cx-info p { margin: 0; }
.cx-info b { font-weight: 500; color: var(--ink); }
.cx-quote { color: var(--ink); }
.cx-quote span { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.cx-law summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink); }
.cx-law[open] summary { margin-bottom: 8px; }
.cx-law-unit { margin-bottom: 8px; font-size: 13px; }
.cx-law-unit p { margin: 2px 0 0; white-space: pre-line; }
.cx-law-meta { font-size: 12px; color: var(--ink-3); margin: 0; }
.cx-law-meta a, .cx-scope a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.cx-law-meta a .ic-ico { width: 12px; height: 12px; vertical-align: -1px; }
/* The contract card's removal: final, so marked in red. */
.tp-delete { border-color: var(--error-line); }
.tp-delete h2 { color: var(--error-ink); }
.cx-scope { font-size: 13px; color: var(--ink-3); margin-top: 16px; line-height: 1.5; max-width: 720px; }
/* the result panel */
.cx-panel { position: sticky; top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.cx-in-panel .cx-panel { top: 80px; }
.cx-panel-bar { display: none; }
.cx-panel-body { padding: 18px; }
.cx-p-label { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin: 16px 0 8px; }
.cx-p-label:first-child { margin-top: 0; }
.cx-verdict { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: 11px; background: var(--bg); }
.cx-verdict .ic-vmark { margin-top: 6px; }
.cx-verdict p { margin: 0; }
.cx-v-t { font-size: 18px; font-weight: 500; letter-spacing: -.02em; line-height: 1.25; }
.cx-v-d { font-size: 13px; color: var(--ink-2); margin-top: 4px !important; line-height: 1.45; text-wrap: pretty; }
.cx-v-r { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 8px !important; }
.cx-tally { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; font-size: 12.5px; color: var(--ink-2); }
.cx-tally > span { display: inline-flex; align-items: center; gap: 6px; }
.cx-tally .ic-g { width: 15px; height: 15px; font-size: 9px; }
.cx-tally .ic-g .ic-ico { width: 10px; height: 10px; }
.cx-tally > .cx-tally-thr { margin-left: auto; display: inline; }
.cx-tally b { font-weight: 600; color: var(--ink); }
.cx-miss { list-style: none; margin: 0; padding: 0; }
.cx-miss li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.cx-miss li:first-child { border-top: 0; }
.cx-miss-b { all: unset; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color .15s; }
.cx-miss-b:hover { text-decoration-color: var(--ink); }
.cx-next { display: grid; gap: 8px; margin-top: 16px; }
.cx-mom { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.cx-mom input { height: 36px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: 10px; font: 13.5px var(--font); color: var(--ink); background: var(--surface); min-width: 0; width: 100%; box-sizing: border-box; }
.cx-mom-r { display: flex; align-items: center; gap: 10px; }
.cx-due { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 12.5px; color: var(--ink-2); margin: 4px 0 0; }
.cx-due b { font-size: 15px; font-weight: 500; color: var(--ink); }
.cx-due small { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.cx-next .form-error { margin: 0; font-size: 12.5px; }
.cx-small { font-size: 12px; color: var(--ink-3); line-height: 1.45; margin: 0; }
.cx-est-note { font-size: 12.5px; color: var(--ink-2); margin-top: 12px; }
.cx-full { width: 100%; margin-top: 4px; box-sizing: border-box; }
.cx-full .ic-ico { width: 14px; height: 14px; }
.cx-panel-body > .cx-small { margin-top: 12px; }
.cx-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.cx-actions .ic-link { font-size: 13px; }
.cx-actions .ic-ico { width: 14px; height: 14px; }
.cx-privacy { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-3); margin: 12px 0 0; }
.cx-privacy .ic-ico { width: 14px; height: 14px; }
@media (max-width: 960px) {
  .cx-layout { grid-template-columns: minmax(0, 1fr); }
  .cx-panel, .cx-in-panel .cx-panel { position: sticky; top: auto; bottom: 12px; z-index: 20; box-shadow: var(--shadow-menu); }
  .cx-panel-bar { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; }
  .cx-panel-more { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
  .cx-panel-more .ic-ico { width: 14px; height: 14px; }
  .cx-panel.open .cx-panel-more .ic-ico { transform: rotate(180deg); }
  .cx-panel-body { display: none; border-top: 1px solid var(--line); max-height: 70vh; overflow-y: auto; }
  .cx-panel.open .cx-panel-body { display: block; }
}
@media (max-width: 640px) {
  .cx-row-main { grid-template-columns: 18px minmax(0, 1fr); }
  .cx-row-main > .cx-tri, .cx-row-main > .cx-moot { grid-column: 2; justify-self: start; }
  .cx-conds, .cx-est, .cx-unk, .cx-info { margin-left: 0; }
  .cx-cond { grid-template-columns: 18px minmax(0, 1fr); }
  .cx-cond-l { display: none; }
  .cx-group-h { flex-wrap: wrap; }
  .cx-progress { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .cx *, .cx *::before, .cx *::after { transition: none !important; }
  /* the frame only appears and fades - no movement */
  .cx-tri.cx-hint::after { background: var(--ink-2); animation: cx-fade 1.2s ease-out forwards; }
  @keyframes cx-fade { 0%, 100% { opacity: 0; } 25%, 70% { opacity: 1; } }
}
/* The printed page (D-059): one A4 sheet in place of the form - the result, every answer, the time limits. */
.cx-print { display: none; }
@media print {
  .public-top, .public-foot, .sidebar, .topbar, .sidebar-backdrop, .toasts, .dm, .dm-root, .tool-fb, .cx > .tool-head, .cx > .cx-layout { display: none !important; }
  .cx { padding: 0 !important; }
  /* the app's frame is a screen high - on paper it would add an empty page */
  body:has(.cx-print) .app { min-height: 0 !important; }
  .cx-print { display: block; font: 8.2pt/1.3 var(--font); color: var(--ink); }
  .cx-print, .cx-print * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cx-pr-head { display: flex; align-items: baseline; gap: 12pt; padding-bottom: 6pt; border-bottom: 1.2pt solid var(--ink); }
  .cx-pr-logo { font-weight: 600; font-size: 14pt; letter-spacing: -.045em; }
  .cx-pr-title { flex: 1; font-family: var(--mono); font-size: 7.6pt; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
  .cx-pr-title::before { content: ""; display: inline-block; width: 6pt; height: 6pt; border-radius: 1.5pt; background: var(--accent); margin-right: 6pt; vertical-align: 0; }
  .cx-pr-date { font-family: var(--mono); font-size: 7.6pt; color: var(--ink-3); }
  .cx-pr-verdict { display: grid; grid-template-columns: 10pt minmax(0, 1fr); gap: 8pt; margin: 8pt 0; padding: 8pt 10pt; border: 1pt solid var(--line); border-radius: 6pt; break-inside: avoid; }
  .cx-pr-verdict .ic-vmark { margin-top: 4pt; width: 8pt; height: 8pt; }
  .cx-pr-verdict.v-major .ic-vmark { background: var(--ink); border: 1.5pt solid var(--ink); box-shadow: 2pt 2pt 0 var(--accent); }
  .cx-pr-verdict p { margin: 0; }
  .cx-pr-v { font-size: 13pt; font-weight: 600; letter-spacing: -.02em; }
  .cx-pr-d { margin-top: 2pt !important; }
  .cx-pr-r { margin-top: 3pt !important; font-family: var(--mono); font-size: 7.4pt; color: var(--ink-2); }
  .cx-pr-table { width: 100%; border-collapse: collapse; }
  .cx-pr-table th { text-align: left; font-family: var(--mono); font-size: 7pt; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 0 6pt 3pt 0; border-bottom: 1pt solid var(--ink); }
  .cx-pr-table td { vertical-align: top; padding: 3pt 6pt 3pt 0; border-bottom: .6pt solid var(--line); }
  .cx-pr-table tr { break-inside: avoid; }
  .cx-pr-row td:last-child { width: 24%; }
  .cx-pr-row.has-sub td { border-bottom: 0; padding-bottom: 1pt; }
  .cx-pr-sub td { padding-top: 0; }
  .cx-pr-cs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5pt 12pt; }
  .cx-pr-n { width: 14pt; font-family: var(--mono); color: var(--ink-3); }
  .cx-pr-b { font-family: var(--mono); font-size: 7pt; color: var(--ink-3); }
  .cx-pr-q { font-size: 7.6pt; color: var(--ink-2); margin-top: 1pt; }
  .cx-pr-a strong { font-size: 9pt; }
  .cx-pr-c { font-size: 7.2pt; line-height: 1.25; padding-left: 8pt; text-indent: -8pt; }
  .cx-pr-table tr.is-moot td { color: var(--ink-3); }
  .cx-pr-note { margin: 5pt 0 0; font-size: 7.8pt; color: var(--ink-2); }
  .cx-pr-box { margin-top: 7pt; padding: 6pt 9pt; border: 1pt solid var(--line); border-radius: 6pt; break-inside: avoid; }
  .cx-pr-box p { margin: 1.5pt 0; }
  .cx-pr-l { font-family: var(--mono); font-size: 7pt; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3pt !important; }
  .cx-pr-foot { margin-top: 8pt; padding-top: 5pt; border-top: .6pt solid var(--line); font-size: 7pt; color: var(--ink-3); line-height: 1.4; }
}

/* Rejestr informacji na komputerze użytkownika (D-050): a page of its own, outside the panel. */
.lr-body { background: var(--bg); }
.lr-boot { padding: 48px 24px; color: var(--ink-3); }
.lr-head { padding-top: 8px; padding-bottom: 8px; }
.lr-head h1 { font-size: clamp(28px, 4.4vw, 44px); line-height: 1.08; letter-spacing: -0.04em; margin: 6px 0 16px; }
.lr-where { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.lr-where p { flex: 1 1 420px; font-size: 15px; color: var(--ink-2); }
.lr-where strong { color: var(--ink); font-weight: 600; }
.lr-where-link { font-size: 14.5px; font-weight: 500; text-decoration: underline; white-space: nowrap; }
.lr-filebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; }
.lr-filestate { font-size: 14px; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.lr-fileactions { display: flex; flex-wrap: wrap; gap: 8px; }
.lr-tabs { margin-top: 18px; }
.lr-notice { margin-top: 14px; margin-bottom: 0; background: var(--surface); border-color: var(--line); color: var(--ink); }
.lr-main { padding-top: 20px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 16px; }
.lr-main > .card, .lr-main > details.card { margin: 0; }
.lr-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.lr-card-head h2 { margin-right: auto; }
.lr-card-head .ri-mode { margin: 0; }
.lr-intro h2 { margin-bottom: 12px; }
.lr-points { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 10px; color: var(--ink-2); }
.lr-points strong { color: var(--ink); font-weight: 600; }
.lr-start { max-width: 560px; }
.lr-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lr-step { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.lr-step h3 { font-size: 18px; }
.lr-step-n { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.lr-step .tag { align-self: flex-start; }
.lr-add { margin: 12px 0 18px; padding: 16px; border-radius: var(--radius-sm); background: var(--bg-alt); }
.lr-table td { vertical-align: top; white-space: normal; }
.lr-break { overflow-wrap: anywhere; word-break: break-word; }
.lr-hash { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; word-break: break-all; }
.lr-pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12.5px; background: var(--bg-alt); padding: 12px; border-radius: var(--radius-sm); }
.lr-table tr.is-outside td { color: var(--status-error, #d92d20); font-weight: 500; }
.lr-activities summary, .lr-danger summary { cursor: pointer; font-weight: 500; }
.lr-activities .kv { margin-top: 12px; }
.lr-inline { max-width: 460px; }
kbd { font-family: var(--mono); font-size: 12.5px; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); }
@media (max-width: 760px) {
  .lr-body .wrap { padding-left: 16px; padding-right: 16px; }
  .lr-steps { grid-template-columns: minmax(0, 1fr); }
  .lr-fileactions .btn { flex: 1 1 auto; }
}

/* ------------------------------------------------------------------ Smart Data Control (31.10)
   The micropanel of a tool's data (Replicord Design System, variant 03; shared/dataMode.js): the mode and
   the state in one pill, the next step next to it, the rest in a popover; confirmations in a dialog. */
.dm { font-family: var(--font); color: var(--ink); position: relative; display: inline-flex; align-items: center; gap: 6px; }
.dm *, .dm-root * { box-sizing: border-box; }
.dm-ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dm-trigger { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13.5px; font-weight: 500; letter-spacing: -.005em; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
.dm-trigger:hover { border-color: #c4bdb3; }
.dm-trigger[aria-expanded="true"] { border-color: var(--ink); }
.dm-trigger:focus-visible { border-color: var(--ink); box-shadow: var(--shadow-focus); }
.dm-trigger .dm-ico { width: 15px; height: 15px; color: var(--ink-2); }
.dm-trigger .dm-chev { width: 14px; height: 14px; color: var(--ink-3); transition: transform .2s var(--ease-quiet); }
[aria-expanded="true"] .dm-chev { transform: rotate(180deg); }
.dm-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: #cfc9c1; }
.dm-dot.ok { background: var(--accent); box-shadow: inset 0 0 0 1px rgba(23, 18, 14, .22); }
.dm-dot.pending { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.dm-dot.error { background: var(--status-error); }
.dm-spin { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--line); border-top-color: var(--ink); animation: dm-spin .8s linear infinite; flex: none; }
@keyframes dm-spin { to { transform: rotate(360deg); } }
.dm-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; width: 340px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-menu); transform-origin: top right; animation: dm-in .16s var(--ease-quiet); text-align: left; }
@keyframes dm-in { from { opacity: 0; transform: translateY(-4px) scale(.985); } }
@keyframes dm-fade { from { opacity: 0; } }
.dm-modes { display: grid; gap: 2px; padding: 0 6px 6px; }
.dm-mode { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 30px minmax(0, 1fr) 16px; gap: 12px; align-items: start; padding: 10px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.dm-mode:hover { background: var(--hover-wash); }
.dm-mode[aria-checked="true"] { background: var(--bg); cursor: default; }
.dm-mode.is-off { opacity: .6; }
.dm-mode.is-off .dm-radio { visibility: hidden; }
.dm-mode:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.dm-mode .dm-mode-t, .dm-mode .dm-mode-d { display: block; }
.dm-mode-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-alt); color: var(--ink-2); flex: none; }
.dm-mode-ico .dm-ico { width: 15px; height: 15px; }
.dm-mode[aria-checked="true"] .dm-mode-ico, .dm-head .dm-mode-ico { background: var(--surface); box-shadow: var(--shadow-nav-active); color: var(--ink); }
.dm-mode-t { font-size: 14px; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; }
.dm-mode-d { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; margin-top: 2px; text-wrap: pretty; }
.dm-radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #c4bdb3; margin-top: 7px; display: grid; place-items: center; }
.dm-mode[aria-checked="true"] .dm-radio { border-color: var(--ink); background: var(--ink); }
.dm-mode[aria-checked="true"] .dm-radio:after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--surface); }
.dm-sep { height: 1px; background: var(--line); }
.dm-status { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 9px; align-items: start; padding: 14px 16px 10px; }
.dm-status .dm-dot, .dm-status .dm-spin { margin-top: 5px; }
.dm-status-t { font-size: 13.5px; font-weight: 500; line-height: 1.35; }
.dm-status-s { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; margin-top: 1px; overflow-wrap: anywhere; text-wrap: pretty; }
.dm-status.error .dm-status-s { color: var(--error-ink); }
.dm-actions { display: grid; padding: 2px 6px 8px; }
.dm-act { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 9px; font-size: 13.5px; cursor: pointer; color: var(--ink); transition: background .15s; }
.dm-act:hover { background: var(--hover-wash); }
.dm-act:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.dm-act .dm-ico { color: var(--ink-2); }
.dm-act[disabled] { opacity: .38; pointer-events: none; }
.dm-act.sep { margin-top: 4px; position: relative; }
.dm-act.sep:before { content: ""; position: absolute; left: 10px; right: 10px; top: -3px; height: 1px; background: var(--line); }
.dm-act-hint { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.dm-foot { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.dm-switch { all: unset; width: 28px; height: 16px; border-radius: 999px; background: #d3cdc5; position: relative; cursor: pointer; flex: none; transition: background .15s; }
.dm-switch:after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(23, 18, 14, .2); transition: transform .18s var(--ease-quiet); }
.dm-switch[aria-checked="true"] { background: var(--ink); }
.dm-switch[aria-checked="true"]:after { transform: translateX(12px); }
.dm-switch:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring), 0 0 0 1px var(--ink); }
.dm-link { all: unset; cursor: pointer; color: var(--ink-2); font-size: 12.5px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; transition: color .15s; }
.dm-link:hover { color: var(--ink); text-decoration-color: var(--ink); }
.dm-note { font-size: 12.5px; color: var(--ink-3); padding: 0 16px 14px; line-height: 1.45; text-wrap: pretty; }
.dm-file-note { display: flex; gap: 8px; align-items: flex-start; padding-top: 4px; }
.dm-file-note .dm-ico { flex: none; margin-top: 2px; }
.dm-privacy { display: flex; gap: 9px; align-items: flex-start; padding: 11px 16px 13px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); line-height: 1.45; background: #faf9f7; border-radius: 0 0 14px 14px; }
.dm-privacy .dm-ico { width: 14px; height: 14px; color: var(--ink-3); margin-top: 1px; }
.dm-group { display: inline-flex; align-items: center; height: 34px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); transition: border-color .15s; }
.dm-group:hover { border-color: #c4bdb3; }
.dm-group.open { border-color: var(--ink); }
.dm-group .dm-trigger { border: 0; height: 32px; background: transparent; border-radius: 999px; }
.dm-group .dm-trigger:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.dm-tsep { width: 1px; height: 14px; background: var(--line); flex: none; }
.dm-tstatus { font-weight: 400; color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; }
.dm-quick { all: unset; box-sizing: border-box; height: 32px; padding: 0 13px 0 11px; border-left: 1px solid var(--line); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; border-radius: 0 999px 999px 0; white-space: nowrap; transition: background .15s; }
.dm-quick:hover { background: var(--hover-wash); }
.dm-quick:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.dm-quick .dm-ico { width: 14px; height: 14px; color: var(--ink-2); }
/* On a phone the next step keeps its icon; its name is read out (aria-label). */
@media (max-width: 560px) { .dm-quick { padding: 0 11px; } }
.dm-head { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px 12px; }
.dm-head .dm-mode-d { margin-top: 1px; }
.dm-head .dm-link { align-self: start; margin-top: 6px; }
.dm-primary { padding: 2px 16px 12px; }
.dm-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.dm-btn .dm-ico { width: 15px; height: 15px; }
.dm-btn.dark { background: var(--ink); color: var(--bg); }
.dm-btn.dark:hover { background: #000; }
.dm-btn.ghost { border: 1.5px solid var(--line); color: var(--ink); }
.dm-btn.ghost:hover { border-color: var(--ink); }
.dm-btn.full { width: 100%; }
.dm-btn:active { transform: translateY(1px); }
.dm-btn:focus-visible { box-shadow: var(--shadow-focus), 0 0 0 1.5px var(--ink); }
.dm-scrim { position: fixed; inset: 0; background: rgba(23, 18, 14, .28); z-index: 100; display: grid; place-items: center; padding: 16px; animation: dm-fade .16s ease; }
.dm-dialog { width: min(440px, 100%); background: var(--surface); border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(23, 18, 14, .45); animation: dm-in .18s var(--ease-quiet); font-family: var(--font); color: var(--ink); text-align: left; }
.dm-dialog-b { padding: 22px 22px 4px; }
.dm-dialog-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.dm-dialog-eyebrow .dm-ico { width: 13px; height: 13px; }
.dm-dialog h3 { font-size: 19px; font-weight: 500; letter-spacing: -.025em; line-height: 1.25; margin: 0; }
.dm-dialog p { font-size: 14px; color: var(--ink-2); line-height: 1.5; margin: 8px 0 0; text-wrap: pretty; }
.dm-facts { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.dm-facts li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; line-height: 1.4; text-wrap: pretty; }
.dm-facts .dm-ico { color: var(--ink-2); margin-top: 1px; }
.dm-warn { margin-top: 14px; padding: 11px 12px; border-radius: 10px; background: var(--error-bg); border: 1px solid var(--error-line); font-size: 13px; color: var(--error-ink); display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; line-height: 1.45; }
.dm-warn .dm-link { color: var(--error-ink); font-size: 13px; }
.dm-dialog-f { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; padding: 18px 22px 20px; }
.dm-dialog-f .dm-btn { height: 38px; }
.dm-dialog-f .dm-cancel { margin-right: auto; }
@media (max-width: 820px) { .dm-hide-md { display: none; } }
@media (max-width: 560px) { .dm-hide-sm { display: none; } }
@media (prefers-reduced-motion: reduce) { .dm-pop, .dm-dialog, .dm-scrim { animation: none; } .dm-spin { animation-duration: 2.4s; } .dm-chev, .dm-switch:after { transition: none; } }

/* The working list of the entity search (Lista robocza) and where the micropanel sits. */
.public-top [data-dm-host] { display: inline-flex; }
.wl-empty { display: flex; align-items: center; gap: 10px; padding: 26px 0 10px; color: var(--ink-2); font-size: 14.5px; border-top: 1px dashed var(--line); }
.wl-restore { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 16px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); }
.wl-restore > .icon { width: 18px; height: 18px; color: var(--ink-2); }
.wl-restore strong { display: block; font-weight: 500; font-size: 14.5px; }
.wl-restore span { font-size: 13px; color: var(--ink-2); }
.wl-restore-a { display: flex; gap: 8px; }
.wl-table td { vertical-align: middle; }
.wl-table td:first-child { white-space: normal; min-width: 200px; }
.wl-src { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.ent-local { border: 1.5px solid var(--ink); }
.ent-results + .ent-results { margin-top: 14px; }
@media (max-width: 560px) { .wl-restore { grid-template-columns: 18px minmax(0, 1fr); } .wl-restore-a { grid-column: 1 / -1; } }

/* Walidator SPR-PF-26 (D-062; the data panel of every tool since D-063): the drop field, the verdict, the counts as filters, the findings. */
.rv-privacy { display: flex; gap: 8px; align-items: center; margin: 10px 2px 0; font-size: 12px; color: var(--ink-3); }
.rv-ico-s { width: 14px; height: 14px; }
.rv-again-hint { align-self: center; font-size: 12.5px; color: var(--ink-3); }
.rv-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rv-drop { position: relative; display: grid; justify-items: center; gap: 8px; padding: 44px 20px; border: 1.5px dashed #c4bdb3; border-radius: 16px; background: var(--surface); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.rv-drop:hover, .rv-drop.is-over, .rv-drop:focus-within { border-color: var(--ink); background: var(--bg); }
.rv-drop.is-busy { cursor: progress; opacity: .7; }
.rv-drop-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); }
.rv-ico { width: 20px; height: 20px; }
.rv-drop-t { font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.rv-drop-d { font-size: 13.5px; color: var(--ink-2); max-width: 520px; line-height: 1.5; }
.rv-drop-btn { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.rv-config { margin: 12px 2px 0; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.rv-config.is-error { color: var(--err); }
.rv-cached { color: var(--warn); }
.rv-result { display: grid; gap: 18px; }
.rv-file { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.rv-file-name { margin: 0; font-weight: 500; word-break: break-all; }
.rv-file-meta { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.rv-verdict { margin: 0; padding: 12px 16px; border-radius: 12px; font-size: 15px; line-height: 1.5; }
.rv-verdict.is-bad { background: var(--err-bg); color: var(--err); }
.rv-verdict.is-ok { background: var(--ok-bg); color: var(--ok); }
.rv-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rv-count { all: unset; box-sizing: border-box; display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font-size: 13px; color: var(--ink-2); transition: border-color .15s, background .15s; }
.rv-count:hover, .rv-count:focus-visible { border-color: var(--ink); }
.rv-count.is-on { border-color: var(--ink); background: var(--bg); box-shadow: inset 0 0 0 1px var(--ink); }
.rv-n { font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.rv-blocking .rv-n, .rv-business .rv-n { color: var(--err); }
.rv-warning .rv-n { color: var(--warn); }
.rv-group h2 { font-size: 16px; margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline; }
.rv-h-n { font-family: var(--mono); font-size: 12px; color: var(--ink-3); font-weight: 400; }
.rv-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.rv-f { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.rv-f > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 14px; cursor: pointer; list-style: none; }
.rv-f > summary::-webkit-details-marker { display: none; }
.rv-f[open] > summary { border-bottom: 1px solid var(--line); }
.rv-f-main { display: grid; gap: 2px; min-width: 0; }
.rv-f-t { font-weight: 500; font-size: 14px; }
.rv-f-m { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; overflow-wrap: anywhere; }
.rv-f-where { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; padding-top: 2px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.rv-f-d { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 6px 14px; margin: 0; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; }
.rv-f-d dt { color: var(--ink-3); }
.rv-f-d dd { margin: 0; overflow-wrap: anywhere; }
.rv-mono { font-family: var(--mono); font-size: 12px; }
.rv-empty { color: var(--ink-2); margin: 0; }
.rv-checked { font-size: 13.5px; }
.rv-checked summary { cursor: pointer; color: var(--ink-2); }
.rv-checked ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 3px; columns: 2; }
.rv-cat { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.rv-good { color: var(--ok); }
.rv-bad { color: var(--err); }
.rv-note { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.rv-admin { margin: 16px 0 0; font-size: 13.5px; }
@media (max-width: 720px) {
  .rv-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rv-f > summary { grid-template-columns: minmax(0, 1fr); }
  .rv-f-where { white-space: normal; overflow-wrap: anywhere; max-width: none; }
  .rv-f .tag { justify-self: start; }
  .rv-f-d { grid-template-columns: minmax(0, 1fr); }
  .rv-f-d dt { margin-top: 4px; }
  .rv-checked ul { columns: 1; }
}
@media print { .rv-drop, .rv-privacy, .rv-counts, .form-actions, .public-top, .tool-fb { display: none !important; } .rv-f > .rv-f-d { display: grid !important; } }

/* Formularze KNF (D-062): the administrator's page of the report validator's forms, rules and periods. */
.rf-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; counter-reset: rf; margin: 0 0 22px; padding: 0; }
.rf-steps li { counter-increment: rf; font-size: 13px; padding: 6px 12px 6px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.rf-steps li::before { content: counter(rf); display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 50%; background: var(--accent); font-size: 11.5px; font-weight: 600; }
.rf-form { margin-bottom: 40px; }
.rf-form h2 { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.rf-name { font-size: 14px; font-weight: 400; color: var(--ink-2); }
.rf-form h3 { margin: 26px 0 10px; font-size: 16px; }
.rf-detail h4 { margin: 18px 0 8px; font-size: 14.5px; }
.rf-now { padding: 12px 16px; border-radius: 12px; background: var(--bg-alt); font-size: 14px; }
.rf-table { width: 100%; font-size: 13.5px; }
.rf-table td { vertical-align: top; }
.rf-table tr.is-active td { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.rf-table tr.is-old td { color: var(--ink-3); }
.rf-sub { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.rf-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.rf-actions .btn-sm, .rf-table .btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.rf-detail { margin-top: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.rf-detail h3 { margin: 0 0 4px; }
.rf-need { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 13.5px; }
.rf-test { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; font-size: 13.5px; }
.rf-test ul { margin: 4px 0 0 18px; padding: 0; font-size: 12.5px; color: var(--ink-2); }
.rf-rules select { font-size: 13px; padding: 4px 6px; }
.rf-json textarea { width: 100%; font-family: var(--mono); font-size: 12px; }
.rf-kri { margin-top: 16px; }
.rf-kri summary, .rf-add summary { cursor: pointer; font-weight: 500; margin: 8px 0; }
.rf-period, .rf-upload, .rf-publish { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 14px; align-items: end; padding: 12px 0; }
.rf-wide { grid-column: 1 / -1; }
.rf-period .form-actions, .rf-upload .form-actions, .rf-publish .form-actions { grid-column: 1 / -1; }
@media (max-width: 720px) { .rf-table { display: block; overflow-x: auto; } }
.btn-ico { width: 16px; height: 16px; margin-right: 6px; flex: none; }
.rv-count.is-zero .rv-n { color: var(--ink-3); }

/* ------------------------------------------------------------------ Baza wiedzy (D-065)
   Pages rendered on the server (src/knowledgeBase/pages.ts) and the "Baza wiedzy" menu and home section.
   The signature: a reference to the law is marked like a highlighter (the accent), the end of a section
   carries the path "Wiedza → Przepis → Działanie", the contents mark where the law (square) and a tool
   (dot) are. Long reading: one column of ~68 characters, 17.5 px, generous spacing, hairlines - no boxes
   around everything. */
.kb-page { background: var(--bg); }
/* the search hides cards and groups with [hidden] - stronger than their own display */
.kb-page [hidden] { display: none !important; }
.kb-skip { position: absolute; left: -10000px; top: 8px; z-index: 80; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.kb-skip:focus { left: 12px; }
.kb-top-menus { display: contents; }
.kb-main { padding-bottom: 72px; }
.kb-k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; }
.kb-ico, .kb-ico-s { width: 16px; height: 16px; flex: none; }
.kb-ico-s { width: 14px; height: 14px; margin-left: 6px; }
.kb-arrow { width: 16px; height: 16px; flex: none; transition: transform .15s var(--ease-quiet); }
.kb-preview-bar { background: var(--accent); color: var(--accent-ink); text-align: center; font-size: 14px; padding: 8px 16px; }
.kb-preview-bar a { text-decoration: underline; margin-left: 8px; }

/* the head of an article */
.kb-crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--ink-3); padding-top: 3vh; }
.kb-crumbs a:hover { color: var(--ink); }
.kb-head { max-width: 900px; padding: 22px 0 36px; }
.kb-head .eyebrow { margin: 0 0 14px; }
.kb-head h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.06; letter-spacing: -0.04em; }
.kb-lead { font-size: clamp(18px, 2vw, 20.5px); line-height: 1.5; color: var(--ink-2); margin-top: 20px; max-width: 820px; }
.kb-meta { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 26px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); }
.kb-meta div { display: grid; gap: 3px; }
.kb-meta dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.kb-meta dd { margin: 0; font-size: 14.5px; }

/* two columns: the contents on the left, the text */
.kb-layout { display: grid; grid-template-columns: 250px minmax(0, 720px); gap: 64px; align-items: start; }
.kb-toc { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; padding: 0 4px 12px 0; scrollbar-width: thin; }
.kb-toc-box > summary { list-style: none; cursor: default; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.kb-toc-box > summary::-webkit-details-marker { display: none; }
.kb-toc-list, .kb-toc-list ol { list-style: none; margin: 0; padding: 0; }
.kb-toc-list > li { border-bottom: 1px solid var(--line); }
.kb-toc-list a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 9px 0; font-size: 13.5px; line-height: 1.35; color: var(--ink-2); transition: color .15s; }
.kb-toc-list a:hover, .kb-toc-list a.is-active { color: var(--ink); }
.kb-toc-list a.is-active .kb-toc-t { font-weight: 500; }
.kb-toc-n { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.kb-toc-list a.is-active .kb-toc-n { color: var(--ink); }
.kb-toc-list ol { padding: 0 0 8px 30px; }
.kb-toc-list ol a { grid-template-columns: minmax(0, 1fr); padding: 4px 0; font-size: 12.5px; }

/* the text */
.kb-body { font-size: 17.5px; line-height: 1.7; min-width: 0; }
.kb-body p, .kb-body ul, .kb-body ol, .kb-body blockquote { margin: 0 0 1.05em; }
.kb-body ul, .kb-body ol { padding-left: 1.3em; }
.kb-body li { margin: .35em 0; padding-left: .15em; }
.kb-body li::marker { color: var(--ink-3); }
.kb-body strong { font-weight: 600; }
.kb-body code { font-size: .88em; background: var(--bg-alt); padding: 1px 5px; border-radius: 4px; }
.kb-body blockquote { border-left: 2px solid var(--ink); padding: 2px 0 2px 18px; color: var(--ink-2); }
.kb-body a:not(.kb-ref):not(.kb-chip):not(.kb-tool):not(.btn) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.kb-intro { font-size: 18.5px; }
.kb-intro > p:first-child::first-letter { font-weight: 500; }
.kb-section { scroll-margin-top: 20px; }
.kb-body h2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.18; margin: 64px 0 20px; padding-top: 26px; border-top: 1px solid var(--ink); scroll-margin-top: 20px; }
.kb-sec-n { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 10px; font-weight: 400; }
.kb-body h3 { font-size: 20px; line-height: 1.3; margin: 36px 0 12px; scroll-margin-top: 20px; }
.kb-body h4 { font-size: 17.5px; margin: 26px 0 8px; }

/* a reference to the law in the text: a highlighter stroke that fills on hover and while its panel is open */
.kb-ref { background-image: linear-gradient(var(--accent), var(--accent)); background-repeat: no-repeat; background-size: 100% .34em; background-position: 0 88%; padding: 0 1px; border-radius: 2px; transition: background-size .18s var(--ease-quiet); cursor: pointer; white-space: nowrap; }
.kb-ref:hover, .kb-ref:focus-visible, .kb-ref.is-active { background-size: 100% 100%; outline: none; }
.kb-ref-ext::after, .kb-chip-ext::after { content: '↗'; font-size: .8em; margin-left: 2px; color: var(--ink-3); }
.kb-ref-tool { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.kb-ref-tool::after { content: ' →'; }
.kb-ref-missing { border-bottom: 1px dashed var(--status-error); }

/* what the law requires, set apart from reading and practice */
.kb-callout { margin: 30px 0; padding: 18px 22px 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 16.5px; line-height: 1.65; }
.kb-callout > .kb-k { display: inline-block; margin-bottom: 8px; }
.kb-callout-title { font-weight: 500; margin-bottom: 8px !important; }
.kb-callout-wymog { border-left: 3px solid var(--ink); border-radius: 4px 12px 12px 4px; }
.kb-callout-wymog > .kb-k { color: var(--ink); }
.kb-callout-praktyka { border-left: 3px solid var(--accent); border-radius: 4px 12px 12px 4px; }
.kb-callout-interpretacja { background: transparent; border-style: dashed; border-color: #c4bdb3; }
.kb-callout-przyklad { background: var(--bg-alt); border-color: transparent; }
.kb-callout-uwaga { background: transparent; }

/* tables */
.kb-table { margin: 24px 0 28px; overflow-x: auto; border-top: 1px solid var(--ink); }
.kb-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.kb-table th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.kb-table td { padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.kb-table .kb-ref { white-space: nowrap; }

/* a checklist from the article (only in this window) */
.kb-check { margin: 30px 0; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); padding: 18px 20px 14px; }
.kb-check-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.kb-check-count { font-family: var(--mono); font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--bg-alt); color: var(--ink); transition: background .2s; }
.kb-check.is-complete .kb-check-count { background: var(--accent); }
.kb-check-title { font-size: 17px; font-weight: 500; line-height: 1.4; margin: 10px 0 8px !important; }
.kb-check-list { list-style: none; margin: 0 !important; padding: 0 !important; }
.kb-check-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; padding: 11px 0; margin: 0; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.5; }
.kb-check-list input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 2px 0 0; border: 1.5px solid var(--ink-3); border-radius: 6px; background: var(--surface); cursor: pointer; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.kb-check-list input:hover { border-color: var(--ink); }
.kb-check-list input:checked { background: var(--accent); border-color: var(--ink); }
.kb-check-list input:checked::after { content: ''; width: 9px; height: 5px; border: solid var(--ink); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.kb-check-list input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.kb-check-list label { cursor: pointer; }
.kb-check-list li.is-done label { color: var(--ink-2); }
.kb-check-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 10px; border-top: 1px solid var(--line); }
.kb-check-foot p { font-size: 12.5px !important; line-height: 1.45; color: var(--ink-3); margin: 0 !important; }
.kb-check-copy { all: unset; flex: none; cursor: pointer; font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }
.kb-check-copy:hover { border-color: var(--ink); }
.kb-check-copy:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* the path at the end of a section: Wiedza → Przepis → Działanie */

/* a unit as a chip: the act on black, the unit */
.kb-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kb-chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 3px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); font-size: 13.5px; line-height: 1.3; color: var(--ink); white-space: nowrap; transition: border-color .15s, background .15s; }
a.kb-chip:hover, a.kb-chip:focus-visible, .kb-chip.is-active { border-color: var(--ink); background: var(--accent); outline: none; }
.kb-chip-act { font-family: var(--mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; background: var(--ink); color: var(--bg); padding: 3px 6px; border-radius: 5px; }
.kb-chip-none { opacity: .55; }

/* a tool */
.kb-tool { display: grid; grid-template-columns: 34px minmax(0, 1fr) 16px; gap: 12px; align-items: center; padding: 10px 14px 10px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); transition: border-color .15s, background .15s; }
.kb-tool:hover, .kb-tool:focus-visible { border-color: var(--ink); background: var(--surface); outline: none; }
.kb-tool:hover .kb-arrow { transform: translateX(3px); }
.kb-tool-tile { width: 34px; height: 34px; border-radius: 9px; background: var(--bg-alt); display: grid; place-items: center; transition: background .15s; }
.kb-tool:hover .kb-tool-tile { background: var(--accent); }
.kb-tool-txt { display: grid; gap: 1px; min-width: 0; }
.kb-tool-t { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.kb-tool-d { font-size: 13px; line-height: 1.4; color: var(--ink-2); }

/* questions, the law of the whole article, tools, related */
.kb-faq-item { border-bottom: 1px solid var(--line); }
.kb-faq-item:first-of-type { border-top: 1px solid var(--line); }
.kb-faq-item > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: 16px; align-items: center; padding: 16px 0; }
.kb-faq-item > summary::-webkit-details-marker { display: none; }
.kb-faq-item > summary::after { content: '+'; font-family: var(--mono); font-size: 20px; color: var(--ink-3); text-align: center; transition: transform .2s; }
.kb-faq-item[open] > summary::after { transform: rotate(45deg); color: var(--ink); }
.kb-faq-item h3 { font-size: 17.5px; margin: 0; line-height: 1.4; }
.kb-faq-a { padding: 0 0 8px; font-size: 16.5px; }
.kb-basis-lead { font-size: 15px !important; color: var(--ink-2); }
.kb-tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kb-tools-note { font-size: 13px !important; color: var(--ink-3); margin-top: 10px !important; }
.kb-disclaimer { margin-top: 56px !important; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px !important; line-height: 1.55; color: var(--ink-3); }
.kb-related { margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--ink); }
.kb-related h2 { font-size: 24px; margin-bottom: 20px; }

/* the panel with the wording of a provision */
.kb-prov { position: fixed; inset: 0 0 0 auto; z-index: 60; width: min(470px, 100vw); pointer-events: none; }
.kb-prov-scrim { display: none; }
.kb-prov-in { pointer-events: auto; position: absolute; inset: 0; overflow: auto; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -24px 0 60px -30px rgba(23, 18, 14, .35); padding: 22px 28px 32px; transform: translateX(104%); transition: transform .22s var(--ease-quiet); outline: none; }
.kb-prov.is-open .kb-prov-in { transform: none; }
.kb-prov-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.kb-prov-x { all: unset; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); }
.kb-prov-x:hover, .kb-prov-x:focus-visible { background: var(--hover-wash); color: var(--ink); }
.kb-prov-x .icon { width: 18px; height: 18px; }
.kb-prov h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 24px; line-height: 1.2; }
.kb-prov h2 .kb-chip-act { font-size: 11px; }
.kb-prov-art { margin-top: 8px; font-weight: 500; font-size: 15px; }
.kb-prov-title { margin-top: 4px; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); }
.kb-prov-text { margin: 18px 0 0; padding: 16px 0 4px; border-top: 1px solid var(--ink); font-size: 15.5px; line-height: 1.62; }
.kb-prov-text p { margin: 0 0 .7em; }
.kb-prov-li { padding-left: 20px; }
.kb-prov-ver { font-family: var(--mono); font-size: 11px; line-height: 1.5; color: var(--ink-3); padding-top: 10px; border-top: 1px solid var(--line); }
.kb-prov-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.kb-prov-act { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--line); display: grid; gap: 8px; }
.kb-prov-act .kb-tool { grid-template-columns: minmax(0, 1fr) 16px; }
.kb-prov-note { margin-top: 18px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }

/* the catalogue */
.kb-hub-head { padding-top: 5vh; padding-bottom: 34px; }
.kb-hub-head .eyebrow { margin: 18px 0 14px; }
.kb-hub-head h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.04; letter-spacing: -0.045em; max-width: 960px; }
.kb-hub-lead { font-size: clamp(17.5px, 2vw, 20px); line-height: 1.5; color: var(--ink-2); margin-top: 20px; max-width: 780px; }
.kb-flow { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
.kb-flow li { display: grid; gap: 6px; padding-top: 16px; border-top: 1px solid var(--ink); font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.kb-flow strong { font-size: 19px; font-weight: 500; color: var(--ink); letter-spacing: -.02em; }
.kb-flow-n { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.kb-flow li:nth-child(2) .kb-flow-n::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 1.5px; background: var(--accent); box-shadow: 0 0 0 1px var(--ink); }
.kb-flow li:nth-child(3) .kb-flow-n::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--ink); }
.kb-hub { padding-bottom: 24px; }
.kb-hub-bar { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kb-search { display: flex; align-items: center; gap: 10px; flex: 1 1 320px; max-width: 460px; height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.kb-search .kb-ico { color: var(--ink-3); }
.kb-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); padding: 0; height: auto; box-shadow: none; }
.kb-search:focus-within { border-color: var(--ink); box-shadow: var(--shadow-focus); }
.kb-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-cat { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; font-size: 14.5px; color: var(--ink-2); border: 1px solid transparent; transition: border-color .15s, background .15s, color .15s; }
.kb-cat span { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.kb-cat:hover { color: var(--ink); border-color: var(--line); }
.kb-cat.is-current { background: var(--ink); color: var(--bg); }
.kb-cat.is-current span { color: var(--on-dark-2); }
.kb-cat.is-empty { color: var(--ink-3); }
.kb-featured { margin-top: 32px; display: grid; gap: 12px; }
.kb-groups { display: grid; gap: 36px; margin-top: 36px; }
.kb-hub .kb-group-h { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; margin-bottom: 14px; }
.kb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.kb-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, transform .15s var(--ease-quiet); }
.kb-card:hover { border-color: var(--ink); }
.kb-card-eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.kb-card h3 { font-size: 20px; line-height: 1.25; letter-spacing: -.025em; }
.kb-card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: 14px; }
.kb-card h3 a:focus-visible { outline: none; }
.kb-card:focus-within { border-color: var(--ink); box-shadow: var(--shadow-focus); }
.kb-card-lead { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.kb-card-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: auto; padding-top: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.kb-card-law, .kb-card-act { display: inline-flex; gap: 6px; align-items: center; }
.kb-card-lg { padding: 30px 32px 24px; }
.kb-card-lg h3 { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; max-width: 860px; }
.kb-card-lg .kb-card-lead { font-size: 16.5px; max-width: 820px; }
.kb-none { margin-top: 32px; color: var(--ink-2); }
.kb-none a { text-decoration: underline; color: var(--ink); }
.kb-soon { list-style: none; margin: 40px 0 0; padding: 16px 0 0; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14px; color: var(--ink-3); }
.kb-soon strong { color: var(--ink-2); font-weight: 500; }
.kb-foot { margin-top: 32px; }
.kb-foot-links { display: inline-flex; flex-wrap: wrap; gap: 8px 20px; }

/* the home page */
.kb-home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; }
.kb-home-all, .kb-home-go { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; font-size: 15px; }
.kb-home-all span, .kb-home-go span { transition: transform .15s var(--ease-quiet); }
.kb-home-all:hover span, .kb-home-card:hover .kb-home-go span { transform: translateX(3px); }
.kb-home-card { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; padding: 26px 26px 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: border-color .15s; }
.kb-home-card:hover, .kb-home-card:focus-visible { border-color: var(--ink); outline: none; }
.kb-home-txt { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kb-home-t { font-size: 22px; font-weight: 500; line-height: 1.22; letter-spacing: -.03em; }
.kb-home-d { font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.kb-home-go { margin-top: 6px; }
.kb-home-card.is-lg { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px 48px; padding: 32px; }
.kb-home-card.is-lg .kb-home-t { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; }
.kb-home-flow { list-style: none; margin: 0; padding: 0; display: grid; align-content: center; gap: 0; }
.kb-home-flow li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.kb-home-flow li:last-child { border-bottom: 1px solid var(--line); }
.kb-home-flow b { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--ink-3); grid-row: span 2; padding-top: 4px; }
.kb-home-flow strong { font-weight: 500; font-size: 17px; }
.kb-home-flow span { font-size: 14px; color: var(--ink-2); }
.kb-home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.kb-home-grid .kb-home-card { margin-top: 0; }

/* the "Baza wiedzy" menu (the frame and the categories as in "Narzędzia") */
@media (min-width: 721px) { .kbm-panel { width: 700px; } }
.kbm-list { padding: 8px 8px 10px; min-width: 0; }
.kbm-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.kbm-item { display: grid; gap: 3px; padding: 11px 12px; border-radius: 12px; color: var(--ink); transition: background .15s; }
.kbm-item:hover, .kbm-item:focus-visible, .kbm-item.is-current { background: var(--bg); outline: none; }
.kbm-topic { font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.kbm-t { font-size: 15px; font-weight: 500; letter-spacing: -.015em; line-height: 1.3; }
.kbm-d { font-size: 13px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kbm-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.kbm-flow i { font-style: normal; color: var(--ink-3); }

@media (max-width: 1100px) {
  .kb-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 1023px) {
  .kb-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kb-toc { position: static; max-height: none; overflow: visible; margin-bottom: 28px; }
  .kb-toc-box { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 16px; }
  .kb-toc-box > summary { cursor: pointer; padding: 14px 0; border-bottom: 0; display: flex; justify-content: space-between; }
  .kb-toc-box > summary::after { content: '+'; font-size: 16px; }
  .kb-toc-box[open] > summary { border-bottom: 1px solid var(--line); }
  .kb-toc-box[open] > summary::after { content: '−'; }
  .kb-toc-list > li:last-child { border-bottom: 0; }
  .kb-home-card.is-lg { grid-template-columns: minmax(0, 1fr); }
  .kb-home-grid { grid-template-columns: minmax(0, 1fr); }
}
/* a phone: the top in two lines (the logo and signing in; the menus), the panel of a provision from the bottom */
@media (max-width: 640px) {
  .public-top { flex-wrap: wrap; row-gap: 4px; }
  .public-top::after { content: ''; order: 2; flex-basis: 100%; height: 0; }
  .public-top > .tm, .kb-top-menus > .tm, .kb-top-menus > .public-top-link { order: 3; }
  .public-top > .tm-kb, .kb-top-menus > .tm-kb { margin-left: -12px; }
  .tm-scrim { inset: 128px 0 0; }
  .kb-body { font-size: 17px; }
  .kb-body h2 { margin-top: 48px; }
  .kb-flow { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .kb-tools-grid { grid-template-columns: minmax(0, 1fr); }
  .kb-card-lg { padding: 22px; }
  .kb-cards { grid-template-columns: minmax(0, 1fr); }
  .kb-chip { white-space: normal; }
  .kb-prov { inset: auto 0 0 0; width: auto; height: 100%; }
  .kb-prov-scrim { display: block; pointer-events: auto; position: absolute; inset: 0; background: rgba(23, 18, 14, .28); opacity: 0; transition: opacity .2s; }
  .kb-prov.is-open .kb-prov-scrim { opacity: 1; }
  .kb-prov-in { inset: auto 0 0 0; max-height: 84vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 14px 20px 28px; transform: translateY(104%); }
  .kb-meta { gap: 10px 22px; }
}
@media (prefers-reduced-motion: reduce) { .kb-prov-in, .kb-ref, .kb-arrow { transition: none; } }
@media print {
  .public-top, .kb-toc, .kb-prov, .kb-foot, .kb-skip, .kb-check-copy, .kb-related, .kb-preview-bar { display: none !important; }
  .kb-layout { display: block; }
  .kb-ref { background: none; text-decoration: underline; }
  .kb-faq-item:not([open]) .kb-faq-a { display: block; }
}

/* Baza wiedzy · redakcja (D-065): the administrator's editor - the article on the left, saving, publishing and the
   check on the right; each section with its "Podstawa prawna" and "Narzędzie" under the text. */
.page-sub { color: var(--ink-2); font-size: 14.5px; margin-top: 8px; max-width: 760px; }
.kba-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kba-table .kba-title { font-weight: 500; white-space: normal; }
.kba-table td:first-child { white-space: normal; min-width: 320px; }
.kba-slug { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.kba-pending { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.kba-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.kba-main { display: grid; gap: 22px; min-width: 0; }
.kba-block { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; display: grid; gap: 14px; }
.kba-block > h2 { font-size: 18px; display: flex; gap: 8px; align-items: center; }
.kba-field textarea { width: 100%; box-sizing: border-box; font: 400 15px/1.55 var(--font); padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); resize: vertical; }
.kba-field textarea.kba-md { font: 400 13.5px/1.6 var(--mono); }
.kba-field textarea:focus { outline: none; border-color: var(--ink); box-shadow: var(--shadow-focus); }
.kba-field select { height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 10px; font: inherit; font-size: 14.5px; }
.kba-hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.kba-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kba-section { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; margin: 0; display: grid; gap: 12px; position: relative; }
.kba-section legend { font-weight: 500; font-size: 14px; padding: 0 6px; display: flex; gap: 8px; align-items: baseline; }
.kba-n { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.kba-section-tools { position: absolute; top: -14px; right: 12px; display: flex; gap: 4px; background: var(--surface); padding: 0 4px; }
.kba-section-tools .btn { height: 28px; padding: 0 10px; font-size: 13px; }
.kba-wpn { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; padding: 12px; border-radius: 10px; background: var(--bg); }
.kba-wpn-col { display: grid; gap: 8px; align-content: start; min-width: 0; }
.kba-wpn-h { font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.kba-link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) 32px; gap: 6px; align-items: center; }
.kba-link [data-k=note] { grid-column: 1 / 3; }
.kba-link .kba-x { grid-row: 1; grid-column: 3; all: unset; box-sizing: border-box; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--ink-3); cursor: pointer; }
.kba-link .kba-x:hover, .kba-link .kba-x:focus-visible { background: var(--hover-wash); color: var(--ink); }
.kba-link .kba-x .icon { width: 16px; height: 16px; }
.kba-link select, .kba-link input { height: 36px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0 8px; font: inherit; font-size: 13.5px; color: var(--ink); }
.kba-link input:focus, .kba-link select:focus { outline: none; border-color: var(--ink); }
.kba-wpn-col .btn { justify-self: start; }
.kba-faq { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0; display: grid; gap: 10px; }
.kba-faq .btn { justify-self: start; }
.kba-side { min-width: 0; align-self: stretch; }
.kba-sticky { position: sticky; top: 16px; display: grid; gap: 14px; }
.kba-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kba-saved { font-size: 13px; color: var(--ink-2); }
.kba-dirty { font-size: 13px; color: var(--ink); font-weight: 500; }
.kba-check { border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.45; border: 1px solid var(--line); background: var(--surface); }
.kba-check.has-errors { border-color: var(--error-line); background: var(--error-bg); }
.kba-check-h { font-weight: 500; display: grid; gap: 2px; }
.kba-check-h span { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.kba-check ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.kba-errors { color: var(--error-ink); }
.kba-warnings { color: var(--ink-2); }
.kba-publish { display: grid; gap: 10px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.kba-publish .btn { justify-self: start; }
.kba-check-line { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.4; }
.kba-check-line input { margin-top: 2px; }
.kba-side-block { padding: 16px; gap: 10px; }
.kba-side-block > h2 { font-size: 15px; }
.kba-side-block .kba-link { grid-template-columns: minmax(0, 1fr) 32px; }
.kba-side-block .kba-link [data-k=note] { grid-column: 1 / 2; }
.kba-side-block .kba-link .kba-x { grid-column: 2; }
.kba-help { font-size: 13px; color: var(--ink-2); background: var(--bg); border-radius: 10px; padding: 10px 14px; }
.kba-help summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.kba-help ul { margin: 8px 0; padding-left: 18px; display: grid; gap: 4px; }
.kba-help code { font-size: 12px; background: var(--surface); padding: 1px 4px; border-radius: 4px; }
.kba-revisions { font-size: 13px; color: var(--ink-2); }
.kba-revisions summary { cursor: pointer; }
.kba-revisions ul { margin: 6px 0 0; padding-left: 16px; display: grid; gap: 3px; }
@media (max-width: 1100px) {
  .kba-grid { grid-template-columns: minmax(0, 1fr); }
  .kba-sticky { position: static; }
  .kba-wpn { grid-template-columns: minmax(0, 1fr); }
}

/* P-027, P-028: under each finding - a remark on the rule (anonymous, without the file's values) and "Ukryj" (signed in).
   The remark box takes no box of its own: its link sits in the row, its form below it, full width. */
.rv-f-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 10px 0 2px; border-top: 1px dashed var(--line); margin-top: 8px; }
.rv-f-acts .tool-fb-sm { display: contents; }
.rv-f-acts .tool-fb-sm .tool-fb-toggle, .rv-f-hide { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.rv-f-acts .tool-fb-sm .tool-fb-toggle:hover, .rv-f-hide:hover { color: var(--ink); text-decoration-color: var(--ink); }
.rv-f-hide:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rv-f-acts .tool-fb-form, .rv-f-acts .tool-fb-sent, .rv-f-hide-note { order: 3; flex: 1 1 100%; min-width: 0; max-width: none; box-sizing: border-box; }
.rv-f-acts .tool-fb-form { margin-top: 4px; }
.rv-f-hide-note { font-size: 13px; color: var(--ink-2); margin: 0; }
.rv-f-hide-note a { text-decoration: underline; color: var(--ink); }
.rv-doc-from { color: var(--ink-3); }
.rv-hidden { font-size: 13.5px; color: var(--ink-2); margin: 10px 0 0; }

/* Odwiedziny strony publicznej (P-029) on the Rozwój page */
.visits-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 4px 0 16px; }
.visits-kpi div { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.visits-kpi strong { font-size: 26px; font-weight: 500; letter-spacing: -.03em; }
.visits-kpi span { font-size: 12.5px; color: var(--ink-3); }
.visits-chart { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; align-items: end; height: 120px; padding-top: 14px; border-bottom: 1px solid var(--line); }
.visit-day { position: relative; height: 100%; display: flex; align-items: flex-end; }
.visit-bar { display: block; width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--ink); }
.visit-n { position: absolute; left: 0; right: 0; top: -14px; text-align: center; font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); }
.visits-axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin: 4px 0 14px; }
.visits-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.visits-lists h3 { font-size: 14px; margin-bottom: 6px; }
.visits-table td.num { text-align: right; font-family: var(--mono); }
.visits-table td { white-space: normal; }
@media (max-width: 720px) { .visits-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } .visits-lists { grid-template-columns: minmax(0, 1fr); } .visit-n { display: none; } }

/* Baza wiedzy: the area of implementation in the trail of a section (D-069). */
.kb-body .kb-areas { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.kb-areas li { margin: 0; padding: 0; }
.kb-area { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink); text-decoration: none; }
a.kb-area:hover { text-decoration: underline; text-underline-offset: 3px; }
.kb-area-code { flex: none; white-space: nowrap; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }

/* Obszary realizacji: the pillar of a group (D-071). */
.mech-filar { display: inline-block; margin-right: 10px; padding: 2px 8px; border-radius: 6px; background: var(--ink); color: var(--surface); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; vertical-align: 3px; }

/* Lista kontrolna DORA (D-070): the institution, the pillars with their points, the summary at the side. */
.dc-profile { margin: 0 0 28px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.dc-profile h2, .dc-filar h2 { font-size: 21px; letter-spacing: -.02em; margin: 0 0 6px; }
.dc-lead { color: var(--ink-2); margin: 0 0 14px; }
.dc-qs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.dc-q { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 24px; padding: 14px 0; border-top: 1px dashed var(--line); }
.dc-q-t { min-width: 0; }
.dc-q-t p { margin: 0; }
.dc-hint { font-size: 13.5px; color: var(--ink-3); margin: 3px 0 0; }
.dc-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 36px; align-items: start; }
.dc-side { position: sticky; top: 16px; }
.in-panel .dc-side { top: 76px; }
.dc-side-in { display: grid; gap: 12px; }
.dc-side-h { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
.dc-total { margin: 0; font-size: 14.5px; }
.dc-count strong { font-size: 1.15em; }
.dc-nav { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.dc-nav li { margin: 0; border-bottom: 1px solid var(--line); }
.dc-nav a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; padding: 8px 2px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; line-height: 1.35; }
.dc-nav a:hover { color: var(--ink); }
.dc-nav-n { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.dc-nav-c { font-family: var(--mono); font-size: 12px; }
.dc-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-chip { all: unset; cursor: pointer; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.dc-chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.dc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-note { font-size: 12.5px; color: var(--ink-3); margin: 0; }
.dc-filar { margin: 0 0 40px; scroll-margin-top: 16px; }
.dc-filar-sum { color: var(--ink-2); margin: 0 0 8px; font-size: 14px; }
.dc-area { display: flex; gap: 8px; align-items: baseline; font-size: 15px; font-weight: 500; margin: 22px 0 6px; }
.dc-items { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.dc-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 6px 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dc-n { font-family: var(--mono); font-size: 12px; color: var(--ink-3); padding-top: 3px; }
.dc-text { margin: 0; }
.dc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-top: 4px; }
.dc-depends { font-size: 12.5px; color: var(--ink-3); }
.dc-law summary { cursor: pointer; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.dc-law-in { margin: 6px 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--bg-alt); font-size: 13.5px; }
.dc-law-text { white-space: pre-line; margin: 0 0 6px; }
.dc-law-meta { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.dc-plan { display: grid; grid-template-columns: minmax(160px, 1fr) 150px minmax(0, 2fr); gap: 8px; margin-top: 10px; }
.dc-plan .field span { font-size: 12px; }
.dc-item.is-na { opacity: .62; grid-template-columns: 34px minmax(0, 1fr); }
.dc-na { font-size: 13px; color: var(--ink-3); margin: 4px 0 0; }
.dc-item.s-yes .dc-n { color: var(--ok, #2f7d32); }
.dc-tri .cx-tri-b.dc-yes.on { background: var(--ink); }
.dc-tri .cx-tri-b.dc-partial.on { background: #b26b00; color: #fff; }
.dc-tri .cx-tri-b.dc-no.on { background: #b3261e; color: #fff; }
.dc-empty { color: var(--ink-3); }
.dc-print { display: none; }
@media (max-width: 900px) {
  .dc-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .dc-side { position: static; }
  .dc-item { grid-template-columns: 30px minmax(0, 1fr); }
  .dc-item .dc-tri { grid-column: 2; justify-self: start; }
  .dc-q { flex-direction: column; }
  .dc-plan { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .public-top, .public-foot, .sidebar, .topbar, .sidebar-backdrop, .toasts, .dm, .dm-root, .tool-fb, .dc > .tool-head, .dc > .dc-profile, .dc > .dc-layout, .dc > .notice { display: none !important; }
  body:has(.dc-print) .app { min-height: 0 !important; }
  .dc-print { display: block; font: 8.4pt/1.3 var(--font); color: var(--ink); }
  .dc-print h3 { font-size: 10pt; margin: 10pt 0 4pt; }
  .dc-print table { width: 100%; border-collapse: collapse; }
  .dc-print th, .dc-print td { text-align: left; vertical-align: top; padding: 2pt 4pt; border-bottom: .5pt solid #ccc; }
  .dc-print footer { margin-top: 10pt; font-size: 7.4pt; color: var(--ink-3); }
}

/* ---------- Baza wiedzy, D-072: the marks as small icons; the foot of a section; the acts under "Podstawa prawna" ---------- */
.kb-ic { display: inline-grid; place-items: center; width: 17px; height: 17px; flex: none; border-radius: 5px; color: var(--ink); background: var(--bg-alt); vertical-align: -3px; }
.kb-ic svg { width: 11px; height: 11px; }
.kb-ic-law { background: var(--accent); font: 600 11px/1 var(--font); }
.kb-toc-marks { display: inline-flex; gap: 4px; }
.kb-toc-marks .kb-ic { width: 15px; height: 15px; vertical-align: 0; }
.kb-toc-marks .kb-ic svg { width: 10px; height: 10px; }
.kb-toc-marks .kb-ic-law { font-size: 10px; }
.kb-toc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 12px; font-size: 12px; color: var(--ink-3); }
.kb-toc-legend span { display: inline-flex; gap: 6px; align-items: center; }
.kb-card-law .kb-ic, .kb-card-act .kb-ic { width: 15px; height: 15px; vertical-align: 0; }
.kb-check-k { display: inline-flex; align-items: center; gap: 7px; }
.kb-prov-act .kb-k { display: inline-flex; align-items: center; gap: 7px; }

/* the foot of a section: one line per kind, the text first */
.kb-trail { margin: 26px 0 4px; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 14px; line-height: 1.45; }
.kb-trail-row { display: grid; grid-template-columns: 214px minmax(0, 1fr); gap: 6px 14px; align-items: start; }
.kb-trail-k { display: inline-flex; align-items: center; gap: 8px; padding-top: 4px; font-size: 13px; color: var(--ink-3); }
.kb-trail .kb-chips { gap: 6px; }
.kb-trail .kb-chips li { margin: 0; padding: 0; }
.kb-trail-v { min-width: 0; }
.kb-trail-v .kb-tool + .kb-tool { margin-top: 8px; }
.kb-trail .kb-areas { list-style: none; margin: 0; padding: 4px 0 0; display: grid; gap: 4px; }
.kb-trail .kb-tool { padding: 8px 12px 8px 8px; grid-template-columns: 30px minmax(0, 1fr) 16px; }
.kb-trail .kb-tool-tile { width: 30px; height: 30px; }
.kb-trail .kb-tool-t { font-size: 14.5px; }

/* a provision opens and closes: the chevron says which */
.kb-chip { padding: 2px 8px 2px 3px; gap: 6px; font-size: 13px; }
.kb-chip-chev { width: 6px; height: 6px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(-45deg); margin: 0 1px 0 1px; transition: transform .15s; }
.kb-chip[aria-expanded="true"] .kb-chip-chev { transform: rotate(135deg); border-color: var(--ink); }

/* "Podstawa prawna": the acts */
.kb-body .kb-acts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.kb-acts li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.45; }
.kb-acts .kb-chip-act { justify-self: start; }
.kb-acts-t { color: var(--ink); }
.kb-acts-n { grid-column: 2; font-size: 12.5px; color: var(--ink-3); }
.kb-acts-links { grid-column: 3; grid-row: 1 / span 2; display: inline-flex; gap: 12px; font-size: 13px; white-space: nowrap; }
.kb-acts-links a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 720px) {
  .kb-trail-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .kb-trail-k { padding-top: 0; }
  .kb-acts li { grid-template-columns: auto minmax(0, 1fr); }
  .kb-acts-links { grid-column: 2; grid-row: auto; }
}

/* Ocena gotowości DORA (D-073): the questions, the result beside them. */
.gr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.gr-main .gr-profile { margin-bottom: 30px; }
.gr-result { position: sticky; top: 16px; }
.in-panel .gr-result { top: 76px; }
.gr-result-in { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.gr-progress { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.gr-big { display: grid; gap: 2px; }
.gr-big strong { font-size: 44px; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.gr-big span { font-size: 13px; color: var(--ink-2); }
.gr-pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gr-pillars li { margin: 0; }
.gr-pillars a { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 2px 8px; align-items: baseline; color: var(--ink-2); text-decoration: none; font-size: 13px; line-height: 1.3; }
.gr-pillars a:hover { color: var(--ink); }
.gr-pct { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.gr-bar { grid-column: 2 / span 2; height: 4px; border-radius: 4px; background: var(--bg-alt); overflow: hidden; }
.gr-bar span { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.gr-gaps ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.gr-gaps li { margin: 0; font-size: 13px; line-height: 1.35; }
.gr-gaps a { color: var(--ink); text-decoration: none; }
.gr-gaps a:hover { text-decoration: underline; }
.gr-gap-s { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 500; }
.gr-no { background: #b3261e; color: #fff; }
.gr-partial { background: #b26b00; color: #fff; }
.gr-unknown { background: var(--bg-alt); color: var(--ink); }
@media (max-width: 900px) {
  .gr-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .gr-result { position: static; }
}
@media print { .dc > .gr-layout { display: none !important; } }

/* Odwiedziny (P-033): "Ty" apart from the others, the latest views, the mark of the owner's device. */
.visits-kpi { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.visit-stack { display: flex; flex-direction: column-reverse; width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; overflow: hidden; }
.visit-stack .visit-bar { min-height: 0; border-radius: 0; }
.visit-own { background: var(--accent) !important; }
.visits-legend { display: inline-flex; gap: 6px; align-items: center; font-family: var(--font); }
.visit-key { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--ink); margin-left: 6px; }
.visits-recent-h { font-size: 14px; margin: 18px 0 6px; }
.visits-recent { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.visits-recent table { margin: 0; }
.visit-row-own td { background: rgba(214, 255, 0, .12); }
.visits-own { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 14px 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.visits-own p { margin: 0; font-size: 13.5px; }
@media (max-width: 720px) { .visits-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.visits-when { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }

/* ---------- Sprawdzenie klienta AML (P-031, D-076): a report that reads as a document - one row per register with its
   status, the findings listed under it; the states told apart by colour and word; the report prints as the page ---------- */
.aml-panel { margin: 4px 0 22px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.aml-mode { margin-bottom: 14px; }
.aml-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.aml-form .field { flex: 1 1 260px; margin: 0; }
.aml-form .aml-pesel { flex: 0 1 200px; }
.aml-form .btn { flex: none; }
.aml-hint { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); max-width: 780px; }
.aml-idle { margin-top: 0; }
.aml-st { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; border-radius: 6px; padding: 2px 7px; white-space: nowrap; line-height: 1.5; vertical-align: 1px; }
.aml-st-ok { background: var(--ok-bg); color: var(--ok); }
.aml-st-alert { background: var(--err); color: #fff; }
.aml-st-warning { background: var(--warn-bg); color: var(--warn); }
.aml-st-error { background: var(--err-bg); color: var(--err); }
.aml-st-muted { background: var(--bg-alt); color: var(--ink-2); }
.aml-st-manual { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.aml-st-pending { background: var(--bg-alt); color: var(--ink-3); }
.aml-spin { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; animation: dm-spin .9s linear infinite; flex: none; }
.aml-doc { margin: 0 0 18px; }
.aml-doc-head { margin-bottom: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.aml-doc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.aml-doc-title { margin: 8px 0 2px; font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
.aml-doc-ids { margin: 2px 0; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.aml-progress { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); transition: color .3s; }
.aml-progress.is-done { color: var(--ok); animation: aml-done .6s ease-out; }
.aml-progress .ic-ico { width: 15px; height: 15px; }
@keyframes aml-done { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
.aml-counts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; }
.aml-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.aml-notes { margin: 0 0 14px; padding: 14px 20px; border-radius: var(--radius); background: var(--warn-bg); }
.aml-notes ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 7px; font-size: 13.5px; }
.aml-sec { margin: 0 0 14px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.aml-sec h3 { margin: 0 0 8px; font-size: 16px; }
.aml-regs { list-style: none; margin: 0; padding: 0; }
.aml-reg { padding: 12px 0; border-top: 1px solid var(--line); }
.aml-reg:first-child { border-top: 0; padding-top: 4px; }
.aml-reg-h { display: flex; align-items: flex-start; gap: 6px 10px; }
.aml-reg-n { flex: none; min-width: 1.6em; font-family: var(--mono); font-size: 12px; color: var(--ink-3); padding-top: 2px; }
.aml-reg-name { flex: 1 1 auto; min-width: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.aml-reg-name a { color: inherit; }
.aml-reg-why { display: block; font-size: 12.5px; color: var(--ink-2); }
.aml-reg-h .aml-st { margin-left: auto; flex: none; font-family: var(--font); font-size: 13.5px; font-weight: 600; letter-spacing: 0; text-transform: none; padding: 3px 10px; border-radius: 999px; }
.aml-reg-h .aml-st-muted { background: var(--bg-alt); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.aml-reg-h .aml-st-manual { color: var(--ink-2); font-weight: 500; }
.aml-reg[data-status="pending"] .aml-reg-name { color: var(--ink-2); }
.aml-reg-sum, .aml-reg > .aml-meta, .aml-reg > .aml-list, .aml-reg > .aml-hits, .aml-reg > .aml-screen, .aml-reg > .aml-sub, .aml-reg > .aml-note { margin-left: calc(1.6em + 10px); }
.aml-reg-sum { margin-top: 6px; margin-bottom: 4px; font-size: 13.5px; }
.aml-sub { margin: 10px 0 4px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.aml-k { margin: 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.aml-meta { margin: 4px 0; font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.aml-reg-meta { color: var(--ink-3); }
.aml-note { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--bg-alt); font-size: 13px; }
.aml-list { margin: 6px 0 4px; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; }
.aml-list .aml-meta { margin: 1px 0 0; }
.aml-meta .ic-ico, .aml-reg-name .ic-ico, .aml-reg-sum .ic-ico { width: 13px; height: 13px; vertical-align: -2px; }
.aml-facts { margin: 4px 0 2px; }
.aml-facts th { width: 34%; font-weight: 500; color: var(--ink-2); }
.aml-src { margin-left: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.aml-diff td { background: var(--warn-bg); }
.aml-other { margin-top: 4px; font-size: 12.5px; }
.aml-screen { padding: 8px 0 0; }
.aml-screen p { margin: 3px 0; }
.aml-screen-h { font-size: 13.5px; }
.aml-hits { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 8px; font-size: 13.5px; }
.aml-hits p { margin: 2px 0; }
.aml-level { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--warn); }
.aml-level-hit { color: var(--err); font-weight: 600; }
.aml-disclaimer { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-2); max-width: 840px; }
.aml-sign { display: none; }
.aml-run { margin: 12px 0 0; }
.aml-run-t { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.aml-bar { position: relative; height: 4px; border-radius: 4px; background: var(--bg-alt); overflow: hidden; }
.aml-bar > span { display: block; height: 100%; border-radius: 4px; background: var(--ink); transition: width .45s ease; }
.aml-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: aml-shimmer 1.2s linear infinite; }
@keyframes aml-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.aml-finished { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 9px 12px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); font-size: 14px; font-weight: 600; animation: aml-done .6s ease-out; }
.aml-finished .ic-ico { width: 16px; height: 16px; flex: none; }
.aml-go { display: inline-flex; align-items: center; gap: 8px; }
.aml-reg-acts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0 calc(1.6em + 10px); }
.aml-iconbtn { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 500 12.5px/1.4 var(--font); cursor: pointer; }
.aml-iconbtn:hover { color: var(--ink); border-color: var(--ink-3); }
.aml-iconbtn .ic-ico { width: 13px; height: 13px; }
.aml-annexes { display: none; margin-top: 18px; }
.aml-annexes.is-open { display: block; }
.aml-annexes-h { margin: 0 0 10px; font-size: 16px; }
.aml-annex { margin: 0 0 14px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.aml-annex h3 { margin: 4px 0 10px; font-size: 16px; }
.aml-annex-t th { width: 32%; font-weight: 500; color: var(--ink-2); vertical-align: top; }
.aml-annex-t td { overflow-wrap: anywhere; }
.aml-annex-t code, .aml-annex code { font-family: var(--mono); font-size: 12px; }
.aml-annex-a { margin: 10px 0 0; align-items: center; }
.aml-blank { min-width: 120px; }
.aml-extract { margin-top: 6px; font-size: 12.5px; }
.aml-tree { display: grid; grid-template-columns: minmax(140px, 30%) 1fr; gap: 3px 12px; margin: 2px 0; }
.aml-tree dt { color: var(--ink-2); overflow-wrap: anywhere; }
.aml-tree dd { margin: 0; overflow-wrap: anywhere; }
.aml-tree dt.aml-tree-h { grid-column: 1 / -1; margin-top: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.aml-tree dt.aml-tree-h + dd { grid-column: 1 / -1; padding-left: 12px; border-left: 2px solid var(--line); }
.aml-tree-l { margin: 0; padding-left: 18px; }
@media (max-width: 640px) {
  .aml-panel, .aml-sec, .aml-doc-head, .aml-notes { padding: 14px; }
  .aml-form .aml-pesel { flex: 1 1 100%; }
  .aml-doc-title { font-size: 19px; }
  .aml-reg-h { flex-wrap: wrap; }
  .aml-reg-h .aml-st { margin-left: calc(1.6em + 10px); }
  .aml-facts th { width: 40%; }
}
@media (prefers-reduced-motion: reduce) { .aml-spin { animation-duration: 2.4s; } .aml-progress.is-done, .aml-finished { animation: none; } .aml-bar::after { animation: none; } .aml-bar > span { transition: none; } }
@media print {
  .public-top, .public-foot, .sidebar, .topbar, .sidebar-backdrop, .toasts, .dm, .dm-root, .tool-fb, .aml > .tool-head, .aml-panel, .aml-actions { display: none !important; }
  body:has(.aml-doc) .app { min-height: 0 !important; }
  .aml { padding: 0 !important; font-size: 9pt; }
  .aml-doc-head, .aml-sec, .aml-notes { padding: 6pt 0; border: 0; border-radius: 0; background: none; }
  .aml-doc-head { border-bottom: .8pt solid #888; }
  .aml-reg { break-inside: avoid; }
  .aml-reg-name a { text-decoration: none; }
  .aml-reg-name .ic-ico { display: none; }
  .aml-sign { display: flex; justify-content: space-between; gap: 24pt; margin-top: 18pt; font-size: 9pt; }
  .aml-annexes, .aml-annexes.is-open { display: none; }
  .aml-run, .aml-reg-acts, .aml-finished { display: none; }
  .aml-print-annex .aml-annexes { display: block; }
  .aml-annexes-h { display: none; }
  .aml-annex { break-before: page; padding: 0; border: 0; border-radius: 0; background: none; }
  .aml-annex-a { display: none; }
  .aml-tree { grid-template-columns: 34% 1fr; }
  .aml-st, .aml-diff td, .aml-notes { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* P-035: the browser's own arrow on folded sections was easy to miss; D-089: a little smaller again, still clear. */
summary::marker { font-size: 1.1em; color: var(--ink-2); }
summary::-webkit-details-marker { transform: scale(1.1); }

/* ---------- Ustawienia → Harmonogram (I-008): the switch, and the day and hour visible next to it ---------- */
.schedule-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.schedule-row:last-of-type { border-bottom: 0; }
.schedule-when { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.schedule-when label { display: inline-flex; align-items: center; gap: 6px; }
.schedule-input {
  height: 40px; padding: 0 10px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font: 400 14px/1 var(--font); outline: none;
}
.schedule-input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(23,18,14,.06); }
.schedule-day { width: 72px; }
