/* Rechtsregister – Awareness Legal Register design system (tokens.json version 2, family dashboard set v1).
   Token names and values are the system's; the short --s* names are aliases kept for this stylesheet. */
@font-face { font-family: "Lexend Deca"; font-weight: 300; font-display: swap; src: url("fonts/LexendDeca-Light.ttf") format("truetype"); }
@font-face { font-family: "Lexend Deca"; font-weight: 400; font-display: swap; src: url("fonts/LexendDeca-Regular.ttf") format("truetype"); }
@font-face { font-family: "Lexend Deca"; font-weight: 500; font-display: swap; src: url("fonts/LexendDeca-Medium.ttf") format("truetype"); }
@font-face { font-family: "Lexend Deca"; font-weight: 600; font-display: swap; src: url("fonts/LexendDeca-SemiBold.ttf") format("truetype"); }

:root {
  --navy: #00305a; --steel: #749fba; --steel-deep: #477590; --steel-soft: #9fbdd1; --mist: #f4f7f9; --line: #dde5eb;
  --ink: #21262b; --ink-muted: #5c6b76; --ink-faint: #9aa7b0; --white: #ffffff;
  --text-body: var(--ink); --text-muted: var(--ink-muted); --text-heading: var(--navy); --text-meta: var(--steel-deep);
  --text-on-dark: var(--white); --text-muted-on-dark: var(--steel-soft);
  --surface-page: var(--white); --surface-card: var(--mist); --surface-dark: var(--navy);
  --nav-divider: rgba(255,255,255,0.12); --nav-hover: rgba(255,255,255,0.06); --nav-active: rgba(255,255,255,0.08);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --space-7: 48px; --space-8: 64px; --space-9: 72px;
  --layout-nav-width: 240px; --layout-main-max: 1240px; --layout-aside-width: 300px;
  --radius-none: 0px; --radius-pill: 99px; --radius-round: 50%;
  --overlay: rgba(0,48,90,0.32); --layout-panel-width: 480px; --layout-panel-wide: 760px;
  --sans: "Lexend Deca", "Segoe UI", sans-serif;
  --s1: var(--space-1); --s2: var(--space-2); --s3: var(--space-3); --s4: var(--space-4); --s5: var(--space-5);
  --s6: var(--space-6); --s7: var(--space-7); --s8: var(--space-8);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 15px/1.7 var(--sans); }
a { color: var(--navy); text-underline-offset: 3px; transition: color 150ms; }
a:hover { color: var(--steel); }
h1, h2 { font-weight: 300; color: var(--navy); line-height: 1.25; margin: 0 0 var(--s4); }
h1 { font-size: 34px; } h2 { font-size: 24px; margin-top: var(--s7); }
h3 { font-weight: 500; font-size: 19px; color: var(--navy); line-height: 1.25; margin: 0 0 var(--s2); }
p { margin: 0 0 var(--s4); max-width: 72ch; }
.label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); line-height: 1.25; }
.muted, .small { color: var(--ink-muted); font-size: 13px; }

/* shell: navy side navigation, white work area (AppShell) */
.shell { display: grid; grid-template-columns: var(--layout-nav-width) minmax(0, 1fr); min-height: 100vh; }
/* The side navigation stays in the window: brand on top, version and sign-out at the bottom edge, the menu between them scrolls. */
.sidenav { background: var(--surface-dark); color: var(--text-on-dark); padding: var(--space-5) 0; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; height: 100dvh; align-self: start; }
.brandblock { padding: 0 var(--space-5) var(--space-6); border-bottom: 1px solid var(--nav-divider); margin-bottom: var(--space-4); }
/* lockup inline as SVG, as wide as the navigation allows (192 px of 240, about 48 px high; minimum 150 px);
   clear space below it at least the width of the stroke (16.3 of 37.1 units of height, about 21 px) */
.brandblock .brand { display: block; line-height: 0; max-width: 192px; }
.brandblock .brand svg { display: block; width: 100%; height: auto; stroke: none; }  /* the icon line style of the navigation must not reach the logo */
.brandblock .label { margin-top: var(--space-5); color: var(--steel); }
.sidenav nav { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }
.sidenav .navfill { flex: 1; }
.sidenav .group > .label { padding: var(--space-4) var(--space-5) var(--space-2); color: var(--steel); }
.sidenav nav a { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-5); color: var(--text-on-dark);
  text-decoration: none; font-size: 14px; line-height: 1.7; border-left: 3px solid transparent; transition: background 150ms; }
