@font-face {
  font-family: "Anton";
  src: url("/static/fonts/anton.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("/static/fonts/nunito-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("/static/fonts/nunito-sans-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --z-magenta: #962E64;
  --z-plum: #34051E;
  --z-bordeaux: #762450;
  --z-plum-btn: #521D42;
  --z-navigation-gradient: linear-gradient(rgb(52 5 30 / 14%), rgb(52 5 30 / 14%)), linear-gradient(170deg, #34051E 0%, #4A0D33 32%, #7B2058 68%, #C13585 100%);
  --z-bg: #FFFFFF;
  --z-bg-soft: #F8F9FA;
  --z-line: #DEE2E6;
  --z-text: #212529;
  --z-muted: #6C757D;
  --z-ok: #2E7D32;
  --z-warn: #B26A00;
  --z-err: #B3261E;
  --font-head: "Anton", Impact, "Arial Narrow", sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", Arial, sans-serif;
  --radius-card: 8px;
  --radius-pill: 90px;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--z-bg-soft); }
body { min-height: 100%; margin: 0; color: var(--z-text); font: 400 15px/1.5 var(--font-body); }
button, input, select, textarea { font: inherit; }
a { color: var(--z-magenta); font-weight: 700; text-decoration-color: rgb(150 46 100 / 35%); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--z-bordeaux); }
:focus-visible { outline: 3px solid var(--z-magenta); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--z-plum); font-family: var(--font-head); font-weight: 400; letter-spacing: .5px; line-height: 1.15; }
h1 { margin-bottom: .45rem; font-size: 32px; text-transform: uppercase; }
h2 { font-size: 24px; }
h3 { margin-top: 1.2rem; font-size: 18px; }
code { overflow-wrap: anywhere; font: .82rem ui-monospace, SFMono-Regular, Consolas, monospace; }
.muted { color: var(--z-muted); font-weight: 400; }

