:root { --fg: #1d2330; --muted: #5f6878; --line: #d9dee7; --accent: #1f5fbf; --bad: #a3271f; --bg: #f7f8fa;
  --ok: #2e7d32; --ok-bg: #e8f5e9; --warn: #8a5a00; --warn-bg: #fff4d6; --bad-bg: #fbeceb; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--fg);
  background: var(--bg); }
.top { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 1.25rem;
  background: #fff; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--accent); text-decoration: none; letter-spacing: 0.04em; }
main { max-width: 1100px; margin: 0 auto; padding: 1.25rem; }
h1 { font-size: 1.4rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.1rem; margin-top: 1.5rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.25rem; }
.narrow { max-width: 420px; }
label { display: block; margin-bottom: 0.75rem; }
input, select { display: block; width: 100%; margin-top: 0.25rem; padding: 0.45rem 0.55rem; border: 1px solid var(--line);
  border-radius: 6px; font: inherit; }
button { padding: 0.45rem 1rem; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font: inherit;
  cursor: pointer; }
.logout button { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.error { color: var(--bad); background: #fbeceb; border: 1px solid #f1c9c6; padding: 0.5rem 0.75rem; border-radius: 6px; }
.filters { display: flex; gap: 1rem; align-items: flex-end; margin-bottom: 1rem; }
.filters label { margin: 0; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.list { padding-left: 1.2rem; }
.muted { color: var(--muted); font-size: 0.9rem; }
.mono, code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.9rem; word-break: break-all; }
.secret code { font-size: 1.1rem; letter-spacing: 0.08em; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.25rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.audit { padding-left: 1.2rem; color: var(--muted); }
@media (max-width: 640px) { .filters { flex-direction: column; align-items: stretch; } }
fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 0.75rem; padding: 0.5rem 0.75rem; }
label.check { display: flex; gap: 0.5rem; align-items: center; margin: 0.25rem 0; }
label.check input { width: auto; margin: 0; }
/* A box or a round button sits on its label's line, wherever it appears (owner UAT 2026-10-10) */
input[type="checkbox"], input[type="radio"] { display: inline-block; width: auto; margin: 0 0.4rem 0 0;
  vertical-align: middle; }
textarea { display: block; width: 100%; margin-top: 0.25rem; padding: 0.45rem 0.55rem; border: 1px solid var(--line);
  border-radius: 6px; font: inherit; }
.badge { display: inline-block; font-size: 0.75rem; padding: 0 0.4rem; border-radius: 4px; background: #fbeceb;
  color: var(--bad); border: 1px solid #f1c9c6; }
.flag { display: inline-block; font-size: 0.75rem; padding: 0 0.3rem; margin: 0.1rem 0; border-radius: 4px;
  background: #eef2f8; color: var(--muted); }
.facts-table tr.done { color: var(--muted); }
.review { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.review form { display: flex; gap: 0.3rem; align-items: center; margin: 0; }
.review input { width: 12rem; margin: 0; }
button.secondary { background: transparent; color: var(--fg); border: 1px solid var(--line); }
form.upload { margin-top: 0.75rem; }
details.new-case { margin-bottom: 1rem; }
details.new-case summary { cursor: pointer; font-weight: 600; }
details.new-case form { margin-top: 0.75rem; }
.notice { color: #6b4a00; background: #fff6e0; border: 1px solid #f0d58c; padding: 0.5rem 0.75rem; border-radius: 6px; }
/* Document beside the facts (FR-DOC-05): facts left, the original right and in view while scrolling. */
.review-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.25rem; align-items: start; }
.viewer { position: sticky; top: 0.75rem; margin-top: 1.5rem; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 0.5rem; }
.viewer-bar { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: baseline; margin-bottom: 0.5rem; }
.viewer img { display: block; width: 100%; max-height: calc(100vh - 6rem); object-fit: contain; cursor: zoom-in; }
.viewer-page img { display: block; max-width: 100%; margin: 0 auto; cursor: zoom-in; }
tr.shown td { background: #eef2f8; }
@media (max-width: 1000px) { .review-layout { grid-template-columns: minmax(0, 1fr); } .viewer { position: static; } }
main:has(.review-layout), main:has(.viewer-page) { max-width: 1680px; }
/* Case notes (FR-CASE-09). */
.notes { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.notes li { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem; }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.note-form { max-width: 720px; }
form.assign { display: flex; gap: 0.4rem; align-items: center; margin: 0.35rem 0 0; }
form.assign select { width: auto; margin: 0; }
/* Tasks and due dates (WP-009-T01). */
.tasks-table tr.overdue td { background: #fbeceb; }
.tasks-table tr.done { color: var(--muted); }
form.task-done { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; margin: 0 0 0.3rem; }
form.task-done input { width: 14rem; margin: 0; }
form.task-done label { display: flex; gap: 0.3rem; align-items: center; margin: 0; }
form.task-done label input { width: auto; }
.next-review { margin-bottom: 0.75rem; }
details.new-task { margin-top: 0.75rem; max-width: 520px; }
details.new-task summary { cursor: pointer; font-weight: 600; }
details.new-task form { margin-top: 0.75rem; }
/* Risk assessment (WP-007-T01). */
.risk-form fieldset { background: #fff; }
.criterion { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.criterion p { margin: 0 0 0.3rem; }
.criterion .answers { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.sdd-route { margin: 0.4rem 0 0.6rem; }
/* Client answers vs official documents (WP-005-T03): differences red, matches green. */
.facts-table tr.diff td { background: #fbeceb; }
.facts-table tr.diff td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.facts-table tr.match td { background: #edf7ee; }
.facts-table tr.match td:first-child { box-shadow: inset 4px 0 0 #2e7d32; }
form.bulk { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin: 0 0 0.75rem; }
.qr { background: #fff; display: inline-block; padding: 8px; border-radius: 6px; }
/* The eye at the end of a password field (password.js) */
.password-field { position: relative; display: block; }
.password-field input { padding-right: 2.6rem; }
.password-field button.eye { position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%); margin: 0;
  padding: 0.25rem; background: transparent; color: var(--muted, #666); border: 0; line-height: 0; cursor: pointer; }
.password-field button.eye:hover, .password-field button.eye:focus-visible { color: var(--fg); }
.password-field button.eye[aria-pressed="false"] .eye-slash { display: none; }
.prewrap { white-space: pre-wrap; }
/* The menu on every page of an organisation and the path to the page (owner UAT 2026-10-10) */
.top { gap: 1rem; flex-wrap: wrap; }
.menu { display: flex; flex-wrap: wrap; gap: 0.25rem; flex: 1; }
.menu a { padding: 0.3rem 0.6rem; border-radius: 6px; color: var(--fg); text-decoration: none; }
.menu a:hover { background: var(--bg); }
.menu a[aria-current="page"] { background: #e8eefa; color: var(--accent); font-weight: 600; }
.crumbs { font-size: 0.9rem; margin: 0.25rem 0 0.5rem; color: var(--muted); }
.crumbs .sep { margin: 0 0.15rem; }
@media (max-width: 800px) { .menu { order: 3; flex-basis: 100%; } }
/* Which organisation this is, and switching to another (owner UAT 2026-10-10) */
.org { position: relative; padding: 0.25rem 0.6rem; border-left: 1px solid var(--line); }
.org summary { cursor: pointer; list-style: none; }
.org summary::-webkit-details-marker { display: none; }
.org summary::after { content: " \25BE"; color: var(--muted); }
.org .badge { font-size: 0.75rem; font-weight: 600; color: #8a5a00; background: #fff4d6; border-radius: 4px;
  padding: 0.05rem 0.35rem; }
.org-menu { position: absolute; z-index: 10; top: 2rem; left: 0; min-width: 18rem; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 0.9rem; box-shadow: 0 4px 14px rgb(0 0 0 / 8%); }
.org-menu ul { list-style: none; padding: 0; margin: 0.25rem 0 0.5rem; }
.org-menu li { padding: 0.2rem 0; }
/* Status colours (owner 2026-10-11): green fine, yellow attention, red wrong or blocked, grey past — with a sign */
.pill { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
  white-space: nowrap; }
.pill-ok { color: var(--ok); background: var(--ok-bg); }
.pill-warn { color: var(--warn); background: var(--warn-bg); }
.pill-bad { color: var(--bad); background: var(--bad-bg); }
.pill-muted { color: var(--muted); background: #eef0f3; }
.notice-bad { background: var(--bad-bg); border-left: 4px solid var(--bad); padding: 0.4rem 0.7rem; border-radius: 4px; }
/* Technical details folded away (SHA-256, ids, field paths, confidence) */
details.tech { margin-top: 0.25rem; font-size: 0.82rem; color: var(--muted); }
details.tech > summary { cursor: pointer; }
details.tech.card { margin: 0.5rem 0 1rem; }
details.tech.row { font-size: 0.75rem; }
/* Facts: one source document at a time, stable order, grouped by document (owner UAT 2026-10-11) */
.sources { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.25rem 0 0.5rem; }
.sources a { padding: 0.3rem 0.6rem; border: 1px solid var(--line); border-radius: 6px; background: #fff;
  color: var(--fg); text-decoration: none; }
.sources a[aria-current="true"] { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); font-weight: 600; }
.facts-scope .toggle { display: inline; margin: 0; color: var(--accent); cursor: pointer; text-decoration: underline; }
.facts-toggle { position: absolute; opacity: 0; pointer-events: none; }
#all-docs:not(:checked) ~ #facts .other-src, #all-docs:not(:checked) ~ #facts .all-note { display: none; }
#all-docs:checked ~ #facts .all-docs::after, #hide-reviewed:checked ~ #facts .hide-reviewed::after { content: " ✓"; }
#hide-reviewed:checked ~ #facts .facts-table tr.done { display: none; }
#all-docs:focus-visible ~ #facts .all-docs, #hide-reviewed:focus-visible ~ #facts .hide-reviewed {
  outline: 2px solid var(--accent); }
.facts-table tr.source th { background: var(--bg); text-align: left; font-weight: 600; padding-top: 0.6rem; }
.facts-table tr.open td:first-child { box-shadow: inset 4px 0 0 #e0a800; }
.facts-table tr.ok td:first-child { box-shadow: inset 4px 0 0 var(--ok); }
.facts-table tr.done td { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.facts-table tr:target td { outline: 2px solid var(--accent); }
details.correct { display: inline-block; }
details.correct > summary { display: inline-block; cursor: pointer; padding: 0.35rem 0.8rem; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; color: var(--accent); list-style: none; }
details.correct > summary::-webkit-details-marker { display: none; }
details.correct[open] > summary { margin-bottom: 0.3rem; }
/* Facts in a stable order, grouped by the document they were read from (owner UAT 2026-10-11) */
/* The case at a glance — "what now?" (owner UX review 2026-10-11, stage 2) */
.overview { margin: 0.5rem 0 1.25rem; }
.next-step { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0 0 0.6rem; }
a.button { display: inline-block; padding: 0.45rem 1rem; border-radius: 6px; background: var(--accent); color: #fff;
  text-decoration: none; font-weight: 600; }
.status-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.5rem; }
.status-card { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.6rem 0.75rem; background: #fff;
  border: 1px solid var(--line); border-left-width: 5px; border-radius: 8px; color: var(--fg); text-decoration: none; }
.status-card:hover { box-shadow: 0 2px 8px rgb(0 0 0 / 8%); }
.status-card .title { font-weight: 600; }
.status-card.tone-ok { border-left-color: var(--ok); }
.status-card.tone-warn { border-left-color: #e0a800; }
.status-card.tone-bad { border-left-color: var(--bad); }
.status-card.tone-muted { border-left-color: var(--line); }
.blockers { margin-top: 0.75rem; padding: 0.6rem 0.9rem; background: #fff; border: 1px solid var(--line);
  border-left: 5px solid var(--bad); border-radius: 8px; }
.blockers h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.blockers ul { margin: 0; padding-left: 0; list-style: none; }
.blockers li { padding: 0.2rem 0; }
.blockers .pill { white-space: normal; }
.blockers ul.reasons { margin: 0.15rem 0 0.3rem 1.4rem; list-style: disc; color: var(--muted); font-size: 0.88rem; }
.blockers ul.reasons li { padding: 0; }
/* The case's tabs (owner UX review 2026-10-11, stage 3) */
.case-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; margin: 0 0 0.75rem;
  padding: 0.4rem 0.6rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.case-menu .case-name { font-weight: 700; }
.case-tabs { display: flex; flex-wrap: wrap; gap: 0.2rem; flex: 1; }
.case-tabs a { padding: 0.3rem 0.65rem; border-radius: 6px; color: var(--fg); text-decoration: none; }
.case-tabs a:hover { background: var(--bg); }
.case-tabs a[aria-current="page"] { background: #e8eefa; color: var(--accent); font-weight: 600; }
.case-actions { display: flex; align-items: center; gap: 0.6rem; }
.case-events { border-left: 0; }
.case-events .org-menu { left: auto; right: 0; }
.case-actions .report { color: var(--bad); font-weight: 600; text-decoration: none; }
/* Logo, side menu in groups, the day's start page (owner UX review 2026-10-11, stage 4) */
.brand img { display: block; height: 26px; width: auto; }
.top-spacer { flex: 1; }
.hero { text-align: center; padding: 2rem 1rem 0; }
.hero img { width: 225px; height: auto; }
.layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr); align-items: start; }
.layout > main { margin: 0; max-width: 1180px; }
.side-menu { position: sticky; top: 0; display: flex; flex-direction: column; gap: 0.1rem; padding: 1rem 0.6rem;
  min-height: calc(100vh - 3.2rem); background: #fff; border-right: 1px solid var(--line); }
.side-menu .side-group { margin: 0.9rem 0.6rem 0.25rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); }
.side-menu .side-group:first-child { margin-top: 0; }
.side-menu a { padding: 0.4rem 0.7rem; border-radius: 6px; color: var(--fg); text-decoration: none; }
.side-menu a:hover { background: var(--bg); }
.side-menu a[aria-current="page"] { background: #e8eefa; color: var(--accent); font-weight: 600; }
main:has(.review-layout), main:has(.viewer-page) { max-width: 1680px; }
.home-cards { margin-bottom: 1rem; }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side-menu { position: static; min-height: 0; flex-direction: row; flex-wrap: wrap; border-right: 0;
    border-bottom: 1px solid var(--line); padding: 0.4rem 0.6rem; }
  .side-menu .side-group { display: none; }
}
/* pages without the menu (sign-in, MFA, choosing an organisation): one column under the logo */
.hero + main { max-width: 480px; }
/* the client's final decision looks unlike a candidate's ruling (owner UAT 2026-10-12, F) */
.final-decision { border: 2px solid var(--line); border-left: 6px solid var(--bad); }
label.choice { display: flex; gap: 0.5rem; align-items: baseline; margin: 0.35rem 0; font-weight: normal; }
label.choice input { width: auto; margin: 0; }
dl.facts-pair { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 0.5rem 0 1rem; }
dl.facts-pair dt { color: var(--muted); }
dl.facts-pair dd { margin: 0; }
@media (max-width: 640px) { dl.facts-pair { grid-template-columns: 1fr; } }
/* One viewer beside any page (owner UAT 2026-10-12): the page stays, the file opens on the right. */
#viewer:empty { display: none; }
.layout:has(> #viewer:not(:empty)) { grid-template-columns: 13rem minmax(0, 1fr) minmax(320px, 42%); }
.layout:has(> #viewer:not(:empty)) > main { max-width: none; }
#viewer { position: sticky; top: 0; align-self: start; padding: 0 0.75rem 0 0; }
#viewer > .viewer { position: static; margin-top: 1rem; }
.viewer-title { overflow-wrap: anywhere; }
@media (max-width: 1100px) {  /* narrow: the viewer over the page, which keeps its place underneath */
  .layout:has(> #viewer:not(:empty)) { grid-template-columns: 13rem minmax(0, 1fr); }
  #viewer:not(:empty) { position: fixed; inset: 0; z-index: 50; overflow: auto; padding: 0.5rem;
    background: rgba(29, 35, 48, 0.55); }
  #viewer > .viewer { margin: 0 auto; max-width: 900px; }
}
@media (max-width: 900px) { .layout:has(> #viewer:not(:empty)) { grid-template-columns: minmax(0, 1fr); } }
/* Policy version compared with the one in force (owner UAT 2026-10-12) */
.policy-diff { table-layout: fixed; width: 100%; }
.policy-diff td { vertical-align: top; overflow-wrap: anywhere; }
.policy-diff tr.diff-same td { color: var(--muted); }
.policy-diff ins { background: #dcf3e2; text-decoration: underline; }
.policy-diff del { background: #fbe3e1; }
.policy-diff tr.diff-added td:last-child, .policy-diff tr.diff-changed td:last-child { background: #f3fbf5; }
.policy-diff tr.diff-removed td:first-child, .policy-diff tr.diff-changed td:first-child { background: #fdf4f3; }
@media (max-width: 700px) {
  .policy-diff, .policy-diff tbody, .policy-diff tr, .policy-diff td { display: block; }
  .policy-diff thead { display: none; }
}
/* The case's header (owner UAT 2026-10-12): the name apart from the tabs; tabs scroll sideways on a phone instead
   of breaking into many small lines; the rare records behind "Kiti veiksmai". */
.case-head { margin: 0 0 1rem; }
.case-title-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.75rem; margin-bottom: 0.4rem; }
.case-title-row .back { text-decoration: none; }
.case-title { font-size: 1.35rem; font-weight: 700; }
.case-head .case-menu { position: relative; margin: 0; padding: 0.25rem; overflow-x: auto; }
.case-head .case-tabs { flex-wrap: nowrap; white-space: nowrap; }
.case-tabs .step { display: inline-block; min-width: 1.4em; padding: 0 0.3em; border-radius: 999px; background: var(--bg);
  color: var(--muted); font-size: 0.8em; text-align: center; }
.case-tabs a[aria-current="page"] .step { background: var(--accent); color: #fff; }
.case-tabs .tab-gap { display: inline-block; width: 1px; align-self: stretch; margin: 0 0.4rem; background: var(--line); }
.case-more .org-menu { left: auto; right: 0; min-width: 18rem; }
.case-more .report { color: var(--bad); font-weight: 600; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 700px) {  /* a wide table scrolls by itself; the page never scrolls sideways */
  main table { display: block; max-width: 100%; overflow-x: auto; }
}
/* Forms (owner UAT 2026-10-12): an action behind a fold looks like a button; the form being saved says so; an error
   stays at its form; explanations open by a press — mouse, keyboard or finger. */
main details:not(.tech):not(.org):not(.hint):not(.correct):not(.card):not(.row-actions) > summary {
  display: inline-block; cursor: pointer; padding: 0.35rem 0.8rem; margin: 0.15rem 0; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; color: var(--accent); font-weight: 600; list-style: none; }
main details:not(.tech):not(.org):not(.hint):not(.correct):not(.card):not(.row-actions) > summary::-webkit-details-marker { display: none; }
main details:not(.tech):not(.org):not(.hint):not(.correct):not(.card):not(.row-actions) > summary::before { content: "+ "; }
main details[open]:not(.tech):not(.org):not(.hint):not(.correct):not(.card):not(.row-actions) > summary::before { content: "− "; }
form[aria-busy="true"] { opacity: 0.7; }
form.has-error { outline: 2px solid var(--bad); outline-offset: 4px; border-radius: 6px; }
[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 2px #fbe3e1; }
.js form.filters.auto button[type=submit] { display: none; }
details.hint { display: inline-block; position: relative; }
details.hint > summary { display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; border-radius: 50%;
  background: var(--bg); color: var(--accent); border: 1px solid var(--line); cursor: pointer; font-size: 0.8em;
  list-style: none; font-weight: 700; }
details.hint > summary::-webkit-details-marker { display: none; }
details.hint > .hint-body { position: absolute; z-index: 20; left: 0; top: 1.6em; width: max-content; max-width: 18rem;
  padding: 0.5rem 0.65rem; background: #fff; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); font-weight: normal; }
#toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); padding: 0.55rem 1rem; z-index: 60;
  background: #1d6b3a; color: #fff; border-radius: 6px; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
#toast.shown { opacity: 1; }
ul.reasons-fix li { margin: 0.25rem 0; }
/* Keyboard focus is always visible (owner UX review 2026-10-12). */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* A rare, irreversible action behind "⋯", said in words before it is done. */
details.row-actions { position: relative; display: inline-block; }
details.row-actions > summary { list-style: none; cursor: pointer; padding: 0.2rem 0.6rem; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; }
details.row-actions > summary::-webkit-details-marker { display: none; }
details.row-actions > summary::before { content: none; }
details.row-actions .danger-zone { position: absolute; right: 0; z-index: 20; width: 20rem; margin-top: 0.3rem;
  padding: 0.75rem; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); }
button.danger { background: #fff; color: var(--bad); border: 1px solid var(--bad); }
.audit-log:not(:has(#audit-views:checked)) li.view { display: none; }
.audit-log > summary { cursor: pointer; font-weight: 600; }
.primary-doc { margin: 1rem 0; }
/* The case page (owner UX review 2026-10-12): the summary in one line, the facts first, the table without an empty
   column and its actions on one line. */
dl.case-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; margin: 0 0 0.5rem; }
dl.case-summary dt { color: var(--muted); margin: 0; }
dl.case-summary dd { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0 1.25rem 0 0; }
dl.case-summary form.assign { margin: 0; display: flex; gap: 0.3rem; }
details.case-tech { margin: 0 0 0.75rem; font-size: 0.85rem; }
.blocker-hard { border-left: 4px solid var(--bad); background: #fdf4f3; padding: 0.5rem 0.75rem; margin: 0.5rem 0;
  border-radius: 6px; }
details.why-not > summary { cursor: pointer; font-weight: 600; margin: 0.5rem 0; }
.facts-table td:last-child { white-space: nowrap; }
.facts-table .review { flex-wrap: nowrap; }
.facts-table td .flags { margin-top: 0.2rem; }
details.upload-fold { margin: 0.5rem 0 1rem; }
.blockers:not(:has(.blocker-hard)) { border-left: 1px solid var(--line); }  /* red only when something blocks hard */
/* Sanctions screening (owner UX review 2026-10-12): the result and the candidates first, each candidate compared
   field by field — a mismatch apart from missing data. */
.screening-result { margin-bottom: 1rem; }
.screening-result form.inline { display: inline-block; margin: 0.25rem 0; }
article.candidate { margin: 0.75rem 0; }
article.candidate.open { border-left: 4px solid #e0a800; }
article.candidate > header { margin-bottom: 0.5rem; }
table.compare { width: 100%; margin: 0.25rem 0 0.75rem; }
table.compare th { text-align: left; font-weight: 600; width: 8rem; }
details.more-info { display: inline; }
details.more-info > summary { display: inline; cursor: pointer; color: var(--accent); }
details.lists, details.subjects { margin: 0.5rem 0 1rem; }
article.candidate fieldset { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
article.candidate fieldset legend { width: 100%; }
article.candidate fieldset label { display: flex; gap: 0.35rem; align-items: center; margin: 0; }
article.candidate fieldset input { width: auto; margin: 0; }
@media (max-width: 900px) {  /* phone: the menu one line that scrolls sideways; the header one line */
  .side-menu { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
  header.top { flex-wrap: nowrap; gap: 0.5rem; padding-top: 0.4rem; padding-bottom: 0.4rem; }
  header.top .org { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 0; }
  header.top form.logout button { padding: 0.3rem 0.6rem; }
}
@media (max-width: 700px) { .status-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; } .status-card { min-width: 0; } }
/* The home queue (owner UX review 2026-10-12, stage 3): one line per thing that waits — why, about what, what to do. */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
ul.to-do { list-style: none; padding: 0; margin: 0.5rem 0; }
.to-do-item { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; padding: 0.55rem 0.75rem;
  margin: 0.4rem 0; background: #fff; border: 1px solid var(--line); border-left: 4px solid #e0a800; border-radius: 6px; }
.to-do-item.tone-bad { border-left-color: var(--bad); }
.to-do-item .subject { flex: 1 1 12rem; font-weight: 600; }
.to-do-item .button { margin-left: auto; }
p.checked { font-size: 0.85rem; }
details.later { margin: 0.75rem 0; }
/* What waits for this person, first and apart (owner UX review 2026-10-12). */
section.action-card { border-left: 4px solid var(--accent); margin: 0.75rem 0 1.25rem; }
section.action-card h2 { margin-top: 0; }
.fields-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.5rem 1rem; }
form.inline { display: inline-block; margin: 0.5rem 0 0; }
/* The risk form: its count and the save always at hand (owner UX review 2026-10-12). */
.risk-bar { position: sticky; bottom: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.4rem 0.75rem; padding: 0.6rem 0.9rem; margin-top: 1rem; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06); }
.risk-bar button { margin-left: auto; }
.group-count { font-weight: normal; font-size: 0.9rem; }
/* A suggested risk answer with its source (owner UX review 2026-10-12): shown, never chosen by AMLIS. */
p.suggestion { margin: 0.35rem 0 0; padding: 0.35rem 0.6rem; background: #f4f7fb; border-radius: 6px; font-size: 0.92rem; }
p.suggestion button.small { padding: 0.15rem 0.6rem; font-size: 0.85rem; margin-left: 0.4rem; }
/* Stage 5 check (owner UX review 2026-10-12): the reading notice spans the review layout — as a grid cell of its own
   it pushed the facts right and the document below them; the viewer's title on a line of its own, its controls under
   it on one line. */
.review-layout > #extraction { grid-column: 1 / -1; }
.viewer-bar .viewer-title { flex-basis: 100%; }
/* Prepared official-source check (source assistant, stage 2). */
.prep-state { margin: 0.25rem 0 0.75rem; }
.prep-subject { margin: 0.6rem 0; }
.prep-subject h3 { margin: 0 0 0.4rem; }
dl.prep-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.35rem 0.9rem; margin: 0; }
dl.prep-fields dt { color: var(--muted); }
dl.prep-fields dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.prep-value { font-weight: 600; overflow-wrap: anywhere; }
.prep-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
button.small { padding: 0.15rem 0.6rem; font-size: 0.85rem; }
ol.assist-states { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; list-style: none; padding: 0; margin: 0.5rem 0; }
form.assist-start { margin-top: 0.6rem; }
/* the risk policy version's "Kas keičiasi" (owner 2026-10-15) */
.pack-diff > td { background: var(--surface, transparent); }
.pack-diff .diff-files { margin: .4rem 0; padding-left: 1.2rem; }
.pack-diff-table { width: 100%; table-layout: fixed; margin: .3rem 0 .6rem; }
.pack-diff-table td { vertical-align: top; overflow-wrap: anywhere; }
.pack-diff-table tr.diff-added td:last-child, .pack-diff-table tr.diff-changed td:last-child { background: #f3fbf5; }
.pack-diff-table tr.diff-removed td:nth-child(2), .pack-diff-table tr.diff-changed td:nth-child(2) { background: #fdf4f3; }
/* The menu on a narrow screen (UAT 2026-10-15, UX-001): one button with the current section; pressed, the whole menu
   in its groups, one item per line. Without JavaScript the list is simply open. */
.side-links { display: flex; flex-direction: column; gap: 0.1rem; }
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .side-menu { display: block; flex-wrap: nowrap; overflow-x: visible; white-space: normal; }
  .nav-toggle { display: block; width: 100%; text-align: left; background: #fff; color: var(--fg);
    border: 1px solid var(--line); border-radius: 6px; padding: 0.45rem 0.7rem; font-weight: 600; }
  .side-links { margin-top: 0.4rem; }
  .side-menu .side-group { display: block; }
  html.js .side-menu:not(.open) .side-links { display: none; }
}