.sidenav nav a:hover { background: var(--nav-hover); color: var(--text-on-dark); }
.sidenav nav a.on { background: var(--nav-active); border-left-color: var(--steel); }
.sidenav nav a:focus-visible, .sidenav .brand:focus-visible, .logout button:focus-visible { outline: 2px solid var(--steel); outline-offset: -2px; }
.sidenav svg { flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sidenav .count { margin-left: auto; font-size: 12px; color: var(--text-muted-on-dark); }
/* the user line: the person (photo or initials, name) as a link to the account, below it version and sign-out */
.userline { padding: var(--space-4) var(--space-5) 0; border-top: 1px solid var(--nav-divider); font-size: 12px; line-height: 1.5;
  color: var(--text-muted-on-dark); display: flex; flex-direction: column; gap: var(--space-2); }
.userline .account { display: flex; align-items: center; gap: var(--space-3); min-width: 0; font-size: 14px; color: var(--text-on-dark); text-decoration: none; }
.userline .account .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.userline a.account:hover .name, .userline a.account.on .name { color: var(--steel); text-decoration: underline; text-underline-offset: 3px; }
.userline a.account:focus-visible { outline: 2px solid var(--steel); outline-offset: 2px; }
.userline .meta-line { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); }
.logout { display: inline; }
.logout button { background: none; border: 0; min-height: 0; padding: 0; font: 400 12px/1.5 var(--sans); color: var(--text-on-dark); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.logout button:hover { background: none; color: var(--steel); }
.work { min-width: 0; display: flex; flex-direction: column; }
main { padding: var(--space-7) var(--space-7) var(--space-9); max-width: var(--layout-main-max); width: 100%; flex: 1; }

/* page head, tiles, notices, activity (PageHead, StatTile, Notice, ActivityList, EmptyState) */
.crumb { font-size: 12px; line-height: 1.7; color: var(--text-muted); margin-bottom: var(--space-2); }
.crumb + .label { display: block; margin-bottom: var(--space-2); }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-6); }
.pagehead h1 { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin: var(--space-6) 0 var(--space-7); }
.tile { display: block; background: var(--surface-card); padding: var(--space-5); text-decoration: none; outline-offset: 2px; }
a.tile:hover, a.tile:focus-visible { outline: 2px solid var(--navy); }
.tile .label { display: block; margin-bottom: var(--space-3); }
.tile b { display: block; font-size: 40px; font-weight: 300; line-height: 1; color: var(--navy); }
.tile .note { display: block; font-size: 13px; line-height: 1.7; color: var(--text-muted); margin-top: var(--space-2); }
.tile.dark { background: var(--surface-dark); }
.tile.dark .label { color: var(--steel); } .tile.dark b { color: var(--text-on-dark); } .tile.dark .note { color: var(--text-muted-on-dark); }
.note-panel { background: var(--surface-card); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-5); font-size: 15px; }
.note-panel strong { font-weight: 500; color: var(--navy); margin-right: var(--space-1); }
main section { margin-bottom: var(--space-6); }
main section > h3 { margin-bottom: var(--space-4); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) var(--layout-aside-width); gap: var(--space-6); align-items: start; }
.two-col.single { grid-template-columns: minmax(0, 1fr); }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { padding: var(--space-3) 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.7; display: flex; justify-content: space-between; gap: var(--space-4); }
.activity li:last-child { border-bottom: 0; }
.activity strong { font-weight: 500; }
.activity .ctx { display: block; font-size: 12px; color: var(--text-muted); }
.activity .when { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.empty { padding: var(--space-6); text-align: center; color: var(--text-muted); border: 1px dashed var(--line); }

/* forms */
.search { display: flex; gap: 0; max-width: 720px; flex-wrap: wrap; margin-bottom: var(--space-5); }
.search input[type=search] { flex: 1 1 320px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 0; padding: var(--s2) var(--s3); min-height: 44px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--steel); outline-offset: 0; border-color: var(--navy); }
textarea { width: 100%; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; line-height: 1.5; }
button, .btn { font: 500 14px/1 var(--sans); background: var(--navy); color: var(--white); border: 1px solid var(--navy); border-radius: 0; padding: 0 var(--s5); min-height: 44px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; transition: background 150ms; }
button:hover, .btn:hover { background: var(--steel); border-color: var(--steel); color: var(--navy); }
button.ghost, .btn.ghost { background: var(--white); color: var(--navy); }
button.ghost:hover, .btn.ghost:hover { background: var(--mist); color: var(--navy); border-color: var(--navy); }
.filters { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; margin: var(--s4) 0 var(--s5); }
.filters a { font-size: 13px; padding: var(--s1) var(--s3); border: 1px solid var(--line); text-decoration: none; }
.filters a.on { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* tables (DataTable): label heads over a navy rule, hairlines, alternating rows, no vertical rules */
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.7; }
th { text-align: left; font-weight: 400; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; line-height: 1.25; color: var(--text-muted);
     padding: var(--space-3); border-bottom: 1px solid var(--navy); white-space: nowrap; }