.app-shell { display: grid; min-height: 100vh; grid-template-columns: 240px minmax(0, 1fr); align-items: stretch; background: var(--z-navigation-gradient); }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; min-height: 0; flex-direction: column; overflow-y: auto; padding: 31px 18px 20px; color: white; background: transparent; }
.sidebar-brand { display: block; width: 128px; margin: 0 8px 38px; }
.sidebar-brand img, .mobile-header img { display: block; width: 100%; height: auto; }
.sidebar nav { display: grid; gap: 2px; }
.menu-block { margin: 0 0 22px; }
.menu-block h2 { margin: 0 8px 7px; color: white; font: 700 .68rem/1.2 var(--font-body); letter-spacing: .14em; }
.menu-block ul { margin: 0; padding: 0; list-style: none; }
.menu-block a { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 7px; color: white; font-size: .92rem; font-weight: 700; text-decoration: none; }
.menu-block a:hover { background: rgb(255 255 255 / 9%); }
.menu-block a[aria-current="page"] { background: var(--z-magenta); box-shadow: inset 3px 0 var(--z-bordeaux); }
.menu-badge { display: grid; flex: none; min-width: 22px; height: 20px; place-items: center; padding: 0 6px; border-radius: var(--radius-pill); background: white; color: var(--z-magenta); font-size: .72rem; font-weight: 700; }
.sidebar-account { display: grid; gap: 2px; margin-top: auto; padding: 17px 9px 0; border-top: 1px solid rgb(255 255 255 / 19%); font-size: .83rem; }
.sidebar-account span { color: white; }
.sidebar-account strong { color: white; text-transform: capitalize; }
.sidebar-account form { margin-top: 8px; }
.link-button { min-height: auto; border: 0; padding: 0; background: transparent; color: inherit; text-decoration: underline; }
.workspace { min-width: 0; padding: clamp(25px, 3.2vw, 46px); background: #F6F4F6; }
.context-line { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: -10px 0 27px; color: var(--z-muted); font-size: .79rem; }
.context-line strong { color: var(--z-text); }
.trial-context { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.trial-context form { margin: 0; }
.mobile-header, .navigation-toggle, .navigation-scrim { display: none; }

.page-heading, .section-heading, .statement-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.page-heading { margin-bottom: 20px; }
.page-heading > div:first-child { min-width: 0; }
.page-heading p { max-width: 760px; margin-bottom: 0; color: var(--z-muted); }
.page-heading .actions { align-self: center; }
.week-title span { display: block; }
.week-title-period { margin-top: 4px; color: var(--z-muted); font: 700 .52em/1.35 var(--font-body); letter-spacing: 0; text-transform: none; }
.section-heading { align-items: center; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.eyebrow { margin-bottom: 4px !important; color: var(--z-magenta) !important; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.lead { max-width: 850px; color: var(--z-text) !important; font-size: 1.06rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 17px; padding: 0; color: var(--z-muted); font-size: .84rem; list-style: none; }
.breadcrumb li:not(:last-child)::after { margin-left: 6px; color: #A3A3A3; content: ">"; }
.breadcrumb [aria-current="page"] { color: var(--z-text); font-weight: 700; }
.actions, .row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; }
.actions form, .row-actions form { margin: 0; }
section { margin: 21px 0 32px; }

button, .button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; border: 1px solid var(--z-magenta); border-radius: var(--radius-pill); padding: 7px 20px; background: var(--z-magenta); color: white; cursor: pointer; font-weight: 700; line-height: 1.25; text-align: center; text-decoration: none; }
button:hover, .button:hover { border-color: var(--z-bordeaux); background: var(--z-bordeaux); }
button.secondary, .button.secondary { background: white; color: var(--z-magenta); }
button.heavy, .button.heavy { border-color: var(--z-plum-btn); background: var(--z-plum-btn); color: white; }
button.danger, .button.danger { border-color: var(--z-err); background: var(--z-err); color: white; }
button.small, .button.small { min-height: 32px; padding: 4px 12px; font-size: .8rem; }
button:disabled { cursor: not-allowed; opacity: .58; }

.tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 0 20px; border-bottom: 1px solid var(--z-line); scrollbar-width: thin; }
.tabs a { flex: none; padding: 10px 16px 9px; border-bottom: 3px solid transparent; color: var(--z-muted); font-weight: 700; text-decoration: none; white-space: nowrap; }
.tabs a:hover { color: var(--z-magenta); }
.tabs a[aria-current="page"], .tabs a[aria-selected="true"] { border-color: var(--z-magenta); color: var(--z-magenta); }
.tab-panel { margin-top: 0; }

.card, .panel, .empty, .warning-card, .hash-card, .choice-card, .condition-card, .rule-group { border: 1px solid var(--z-line); border-radius: var(--radius-card); background: var(--z-bg); }
.panel, .empty, .warning-card, .hash-card, .choice-card, .condition-card { padding: 20px; }
.warning-card { border-left: 4px solid var(--z-warn); }
.empty { display: grid; justify-items: start; }
.empty h2 { margin-bottom: 7px; }
.metrics, .task-cards { display: grid; grid-template-columns: repeat(4, minmax(145px, 1fr)); gap: 14px; margin: 15px 0; }
.task-cards { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
.metrics > div, .task-card { border: 1px solid var(--z-line); border-radius: var(--radius-card); padding: 16px; background: var(--z-bg); }
.metrics span, .task-card span { display: block; color: var(--z-muted); font-size: .79rem; }
.metrics strong, .task-card strong { display: block; margin-top: 1px; color: var(--z-plum); font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.task-card { color: inherit; text-decoration: none; }
.task-card:hover { border-color: var(--z-magenta); box-shadow: 0 7px 22px rgb(52 5 30 / 8%); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr); gap: 20px; align-items: start; }

.stream-section { margin: 18px 0 28px; }
.stream-bar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 13px 0 0; padding: 0; list-style: none; }
.stream-bar li { position: relative; min-width: 0; }
.stream-bar li:not(:last-child)::after { position: absolute; z-index: 2; top: 29px; right: -7px; width: 14px; height: 14px; transform: rotate(45deg); border-top: 2px solid var(--z-line); border-right: 2px solid var(--z-line); background: white; content: ""; }
.stream-bar a { display: grid; min-height: 152px; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-content: start; border: 2px solid var(--z-line); border-right-width: 1px; padding: 15px 13px; background: white; color: inherit; text-decoration: none; }
.stream-bar li:first-child a { border-radius: var(--radius-card) 0 0 var(--radius-card); }
.stream-bar li:last-child a { border-radius: 0 var(--radius-card) var(--radius-card) 0; }
.stream-bar a:hover { position: relative; z-index: 3; border-color: var(--z-magenta); }
.stream-number { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: var(--z-bg-soft); color: var(--z-muted); font-weight: 700; }
.stream-copy { display: grid; min-width: 0; gap: 3px; }
.stream-copy strong { color: var(--z-plum); }
.stream-copy small { overflow: hidden; font-size: .74rem; font-weight: 700; text-overflow: ellipsis; }
.stream-copy > span { color: var(--z-muted); font-size: .76rem; font-weight: 400; }
.stream-status { grid-column: 2; width: fit-content; margin-top: 8px; border-radius: var(--radius-pill); padding: 2px 8px; background: var(--z-bg-soft); color: var(--z-muted); font-size: .7rem; font-weight: 700; }
.stream-bar .klaar a { border-top-color: var(--z-ok); }
.stream-bar .klaar .stream-number, .stream-bar .klaar .stream-status { background: #EAF5EA; color: var(--z-ok); }
.stream-bar .open a { border-top-color: var(--z-warn); }
.stream-bar .open .stream-number, .stream-bar .open .stream-status { background: #FFF0D8; color: #784800; }
.stream-bar .ontbreekt a { border-top-color: var(--z-err); }
.stream-bar .ontbreekt .stream-number, .stream-bar .ontbreekt .stream-status { background: #FFF4F3; color: var(--z-err); }
.stream-bar .neutraal a { border-top-color: var(--z-line); }
.stream-bar .neutraal .stream-number, .stream-bar .neutraal .stream-status { background: var(--z-bg-soft); color: var(--z-muted); }
.empty-stream .stream-bar .ontbreekt a { border-top-color: var(--z-line); }
.empty-stream .stream-bar .ontbreekt .stream-number, .empty-stream .stream-bar .ontbreekt .stream-status { background: var(--z-bg-soft); color: var(--z-muted); }
.stream-copy .button { width: fit-content; margin-top: 7px; color: white; }
.stream-section.compact { margin: 10px 0 20px; }
.stream-section.compact .stream-bar { margin-top: 0; }
.stream-section.compact .stream-bar a { min-height: 82px; padding: 10px; }
.stream-section.compact .stream-status { display: none; }
.stream-section.compact .stream-bar li:not(:last-child)::after { top: 23px; }

.table-hint { margin: 11px 0 8px; color: var(--z-muted); font-size: .84rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--z-line); border-radius: var(--radius-card); background: white; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { border-bottom: 1px solid var(--z-line); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: var(--z-bg-soft); color: var(--z-plum); font-size: .74rem; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
tbody tr:last-child td, tfoot tr:last-child th { border-bottom: 0; }
table.zebra tbody tr:nth-child(even) td { background: #FCFAFC; }
tbody tr:hover td { background: #FAF5F8; }
tfoot th { background: #F1EFF0; color: var(--z-text); font-weight: 700; }
.number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.number a { color: var(--z-magenta); text-decoration-color: rgb(150 46 100 / 32%); }
.control-line { margin: 8px 0 0; color: var(--z-muted); text-align: right; }

.status, .source-badge { display: inline-flex; width: fit-content; align-items: center; border: 1px solid transparent; border-radius: var(--radius-pill); padding: 2px 9px; background: #E9ECEF; color: #54595E; font-size: .76rem; font-weight: 700; line-height: 1.45; }
.status.vastgesteld, .status.definitief { background: var(--z-plum); color: white; }
.status.proefvastgesteld, .status.proef { background: #FFF0D8; color: #784800; }
.status.gecrediteerd { border-color: var(--z-err); background: white; color: var(--z-err); }
.status.verwerkt, .status.actief, .status.gereed { background: #F6E5EE; color: var(--z-magenta); }
.status.afgekeurd, .status.gefaald { border-color: var(--z-err); background: #FFF4F3; color: var(--z-err); }
.status.nieuwe { border-color: var(--z-magenta); background: #FFF0F7; color: var(--z-plum); }
.status.uitgevoerd { background: #F6E5EE; color: var(--z-magenta); }
.status.geweigerd { border-color: var(--z-err); background: #FFF4F3; color: var(--z-err); }
.audit-action small { display: block; color: var(--z-muted); }
.ok { color: var(--z-ok); }
.missing { color: var(--z-err); font-weight: 700; }
.source-badge.handmatig { background: #F6E5EE; color: var(--z-magenta); }
.source-badge.placeholder, .source-badge.fallback { background: #FFF0D8; color: #784800; }

.message { position: relative; margin: 12px 0; border-left: 4px solid var(--z-magenta); border-radius: 4px; padding: 12px 46px 12px 15px; background: white; box-shadow: 0 2px 9px rgb(52 5 30 / 5%); }
.message.success { border-color: var(--z-magenta); }
.message.warning { border-color: var(--z-warn); background: #FFFAF2; }
.message.error { border-color: var(--z-err); background: #FFF7F6; }
.message-close { position: absolute; top: 5px; right: 7px; min-width: 30px; min-height: 30px; border: 0; padding: 0; background: transparent; color: var(--z-muted); font-size: 1.2rem; }

.statement { margin: 14px 0 20px; overflow: hidden; border: 1px solid var(--z-line); border-radius: var(--radius-card); background: white; }
.statement-head { padding: 16px; }
.statement-head h3, .statement-head p { margin-bottom: 3px; }
.statement table { border-top: 1px solid var(--z-line); }
.audit-details { margin-top: 18px; border: 1px solid var(--z-line); border-radius: var(--radius-card); padding: 13px 16px; background: white; }
.audit-details summary { cursor: pointer; color: var(--z-plum); font-weight: 700; }
.audit-details dl { display: grid; grid-template-columns: 155px minmax(0, 1fr); gap: 6px 15px; }
.audit-details dd { min-width: 0; margin: 0; }
.steps { margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--z-line); padding: 11px 0; }
.steps p { margin: 2px 0 0; color: var(--z-muted); }
.step-number { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #F6E5EE; color: var(--z-magenta); font-weight: 700; }
tr.hit td { background: #FAF0F5; }
.source-list { margin: 0; padding: 0; list-style: none; }
.source-list li { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 16px; border-bottom: 1px solid var(--z-line); padding: 10px 0; }
.block-links { display: grid; gap: 2px; margin-top: 4px; }
.origin { white-space: nowrap; }
.origin-order-rows { display: block; margin-top: 3px; color: var(--z-muted); font-size: .72rem; font-weight: 400; white-space: nowrap; }
.compact-list { margin: 0; padding-left: 18px; }
.lineage-table td:first-child { white-space: nowrap; }

label { display: grid; gap: 5px; color: var(--z-text); font-weight: 700; }
input, select, textarea { min-width: 0; border: 1px solid #B9BDC1; border-radius: 6px; padding: 9px 10px; background: white; color: var(--z-text); }
input:focus, select:focus, textarea:focus { border-color: var(--z-magenta); box-shadow: 0 0 0 2px rgb(150 46 100 / 14%); }
textarea { resize: vertical; }
.checkbox { display: flex; align-items: center; gap: 9px; }
.checkbox input, .choice-card input { min-width: auto; accent-color: var(--z-magenta); }
.upload-form, .stacked-form { display: grid; max-width: 700px; gap: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 12px; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sentence-list { display: grid; gap: 10px; }
.sentence-rule { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--z-line); border-radius: var(--radius-card); padding: 13px 15px; background: white; }
.sentence-input { display: flex; flex: 1; align-items: center; flex-wrap: wrap; gap: 6px; }
.sentence-input label { display: inline; }
.sentence-input input { width: 8rem; }
.sentence-input small, .rule-help, .condition-card small, .choice-card small { color: var(--z-muted); }
.inline-label { display: flex; align-items: center; gap: 6px; font-size: .84rem; }
.inline-label input { width: 4.5rem; padding: 5px; }
.preview { border: 2px solid var(--z-magenta); border-radius: var(--radius-card); padding: 18px; background: #FFF9FC; }
.difference.positive { color: var(--z-ok); font-weight: 700; }
.difference.negative { color: var(--z-err); font-weight: 700; }
.rule-group { margin: 14px 0 20px; padding: 18px; border-left: 4px solid var(--z-magenta); }
.condition-card { display: flex; flex-direction: column; margin: 12px 0; }
.condition-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.condition-heading h3 { margin: 0 0 7px; font-size: 22px; font-weight: 700; }
.condition-heading > label { flex: 0 0 7rem; }
.condition-terms { display: grid; gap: 7px; margin: 12px 0; }
.term-row { display: grid; grid-template-columns: 3rem minmax(220px, 2fr) minmax(100px, 1fr) minmax(120px, 1fr); gap: 7px; align-items: center; }
.condition-effect { display: grid; grid-template-columns: 10rem minmax(280px, 1fr) auto; align-items: end; gap: 10px; }
.condition-validity { margin: 0 0 10px; color: var(--z-muted); white-space: nowrap; }
.condition-card > .row-actions { margin-top: 16px; }
.condition-card > .rule-help { margin-bottom: 0; }
.add-condition { display: block; min-height: 0; margin-top: 24px; background: var(--z-bg-soft); }
.optional-condition, .advanced-condition { border: 1px solid var(--z-line); border-radius: 6px; padding: 10px 12px; background: white; }
.optional-condition summary, .advanced-condition summary { cursor: pointer; color: var(--z-plum); font-weight: 700; }
.optional-condition .term-row, .advanced-condition label { margin-top: 12px; }
.advanced-condition small { display: block; margin-top: 6px; }
.choice-card span { display: flex; align-items: center; gap: 8px; }
.choice-card small { display: block; margin: 6px 0 0 27px; font-weight: 400; }

.checklist ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 10px; padding: 0; list-style: none; }
.checklist li { display: flex; align-items: center; gap: 11px; border: 1px solid var(--z-line); border-radius: var(--radius-card); padding: 12px; background: white; }
.checklist li span { display: grid; flex: none; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: var(--z-plum); color: white; font-weight: 700; }
.report { border-top: 4px solid var(--z-magenta); padding-top: 18px; }
.history-filters { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)) auto auto; align-items: end; gap: 10px; margin: 15px 0 20px; }
.chain-check { margin: 12px 0; border: 1px solid var(--z-line); border-radius: var(--radius-card); padding: 10px 14px; background: white; font-weight: 700; }
.chain-check.ok { border-left: 4px solid var(--z-ok); }
.history-table details { min-width: 210px; }
.history-table dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin-bottom: 0; }
.history-table dd { margin: 0; }
.party-balance { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; border: 2px solid var(--z-line); border-radius: var(--radius-card); padding: 17px; background: white; }
.party-balance.closed { border-left: 5px solid var(--z-ok); }
.party-balance > div { min-width: 115px; }
.party-balance span { color: var(--z-muted); }
.party-balance strong { display: block; color: var(--z-plum); font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.party-balance .status { margin-left: auto; }
.party-tree { margin: 16px 0 0; padding-left: 27px; }
.party-tree > li { position: relative; border-left: 3px solid #E5CAD8; padding: 0 0 21px 25px; }
.party-tree > li::before { position: absolute; top: 0; left: -9px; width: 15px; height: 15px; border: 3px solid white; border-radius: 50%; background: var(--z-magenta); box-shadow: 0 0 0 1px var(--z-magenta); content: ""; }
.party-tree > li:last-child { border-left-color: transparent; }
.party-tree ul { margin: 7px 0 0; padding-left: 20px; }
.party-tree p { margin: 6px 0 0; color: var(--z-muted); }
.party-invoices details { margin-top: 7px; }
.party-invoices summary { cursor: pointer; color: var(--z-plum); font-weight: 700; }
.party-timeline { margin: 0; padding: 0; list-style: none; }
.party-timeline li { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 14px; border-bottom: 1px solid var(--z-line); padding: 9px 0; }
.party-timeline time { color: var(--z-muted); font-size: .82rem; }
.party-balance-heading { margin-top: 25px; }
.party-balance-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.party-balance-cards a { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; border: 1px solid var(--z-line); border-radius: var(--radius-card); padding: 13px; background: white; color: inherit; text-decoration: none; }
.party-balance-cards strong { grid-column: 1 / -1; color: var(--z-plum); }
.party-balance-cards span { color: var(--z-muted); font-size: .8rem; }
.party-balance-cards em { grid-column: 2; grid-row: 2 / span 3; align-self: center; font-style: normal; }
.number-sequence { display: grid; grid-template-columns: minmax(180px, .6fr) minmax(0, 2fr); gap: 20px; margin: 12px 0 19px; border: 1px solid var(--z-line); border-left: 4px solid var(--z-magenta); border-radius: var(--radius-card); padding: 16px; background: white; }
.number-sequence h3 { margin: 0; }
.number-sequence ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.number-sequence li { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(0, 2fr) auto; gap: 10px; align-items: center; }
.hash-card { display: grid; gap: 6px; }
.raw-json { max-height: 70vh; overflow: auto; border-radius: var(--radius-card); padding: 16px; background: #230314; color: #FFF5FA; font: .82rem/1.55 ui-monospace, monospace; white-space: pre-wrap; }
.list-detail { display: grid; grid-template-columns: minmax(330px, 44%) minmax(0, 1fr); min-height: 420px; overflow: hidden; border: 1px solid var(--z-line); border-radius: var(--radius-card); background: white; }
.list-detail-list { min-width: 0; overflow: auto; border-right: 1px solid var(--z-line); padding: 15px; background: var(--z-bg-soft); }
.list-detail-main { min-width: 0; padding: 22px; }
.list-detail-main .metrics { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
.style-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: grid; width: 105px; height: 82px; align-content: end; border-radius: var(--radius-card); padding: 8px; color: white; font-size: .72rem; }
.swatch.soft { border: 1px solid var(--z-line); color: var(--z-text); }

.login-body { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: var(--z-navigation-gradient); }
.login-shell { display: grid; width: min(920px, 100%); grid-template-columns: minmax(260px, 1fr) minmax(340px, 440px); align-items: center; gap: clamp(30px, 7vw, 90px); }
.login-brand { padding: 24px; color: white; }
.login-brand img { display: block; width: min(240px, 75%); margin-bottom: 28px; }
.login-brand p { max-width: 380px; color: white; }
.login-card { width: 100%; margin: 0; border-radius: 12px; padding: clamp(28px, 5vw, 46px); background: white; box-shadow: 0 25px 70px rgb(20 0 11 / 28%); }
.login-card h1 { font-size: 30px; }
.login-card form { display: grid; gap: 15px; }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }

@media (max-width: 1000px) {
  .metrics { grid-template-columns: repeat(2, minmax(145px, 1fr)); }
  .history-filters { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  .stream-bar { grid-template-columns: 1fr; gap: 8px; }
  .stream-bar li:not(:last-child)::after { display: none; }
  .stream-bar a, .stream-section.compact .stream-bar a { min-height: auto; border-width: 1px; border-left-width: 4px; border-radius: var(--radius-card) !important; }
  .stream-bar .klaar a { border-left-color: var(--z-ok); }
  .stream-bar .open a { border-left-color: var(--z-warn); }
  .stream-bar .ontbreekt a { border-left-color: var(--z-err); }
}

@media (max-width: 899px) {
  .app-shell { display: block; padding-top: 58px; background: var(--z-bg-soft); }
  .mobile-header { position: fixed; z-index: 60; inset: 0 0 auto; display: flex; height: 58px; align-items: center; justify-content: space-between; padding: 0 15px; background: var(--z-navigation-gradient); box-shadow: 0 3px 12px rgb(52 5 30 / 18%); }
  .mobile-header a { width: 105px; }
  .mobile-header label { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgb(255 255 255 / 50%); border-radius: 50%; color: white; cursor: pointer; font-size: 1.45rem; }
  .sidebar { position: fixed; z-index: 55; inset: 58px auto 0 0; width: min(320px, 86vw); height: auto; transform: translateX(-105%); background: var(--z-navigation-gradient); transition: transform .2s ease; box-shadow: 12px 0 35px rgb(20 0 11 / 25%); }
  .sidebar-brand { display: none; }
  .navigation-toggle:checked ~ .sidebar { transform: translateX(0); }
  .navigation-scrim { position: fixed; z-index: 50; inset: 58px 0 0; background: rgb(23 0 13 / 48%); }
  .navigation-toggle:checked ~ .navigation-scrim { display: block; }
  .workspace { min-height: calc(100vh - 58px); padding: 25px 18px 50px; }
  .context-line { margin-top: 0; }
  .dashboard-grid, .list-detail { grid-template-columns: 1fr; }
  .dashboard-grid > section { min-width: 0; }
  .list-detail-list { max-height: 55vh; border-right: 0; border-bottom: 1px solid var(--z-line); }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
}

@media (max-width: 620px) {
  h1 { font-size: 28px; }
  .page-heading, .section-heading, .statement-head { flex-direction: column; }
  .page-heading .actions, .page-heading > .button { width: 100%; justify-content: flex-start; }
  .actions, .row-actions { justify-content: flex-start; }
  .metrics, .task-cards, .form-grid, .two-columns, .history-filters, .term-row, .condition-effect { grid-template-columns: 1fr; }
  .condition-card { min-height: 0; }
  .condition-heading { flex-direction: column; }
  .condition-heading > label { width: 100%; flex-basis: auto; }
  .condition-validity { white-space: normal; }
  .source-list li { grid-template-columns: 1fr; }
  .sentence-rule { display: grid; grid-template-columns: 1fr; }
  .steps li { grid-template-columns: 30px minmax(0, 1fr); }
  .steps li > .number { grid-column: 2; text-align: left; }
  .audit-details dl { grid-template-columns: 1fr; }
  .party-timeline li, .number-sequence, .number-sequence li { grid-template-columns: 1fr; }
  .party-balance .status { margin-left: 0; }
  .login-body { padding: 15px; }
  .login-card { padding: 26px 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
