/* 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-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; }
.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; }
.ent-search-head { margin-bottom: 18px; }
.ent-search-head h1 { font-size: clamp(30px, 4.6vw, 44px); line-height: 1.08; }
.ent-search-head .page-sub { max-width: 760px; }
.ent-search-hint { margin: 8px 0 22px; }
.ent-public-body { padding-top: 32px; padding-bottom: 48px; }
.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-back { font-size: 14px; }
.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 .ent-search { margin-bottom: 6px; }
.tp-pv-list, .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-public-body { padding-top: 16px; }
  .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: 7px; height: 7px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
  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; }
.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); }

/* Mechanizmy i zadania (D-021): 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 { 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; }
@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); } }

/* Klasyfikacja incydentów ICT (D-049): questions on the left, the result and time limits beside them */
.ic-body { padding-top: 32px; padding-bottom: 48px; }
.ic-head { margin-bottom: 14px; }
.ic-sources { font-size: 14px; color: var(--ink-2); margin-top: 10px; max-width: 860px; }
.ic-sources a, .ic-law a { text-decoration: underline; }
.ic-head .public-privacy { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.ic-head .public-privacy .icon, .ic-body .notice .icon, .ic-app .notice .icon { width: 16px; height: 16px; vertical-align: -3px; }
.ic-mode { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-alt); margin-bottom: 18px; }
.ic-mode-opt { position: relative; cursor: pointer; }
.ic-mode-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ic-mode-opt span { display: block; padding: 8px 16px; border-radius: 999px; font-size: 14.5px; color: var(--ink-2); }
.ic-mode-opt input:checked + span { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(23, 18, 14, .1); }
.ic-mode-opt input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.ic-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 22px; align-items: start; }
.ic-steps { display: grid; gap: 26px; min-width: 0; }
.ic-group h2 { font-size: 20px; margin-bottom: 8px; }
.ic-group-sub { font-size: 14.5px; color: var(--ink-2); margin-bottom: 10px; max-width: 760px; }
.ic-q { margin: 0 0 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; transition: opacity .15s; }
.ic-q legend { float: left; width: 100%; padding: 0; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ic-q legend + * { clear: both; }
.ic-num { 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); }
.ic-q-title { font-weight: 500; font-size: 16.5px; letter-spacing: -0.01em; }
.ic-ref { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.ic-ask { font-size: 15px; color: var(--ink-2); margin-bottom: 8px; }
.ic-options { display: grid; gap: 4px; }
.ic-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 15px; line-height: 1.45; }
.ic-opt:hover { background: var(--bg); }
.ic-opt:has(input:checked) { background: var(--bg-alt); }
.ic-opt input { accent-color: var(--ink); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.ic-opt .ic-ref { margin-left: 4px; }
.ic-opt-none { color: var(--ink-2); }
.ic-yesno { display: flex; gap: 8px; flex-wrap: wrap; }
.ic-yesno .ic-opt { border: 1px solid var(--line); padding: 8px 18px; }
.ic-quote { margin: 0 0 10px; padding: 10px 14px; border-left: 3px solid var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.ic-hint { font-size: 13.5px; color: var(--ink-2); margin-top: 10px; }
.ic-law { margin-top: 10px; font-size: 13.5px; }
.ic-law > summary { cursor: pointer; color: var(--ink-2); font-weight: 500; }
.ic-law-body { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg); display: grid; gap: 10px; }
.ic-law-unit p { white-space: pre-line; margin-top: 4px; }
.ic-law-meta { font-size: 12.5px; color: var(--ink-3); }
.ic-moot { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.ic-q.is-moot { opacity: .55; }
.ic-side { position: sticky; top: 16px; display: grid; gap: 14px; }
.ic-result p { font-size: 14.5px; color: var(--ink-2); margin-top: 8px; }
.ic-verdict { padding: 12px 14px; border-radius: var(--radius-sm); font-weight: 500; font-size: 19px; letter-spacing: -0.02em; }
.ic-major { background: var(--err-bg); color: var(--err); }
.ic-not-major { background: var(--ok-bg); color: var(--ok); }
.ic-na, .ic-open { background: var(--bg-alt); color: var(--ink); }
.ic-result .ic-rule { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.ic-next strong, .ic-progress strong { color: var(--ink); font-weight: 500; }
.ic-deadlines h2 { font-size: 18px; margin-bottom: 4px; }
.ic-moments { display: grid; gap: 10px; margin: 10px 0 12px; }
.ic-moments .field span small { font-weight: 400; color: var(--ink-3); }
.ic-moments input { width: 100%; }
.ic-now { font-size: 13px; align-self: flex-start; }
.ic-deadline-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ic-deadline-list li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; }
.ic-deadline-list li span { color: var(--ink-2); }
.ic-deadline-list b { color: var(--ink); font-weight: 600; }
.ic-weekend { color: var(--warn); font-size: 12.5px; }
.ic-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ic-actions .btn .icon { width: 15px; height: 15px; }
.ic-copied { font-size: 13px; color: var(--ok); }
.ic-scope { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); max-width: 860px; }
.ic-scope h2 { font-size: 18px; margin-bottom: 8px; }
.ic-scope ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); display: grid; gap: 4px; }
@media (max-width: 900px) {
  .ic-layout { grid-template-columns: minmax(0, 1fr); }
  .ic-side { position: static; }
}
@media (max-width: 760px) {
  .ic-body { padding-top: 16px; }
  .ic-q { padding: 14px 12px; }
  .ic-opt { padding: 8px 6px; }
  .ic-mode { border-radius: var(--radius-sm); }
  .ic-mode-opt span { border-radius: 8px; }
  .ic-ref { white-space: normal; }
}
@media print {
  .public-top, .public-foot, .ic-actions, .ic-mode, .ic-scope, .ic-now, .sidebar, .topbar { display: none !important; }
  .ic-layout { display: block; }
  .ic-side { position: static; margin-top: 16px; }
  .ic-q { break-inside: avoid; }
}