td { padding: 10px var(--space-3); border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:nth-child(even) td { background: var(--surface-card); }
td.ref { font-size: 13px; font-weight: 500; letter-spacing: .04em; color: var(--navy); white-space: nowrap; }
td.ref a { text-decoration: none; } td.ref a:hover { text-decoration: underline; }
td.ref.long { white-space: normal; min-width: 320px; max-width: 560px; letter-spacing: 0; }
details.source-notes { margin: var(--space-2) 0 var(--space-4); font-size: 13px; color: var(--text-muted); }
details.source-notes summary { cursor: pointer; color: var(--text-body); }
.proc-note { margin-top: var(--space-1); font-size: 12px; font-weight: 400; color: var(--text-muted); letter-spacing: 0; }
tr.ended td.ref a { color: var(--text-muted); }
td.stage-cell { min-width: 190px; }
.stages { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-1); padding: 0; margin: var(--space-4) 0 var(--space-5); }
.stages li { flex: 1 1 110px; border-top: 3px solid var(--line); padding: var(--space-2) var(--space-1) 0 0; font-size: 12px; color: var(--text-muted); }
.stages li .n { display: block; font-size: 11px; letter-spacing: .12em; }
.stages li.now { border-top-color: var(--navy); color: var(--navy); font-weight: 500; }
td.act { white-space: nowrap; width: 1%; font-size: 13px; }
td .empty { border: 0; padding: var(--space-5); }
td.muted-cell { color: var(--text-muted); }
.meta-cell { color: var(--text-meta); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-scroll { overflow-x: auto; }

/* blocks */
.panel { background: var(--mist); padding: var(--s5); margin-bottom: var(--s5); }
.card { border: 1px solid var(--line); padding: var(--s5); margin-bottom: var(--s4); background: var(--white); }
.hit { padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.hit p { margin: var(--s1) 0 0; }
mark { background: var(--line); color: var(--ink); padding: 0 2px; }
.section { padding: var(--s5) 0; border-bottom: 1px solid var(--line); }
.section h3 .key { color: var(--ink-muted); font-weight: 400; margin-right: var(--s2); }
.section p { font-size: 14px; }
.meta { display: flex; gap: var(--s6); flex-wrap: wrap; margin: var(--s4) 0 var(--s5); }
.meta div { display: flex; flex-direction: column; gap: var(--s1); }

/* StatusBadge: four looks that differ in fill and outline, never in hue; the word carries the meaning.
   action = navy fill · changed = steel fill, navy text · met = navy outline · na = hairline outline */
.badge { display: inline-block; font-size: 11px; line-height: 1.25; letter-spacing: .16em; text-transform: uppercase; padding: var(--space-1) var(--space-3);
         border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--white); color: var(--text-muted); white-space: nowrap; }
.b-error, .b-silent { background: var(--navy); color: var(--white); border-color: var(--navy); }
.b-warning, .b-geaendert, .b-busy { background: var(--steel); color: var(--navy); border-color: var(--steel); }
.b-ok, .b-aufgenommen, .b-neu { background: var(--white); color: var(--navy); border-color: var(--navy); }
.b-planned, .b-off, .b-pending, .b-nicht_mehr_gelistet, .b-entfallen { background: var(--white); color: var(--text-muted); border-color: var(--line); }

/* diff */
.diff { font-size: 14px; line-height: 1.8; }
del { background: var(--mist); color: var(--ink-muted); text-decoration: line-through; }
ins { background: var(--line); color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--steel); }
.ai { padding: var(--s4) var(--s5); background: var(--mist); margin: var(--s5) 0; }
.ai .label { display: block; margin-bottom: var(--s2); }

/* notice */
.notice { background: var(--mist); border-bottom: 1px solid var(--line); display: flex; gap: var(--s5); align-items: center; justify-content: space-between; padding: var(--s4) var(--space-7); flex-wrap: wrap; }
.notice p { margin: 0; font-size: 14px; }
.flash { background: var(--mist); padding: var(--s3) var(--s4); margin-bottom: var(--s5); font-size: 15px; }
.devbar { background: var(--steel-soft); color: var(--navy); font-size: 12px; text-align: center; padding: var(--s1); }

footer { border-top: 1px solid var(--line); padding: var(--s5) var(--space-7) var(--s7); font-size: 12px; color: var(--ink-muted); display: flex; gap: var(--s5); flex-wrap: wrap; }
footer a { color: var(--ink-muted); }

details summary { cursor: pointer; color: var(--navy); font-size: 14px; }
.src-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s3); align-items: end; margin-top: var(--s3); }
.src-form label { display: flex; flex-direction: column; gap: var(--s1); font-size: 12px; color: var(--ink-muted); }
.src-form .wide { grid-column: 1 / -1; }
.check { flex-direction: row !important; align-items: center; gap: var(--s2) !important; }
.check input { min-height: auto; }

/* below layout-breakpoint: navigation above the work area, tiles two abreast, two-column sections stacked */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .sidenav { padding-bottom: var(--space-4); position: static; height: auto; }
  .sidenav nav { overflow: visible; }
  .brandblock { padding-bottom: var(--space-4); }
  .sidenav nav { flex-direction: row; flex-wrap: wrap; }
  .sidenav .group { flex: 1 1 200px; }
  .userline { margin-top: var(--space-4); }
  main { padding: var(--space-5) var(--space-4) var(--space-7); }
  .notice, footer { padding-left: var(--space-4); padding-right: var(--space-4); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 28px; }
}

/* login */
.login { display: grid; gap: var(--s4); max-width: 360px; }
.login label { display: flex; flex-direction: column; gap: var(--s1); font-size: 13px; color: var(--ink-muted); }

/* second factor */
.twofa { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: var(--s6); align-items: start; margin-top: var(--s5); }
.qr { border: 1px solid var(--line); padding: var(--s2); background: var(--white); }
.qr svg { display: block; width: 100%; height: auto; }
.key { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 15px; letter-spacing: .06em; background: var(--mist); padding: var(--s3) var(--s4); word-break: break-word; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); max-width: 520px; }
.codes li { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 16px; background: var(--mist); padding: var(--s2) var(--s4); }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; background: var(--mist); padding: 1px 6px; }
.twofa h3 { margin-top: var(--s5); } .twofa h3:first-child { margin-top: 0; }
@media (max-width: 640px) { .twofa { grid-template-columns: 1fr; } .qr { max-width: 240px; } }

/* legal types: grouped by binding force, lightness instead of hue */
.filterbar { display: flex; gap: var(--s3); align-items: end; flex-wrap: wrap; margin: var(--s4) 0 var(--s5); }
.filterbar label { display: flex; flex-direction: column; gap: var(--s1); font-size: 12px; color: var(--ink-muted); }
.filterbar select { min-width: 150px; max-width: 260px; }
.filterbar input[type=date] { min-width: 150px; }
.kind { display: flex; gap: var(--s3); align-items: baseline; flex-wrap: wrap; margin: 0 0 var(--s4); max-width: 90ch; }
.t-gesetz, .t-verordnung, .t-eu-verordnung, .t-dguv-vorschrift { background: var(--navy); color: var(--white); border-color: var(--navy); }
.t-eu-richtlinie, .t-eu-beschluss, .t-technische-regel, .t-dguv-regel { background: var(--white); color: var(--navy); border-color: var(--navy); }
.t-dguv-information, .t-dguv-grundsatz, .t-fachinformation, .t-sonstige { background: var(--white); color: var(--text-muted); border-color: var(--line); }

/* linked status: hover shows the reason (title), click leads to where it is explained and fixed */
a.badge.linked { text-decoration: none; cursor: pointer; }
a.badge.linked:hover, a.badge.linked:focus-visible { outline: 2px solid var(--steel); outline-offset: 2px; }
a.badge.linked::after { content: " ›"; }
.flash a { color: var(--navy); }
.actions { margin-top: var(--s5); }
.admin-note { margin: var(--s4) 0; }
.admin-note summary { cursor: pointer; font-size: 13px; }
form.inline { display: inline-flex; gap: var(--s2); align-items: center; margin: 0 var(--s2) var(--s2) 0; }
form.inline select { min-height: 44px; }
.user-actions { min-width: 280px; }
code.secret { font-size: 20px; letter-spacing: 0.04em; user-select: all; }
details.card > summary { cursor: pointer; }
.guide { margin: var(--s4) 0; }
#test { margin-top: var(--s6); }
.guide ol { margin: 0 0 var(--s4) var(--s5); padding: 0; max-width: 72ch; }
.guide li { margin-bottom: var(--s2); }
.pager { display: flex; gap: var(--s4); align-items: center; flex-wrap: wrap; }

/* topics, sorting, comments, comparison of two states */
.topic { display: inline-block; border: 1px solid var(--line); padding: 0 var(--space-2); margin: 0 var(--space-1) var(--space-1) 0; color: var(--text-muted); }
.topic.main { border-color: var(--navy); color: var(--navy); }
.topic.official { border-color: var(--steel); color: var(--steel-deep); }
.topic .tag { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--steel-deep); }
.topic-form, .comment-form { display: grid; gap: var(--space-3); max-width: 760px; margin-top: var(--space-3); }
.topic-form label, .comment-form label { display: flex; flex-direction: column; gap: var(--space-1); font-size: 12px; color: var(--text-muted); }
.topic-pick { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); padding: var(--space-2) var(--space-3); }
.topic-pick label { flex-direction: row; align-items: center; gap: var(--space-2); font-size: 13px; color: var(--ink); }
.topic-pick input { min-height: auto; }
.d1 { padding-left: var(--space-4); } .d2 { padding-left: var(--space-6); } .d3 { padding-left: var(--space-7); } .d4 { padding-left: var(--space-8); }
td.d1 { padding-left: 28px; } td.d2 { padding-left: 44px; } td.d3 { padding-left: 60px; } td.d4 { padding-left: 76px; }
button.linklike { background: none; border: 0; min-height: 0; padding: 0; font: 400 13px/1.7 var(--sans); color: var(--navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
button.linklike:hover { background: none; color: var(--steel); }
.comments { list-style: none; margin: 0 0 var(--space-4); padding: 0; }
.comments li { padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.comments li:target { background: var(--surface-card); }
.comments p { margin: var(--space-1) 0 0; font-size: 14px; }
.side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.side-by-side > div { min-width: 0; }
.side-by-side .label { display: block; margin-bottom: var(--space-2); }
.side-by-side p { font-size: 14px; }
@media (max-width: 900px) { .side-by-side { grid-template-columns: 1fr; } }
input[type=radio], input[type=checkbox] { min-height: auto; padding: 0; accent-color: var(--navy); }

/* questions to the register */
a.cite { font-size: 13px; font-weight: 500; white-space: nowrap; }
.cite.missing { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.ask { display: grid; gap: var(--space-2); max-width: 860px; }
.ask textarea { font-family: var(--sans); font-size: 15px; }
.ask-actions { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
button:disabled, textarea:disabled { opacity: .5; cursor: not-allowed; }

/* dashboard: self-contained widgets on a grid of twelve columns; the order comes from the data */
.widgets { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
.widget { border: 1px solid var(--line); padding: var(--space-5); margin: 0; min-width: 0; background: var(--white); }
main .widget { margin-bottom: 0; }
.widget > h3 { margin-bottom: var(--space-4); }
.widget p.small { margin: var(--space-3) 0 0; }
.span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.state-counts { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.state-counts a { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; text-decoration: none; outline-offset: 4px; }
.state-counts a:hover, .state-counts a:focus-visible { outline: 2px solid var(--navy); }
.state-counts b { font-size: 34px; font-weight: 300; line-height: 1; color: var(--navy); }
@media (max-width: 1100px) { .span-4 { grid-column: span 6; } }
@media (max-width: 900px) { .span-4, .span-6, .span-8 { grid-column: span 12; } }

/* maintenance record: cause and note stacked inside the cell */
.incident-form { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-2); max-width: 340px; }
.incident-form select, .incident-form input { width: 100%; }
.incident-form button { align-self: flex-start; }

/* settings: one field per row, explanation and source of the value below it */
.settings { display: flex; flex-direction: column; gap: var(--space-5); max-width: 760px; margin-bottom: var(--space-4); }
.settings .setting label { display: block; font-weight: 500; margin-bottom: var(--space-2); }
.settings .setting input:not([size]), .settings .setting textarea { width: 100%; }
.settings .setting p { margin: var(--space-2) 0 0; }
.settings .source { color: var(--text-muted); margin-left: var(--space-2); }
.settings .error { display: block; color: var(--navy); font-weight: 500; }
.resets { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-6); }

/* language switch in the footer: text buttons, the current language without underline */
.language { display: inline-flex; gap: var(--s3); }
.language button { background: none; border: 0; min-height: 0; padding: 0; font: 400 12px/1.5 var(--sans); color: var(--ink-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.language button:hover { background: none; color: var(--ink); }
.language button.on { text-decoration: none; color: var(--ink); cursor: default; }
table.translations td { vertical-align: top; width: 33%; }
table.translations textarea { width: 100%; min-width: 14rem; }

/* alphabet bar above the list of regulations: letters with entries are links, the others are muted */
.alphabet { display: flex; flex-wrap: wrap; gap: var(--s1); margin: var(--s4) 0; }
td .sub { font-weight: 400; color: var(--ink-muted); margin-top: var(--s1); max-width: 60ch; }
.alphabet a, .alphabet span { min-width: 1.9rem; padding: var(--s2) var(--s2); text-align: center; font-size: 13px; border: 1px solid var(--line); text-decoration: none; color: var(--navy); background: var(--white); }
.alphabet span { color: var(--ink-faint); background: none; border-color: transparent; }
.alphabet a:hover { background: var(--mist); border-color: var(--navy); }
.alphabet a.on { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* sources: one filterable list, each row opens for setup and actions (0.23.0) */
.source-list { border-top: 1px solid var(--navy); }
.source-head, .source-row > summary { display: grid; grid-template-columns: minmax(0, 1fr) 9rem 7rem 9rem 5rem; gap: var(--s4); align-items: start; padding: var(--s4) var(--s3); }
.source-head { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); border-bottom: 1px solid var(--line); }
.source-row { border-bottom: 1px solid var(--line); }
.source-row:nth-child(odd) { background: var(--mist); }
.source-row > summary { cursor: pointer; list-style: none; }
.source-row > summary::-webkit-details-marker { display: none; }
.source-row > summary .ref::before { content: "▸"; display: inline-block; width: 1.2em; color: var(--steel); }
.source-row[open] > summary .ref::before { content: "▾"; }
.source-row > summary .sub { display: block; margin-left: 1.2em; }
.source-row[open] { background: var(--white); outline: 1px solid var(--navy); outline-offset: -1px; }
.source-body { padding: 0 var(--s5) var(--s5) calc(var(--s3) + 1.2em); }
.bulk { margin: var(--s4) 0; }
@media (max-width: 900px) { .source-head { display: none; } .source-row > summary { grid-template-columns: 1fr 1fr; } .source-row > summary .ref { grid-column: 1 / -1; } }

/* use the width: settings in columns, two sections side by side, longer lines of explanation (0.24.0) */
p { max-width: 96ch; }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--space-5) var(--space-6); max-width: none; align-items: start; }
.settings > div:last-child { grid-column: 1 / -1; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-7); align-items: start; }
.two-col .settings { grid-template-columns: 1fr; }
.source-body h4 { margin: var(--s5) 0 var(--s2); font-size: 14px; font-weight: 500; color: var(--navy); }
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }

.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; min-height: 0; padding: 0; background: none; border: 1px solid transparent; color: var(--navy); cursor: pointer; }
.icon-btn:hover { background: var(--mist); border-color: var(--line); color: var(--navy); }
.icon-btn.send { background: var(--navy); color: var(--white); }
.icon-btn.send:hover { background: var(--steel); border-color: var(--steel); color: var(--white); }
.icon-btn.recording { background: var(--navy); color: var(--white); outline: 2px solid var(--steel); outline-offset: 2px; }
.icon-btn:disabled { opacity: .4; cursor: default; }
.source-row > summary .msg { grid-column: 1 / -1; margin-left: 1.2em; color: var(--ink-muted); }
.state-counts a.on { outline: 2px solid var(--navy); outline-offset: 6px; }
main > .state-counts { margin: var(--s5) 0 var(--s6); gap: var(--space-6); }

/* pager with page numbers: where one is in the list and where one can go (0.25.0) */
nav.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin: var(--s4) 0; }
nav.pager .pages { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
nav.pager .pages a, nav.pager .pages b, nav.pager .pages span { min-width: 2rem; padding: var(--s2) var(--s3); text-align: center; font-size: 13px; }
nav.pager .pages a { border: 1px solid var(--line); text-decoration: none; color: var(--navy); background: var(--white); }
nav.pager .pages a:hover { background: var(--mist); border-color: var(--navy); }
nav.pager .pages b { background: var(--navy); color: var(--white); font-weight: 500; border: 1px solid var(--navy); }

/* switches on the AI page: what runs, in one line each, with the button that changes it (0.26.0) */
.switches { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--s5); margin: 0 0 var(--s6); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4) var(--s5); border: 1px solid var(--line); }
.switch > div { display: flex; flex-direction: column; gap: var(--s1); }
.switch b { font-size: 18px; font-weight: 500; color: var(--navy); }

/* subject areas and application areas, linked n:m: every link is a chip that can be removed (0.27.0) */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s3) 0; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: var(--s1); padding: 0 0 0 var(--s3); border: 1px solid var(--line); background: var(--white); font-size: 13px; line-height: 1.9; margin: 0 var(--s1) var(--s1) 0; }
.chip a { text-decoration: none; color: var(--navy); }
.chip .x { min-height: 0; padding: 0 var(--s2); background: none; border: 0; color: var(--ink-muted); cursor: pointer; font-size: 15px; line-height: 1.6; }
.chip .x:hover { background: var(--mist); color: var(--navy); }
.chip.inherited { padding: 0 var(--s3); color: var(--ink-muted); border-style: dashed; }
td.links { min-width: 16rem; }
td.links .add-link select { min-height: 0; padding: var(--s1) var(--s2); font-size: 13px; max-width: 9rem; }
.area { margin-bottom: var(--s4); } .area.d1 { margin-left: var(--s7); }
.area-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.area-head h3 { margin: 0; }

/* AI page: live state of the classification (0.28.0) */
.activity { margin: 0 0 var(--s6); }
.activity-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s5); flex-wrap: wrap; }
.activity-head > div:first-child { display: flex; flex-direction: column; gap: var(--s1); }
.activity-head b { font-size: 18px; font-weight: 500; color: var(--navy); }
.activity-controls { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.progress { display: block; width: 100%; height: 8px; margin: var(--s4) 0 0; accent-color: var(--navy); }
.activity-log { margin-top: var(--s4); }
.console-links { align-items: center; flex-wrap: wrap; }

/* Mailbox (0.29.0) */
.mail-list tr.unread td, .mail-list tr.unread a { font-weight: 600; }
.mail-actions { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin: var(--s4) 0 var(--s5); }
.mail-body { max-width: 78ch; padding: var(--s5); border: 1px solid var(--line); background: var(--white); }
.mail-form { display: grid; gap: var(--s4); max-width: 78ch; }
.mail-form label, .mail-filter label { display: grid; gap: var(--s1); }
.mail-form textarea { width: 100%; font: inherit; }
.sub-form input { width: 100%; }
.sub-form > div:last-child { margin-top: var(--s4); }
.tabs { display: flex; gap: var(--s5); border-bottom: 1px solid var(--line); margin: 0 0 var(--s5); flex-wrap: wrap; }
.tabs a { padding: var(--s3) 0; text-decoration: none; color: var(--ink-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--navy); font-weight: 500; }
.mail-state b { font-size: 18px; font-weight: 500; }
.mail-state > div { display: flex; flex-direction: column-reverse; gap: var(--s1); }

/* Lists (0.30.0) */
.list-panel { margin: 0 0 var(--s4); }
.list-entries tr.proposal td { background: var(--mist); }
.list-actions { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; margin-top: var(--s4); }
.row-actions { display: flex; gap: var(--s2); justify-content: flex-end; }
.small-btn { padding: var(--s1) var(--s3); font-size: 13px; }
.addr-form input { width: 100%; }

/* 0.30.0: the footer is always visible. The work area fills the window; only the page inside it scrolls. */
.work { display: flex; flex-direction: column; height: 100vh; min-width: 0; overflow: hidden; }
.scroll { flex: 1; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; }
footer { flex: none; padding: var(--s3) var(--space-7); background: var(--white); align-items: center; }
@media (max-width: 900px) {
  .work { height: auto; overflow: visible; }
  .scroll { overflow: visible; }
}

/* Questions (0.31.0). The page is a fixed frame: the list of conversations on the left, the conversation on the
   right with its heading on top and the question field at the bottom. Only the list and the thread scroll, each
   by itself, so neither the heading nor the field can move. */
main:has(> .chat) { flex: 1; min-height: 0; max-width: none; padding: 0; display: flex; overflow: hidden; }
main:has(> .chat) > .crumb { display: none; }
.chat { flex: 1; min-height: 0; min-width: 0; display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.conv-list { display: flex; flex-direction: column; min-height: 0; padding: var(--s5) var(--s4); background: var(--mist); border-right: 1px solid var(--line); }
.conv-list .new-conv { display: flex; align-items: center; justify-content: center; gap: var(--s2); text-decoration: none; }
.conv-search { display: flex; margin: var(--s4) 0 var(--s3); background: var(--white); border: 1px solid var(--line); }
.conv-search input { flex: 1; min-width: 0; border: 0; background: none; padding: var(--s2) var(--s3); font-size: 14px; }
.conv-search:focus-within { border-color: var(--steel); }
.conv-list-title { margin: var(--s2) 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-meta); }
.conv-list ul { list-style: none; margin: 0 calc(-1 * var(--s2)); padding: 0; overflow-y: auto; flex: 1; min-height: 0; }
.conv-list li { position: relative; display: flex; align-items: flex-start; }
.conv-list li a { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: var(--s2); text-decoration: none; color: var(--ink); border-left: 2px solid transparent; }
.conv-list li a:hover { background: var(--white); }
.conv-list li a[aria-current] { background: var(--white); border-left-color: var(--navy); }
.conv-list li .more { position: absolute; right: var(--s1); top: var(--s1); width: 1.9rem; height: 1.9rem; background: var(--white); opacity: 0; }
.conv-list li:hover .more, .conv-list li .more:focus-visible, .conv-list li.current .more, .conv-list li .more:popover-open, .conv-list li:has(:popover-open) .more { opacity: 1; }
@media (hover: none) { .conv-list li .more { opacity: 1; } }
.conv-list li:hover a, .conv-list li.current a { padding-right: 2.4rem; }
.conv-head h1 { flex: 1; min-width: 0; }
/* the menu behind the three dots: in the top layer of the browser, so a scrolling list does not cut it off */
.conv-pop { inset: auto; position: fixed; width: 300px; margin: auto; padding: var(--s4); background: var(--white); color: var(--ink); border: 1px solid var(--navy); }
.conv-pop:popover-open { display: flex; flex-direction: column; gap: var(--s2); }
.conv-pop form { margin: 0; }
.conv-pop .rename-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s2); padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.conv-pop .rename-form label { flex: 1 1 100%; display: flex; flex-direction: column; gap: var(--s1); font-size: 12px; color: var(--text-meta); }
.conv-pop .rename-form input { width: 100%; font-size: 14px; color: var(--ink); }
.pop-item { display: block; box-sizing: border-box; margin: 0; width: 100%; text-align: left; padding: var(--s2); background: none; border: 0; color: var(--navy); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; min-height: 0; }
.pop-item:hover, .pop-item:focus-visible { background: var(--mist); color: var(--navy); }
.conv-pop p { margin: var(--s1) 0 0; padding-top: var(--s2); border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 12px; }
.conv-list .t { font-size: 14px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.conv-list .d { font-size: 11px; color: var(--ink-muted); }
.conv-none { flex: 1; } .conv-switch { margin: var(--s3) 0 0; font-size: 13px; }
.conversation { display: flex; flex-direction: column; min-height: 0; min-width: 0; margin: 0; }
.conv-head { flex: none; min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4) var(--space-7); border-bottom: 1px solid var(--line); }
.conv-head h1 { font-size: 20px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s6); padding: var(--s6) var(--space-7) var(--s5); scroll-behavior: auto; }
.thread:focus-visible { outline: 2px solid var(--steel); outline-offset: -2px; }
.thread > * { width: 100%; max-width: 800px; margin-left: auto; margin-right: auto; }
.conversation.fresh .thread { justify-content: center; }
.conv-hint { text-align: center; color: var(--ink-muted); } .conv-hint p { max-width: 60ch; margin: 0 auto var(--s3); }
.turn { display: flex; flex-direction: column; gap: var(--s2); }
.turn .meta { font-size: 11px; color: var(--ink-muted); }
.ask-turn { align-items: flex-end; }
.ask-turn .bubble { background: var(--mist); padding: var(--s3) var(--s4); max-width: 85%; overflow-wrap: anywhere; }
.ask-turn .bubble p, .answer p { margin: 0 0 var(--s3); max-width: none; } .ask-turn .bubble p:last-child, .answer > :last-child { margin-bottom: 0; }
.answer { line-height: 1.65; overflow-wrap: anywhere; }
.answer ul, .answer ol { margin: 0 0 var(--s3); padding-left: 1.4em; } .answer li { margin-bottom: var(--s1); }
.answer strong, .answer .ans-h { font-weight: 500; color: var(--navy); } .answer code { font-size: .92em; background: var(--mist); padding: 0 var(--s1); }
.cite.changed { color: var(--navy); background: var(--mist); padding: 0 var(--s1); border: 1px solid var(--steel); text-decoration: none; }
.basis { font-size: 13px; color: var(--ink-muted); } .basis summary { cursor: pointer; } .basis ol { margin: var(--s2) 0 0; padding-left: 1.6em; }
.turn-actions { display: flex; align-items: center; gap: var(--s4); margin: 0; }
.text-btn { display: inline-flex; align-items: center; gap: var(--s1); min-height: 0; padding: var(--s1) var(--s2); background: none; border: 1px solid transparent; color: var(--navy); font-size: 13px; cursor: pointer; }
.text-btn:hover { background: var(--mist); border-color: var(--line); color: var(--navy); }
.working { display: flex; align-items: center; gap: var(--s2); color: var(--ink-muted); }
.working .dots { display: inline-block; line-height: 1; animation: working 1.2s steps(4, end) infinite; }
.working .dots::before { content: "● ● ●"; font-size: 7px; letter-spacing: 1px; color: var(--steel); }
@keyframes working { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .working .dots { animation: none; } }
.answer-turn .note-panel { margin: 0; }
.conversation > .flash { flex: none; width: calc(100% - 2 * var(--space-7)); max-width: 800px; margin: 0 auto var(--s3); }
.composer { flex: none; width: calc(100% - 2 * var(--space-7)); max-width: 800px; margin: 0 auto var(--s5); background: var(--white); border: 1px solid var(--navy); padding: var(--s2) var(--s3) var(--s2) var(--s4); }
.composer:focus-within { border-color: var(--steel); outline: 1px solid var(--steel); }
.composer.busy { border-color: var(--line); }
.composer textarea { display: block; width: 100%; border: 0; padding: var(--s2) 0; resize: none; outline: none; background: none; font: inherit; min-height: 2.4rem; max-height: 35vh; overflow-y: auto; }
.composer-bar { display: flex; align-items: center; justify-content: flex-end; gap: var(--s2); }
.composer-hint { margin-right: auto; font-size: 11px; color: var(--ink-faint); }
@media (max-width: 900px) {
  main:has(> .chat) { overflow: visible; display: block; }
  .chat { display: block; }
  .conv-list { border-right: 0; border-bottom: 1px solid var(--line); } .conv-list ul { max-height: 30vh; flex: none; }
  .conv-head, .thread { padding-left: var(--s4); padding-right: var(--s4); } .thread { overflow: visible; }
  .composer, .conversation > .flash { width: calc(100% - 2 * var(--s4)); }
  .composer { position: sticky; bottom: var(--s3); }
  .composer-hint { display: none; }
}

/* Jurisdictions as filter (0.37.0): one chip per jurisdiction the register holds, with flag and number */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s4); }
.chip { display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s3); border: 1px solid var(--line); background: var(--white); color: var(--ink); text-decoration: none; font-size: 14px; }
.chip:hover { border-color: var(--steel); color: var(--navy); }
.chip.on { border-color: var(--navy); background: var(--mist); color: var(--navy); }
.chip img { display: block; width: 21px; height: 14px; object-fit: cover; outline: 1px solid var(--line); }
.chip .code { font-size: 11px; letter-spacing: .06em; color: var(--text-meta); min-width: 21px; text-align: center; }
.chip .n { color: var(--ink-muted); font-size: 12px; }
.pager .per { margin-left: auto; display: inline-flex; gap: var(--s2); align-items: baseline; }
.pager .per b { color: var(--navy); }
.hits-block { margin: 0 0 var(--s6); }

/* Start pages of Verwaltung and Admin (0.39.0): one card per part, its state, a link */
.sidenav .sublabel { margin: var(--space-3) var(--space-5) var(--space-1); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted-on-dark); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4); margin: 0 0 var(--s6); }
.card { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4) var(--s5); background: var(--white); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.card:hover { border-color: var(--steel); }
.card h2 { font-size: 17px; margin: 0; color: var(--navy); display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.card p { margin: 0; font-size: 14px; color: var(--ink-muted); }
.card .fig { font-size: 26px; color: var(--navy); line-height: 1.1; }
.card.attention { border-left: 3px solid var(--navy); }
.log-table td { font-size: 13px; vertical-align: top; }

/* 0.41.0 Admin is an area of its own: in the main menu one item leads into it; inside it the menu shows only
   Admin, with a way back above. Without scripts the way back is a link to the overview. */
.sidenav .admin-menu { display: none; }
.sidenav nav.in-admin .main-menu { display: none; }
.sidenav nav.in-admin .admin-menu { display: block; }
.sidenav .group.enter { margin-top: var(--space-4); padding-top: var(--space-2); border-top: 1px solid var(--nav-divider); }
.sidenav .enter-admin .count { margin-left: auto; }
.sidenav .enter-admin .chev { margin-left: auto; display: inline-flex; color: var(--text-muted-on-dark); }
.sidenav .enter-admin .count + .chev { margin-left: var(--space-2); }
.sidenav nav a.nav-back { font-size: 13px; color: var(--text-muted-on-dark); padding-top: var(--space-1); padding-bottom: var(--space-1); }
.sidenav nav a.nav-back:hover { color: var(--text-on-dark); }

/* avatar: the photo of a person, or the initials, always in a circle (design system: Avatar) */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: var(--radius-round);
  overflow: hidden; background: var(--steel); color: var(--navy); font: 500 12px/1 var(--sans); letter-spacing: .02em; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar.small { width: 28px; height: 28px; font-size: 11px; }
.avatar.large { width: 72px; height: 72px; font-size: 24px; font-weight: 400; }
td.who { white-space: nowrap; }
td.who .avatar { margin-right: var(--space-3); vertical-align: middle; }
.comments li { display: flex; gap: var(--space-3); align-items: flex-start; }
.comments .comment-text { min-width: 0; flex: 1; }
.account-head { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-4); }
.account-head p { margin: 0; }
.account-head .name { font-size: 19px; font-weight: 500; color: var(--navy); }

/* page actions: one primary action at the right of the heading, an icon and a word (design system: PageHead) */
.pagehead .actions { display: flex; gap: var(--space-2); align-items: center; }
.btn .icon, button .icon { stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn.add { gap: var(--space-2); }

/* side panel (design system: SidePanel): comes in from the right over the page for adding something.
   Opens by its address (#id) or rendered open; closes by its cross, by Cancel, by a click beside it or by Escape. */
.drawer { display: none; position: fixed; inset: 0; z-index: 50; }
.drawer:target, .drawer.open { display: block; }
.drawer.closed { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: var(--overlay); cursor: default; animation: drawer-fade 150ms ease-out; }
main .drawer-panel, .drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; margin: 0; width: min(var(--layout-panel-width), 100%); background: var(--white); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; animation: drawer-in 200ms ease-out; }
.drawer.wide .drawer-panel { width: min(var(--layout-panel-wide), 100%); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 24px; }
main .drawer-head h2 { margin: 0; }
.drawer-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: calc(-1 * var(--space-3)); color: var(--navy); }
.drawer-close:hover { background: var(--mist); color: var(--navy); }
.drawer-close .icon { stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; }
.drawer-form { display: flex; flex-direction: column; flex: 1; min-height: 0; margin: 0; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.drawer-body > * { margin-top: 0; margin-bottom: 0; }
.drawer-body label { display: flex; flex-direction: column; gap: var(--space-1); }
.drawer-body .src-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin: 0; }
.drawer-body .src-form .wide { grid-column: 1 / -1; }
.drawer-foot { display: flex; gap: var(--space-2); align-items: center; padding: var(--space-4) var(--space-5); border-top: 1px solid var(--line); background: var(--white); }
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drawer-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .drawer-panel, .drawer-backdrop { animation: none; } }
@media (max-width: 600px) { .drawer-body .src-form { grid-template-columns: 1fr; } }

/* 0.42.0 operation panels: fetching, classification and questions, each live and switchable; the same panels
   stand on Admin → Übersicht and on their own pages (Quellen, AI) */
.ops { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--s4); margin: 0 0 var(--s6); align-items: start; }
.ops .op, .ops .activity { margin: 0; }
form.op { display: block; }
.activity-head .small a { white-space: nowrap; }
.activity-controls button { white-space: nowrap; }

/* account: the photo with a round "+" below it that opens the side panel for upload and removal (0.42.1) */
.avatar-edit { display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.photo-add { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-round);
  border: 1px solid var(--navy); color: var(--navy); background: var(--white); }
.photo-add:hover { background: var(--navy); color: var(--white); }
.photo-add:focus-visible { outline: 2px solid var(--steel); outline-offset: 2px; }
.photo-add .icon { stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; }
