/* -- fonts: Inter, shipped with the tool (web/fonts, SIL Open Font License, web/fonts/OFL.txt) -- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-wght.woff2") format("woff2");
}

/* -- tokens (docs/ui-principles.md "Farben als Tokens", docs/decisions/design.md): rules use only
   these, no colour values; the names of colours, spacing and radii are the same in jh-registry -- */
:root {
  /* greys with a slight blue bias */
  --gray-50: #f5f6f8;
  --gray-100: #eceff3;
  --gray-200: #dfe3e8;
  --gray-300: #c3c9d2;
  --gray-400: #9aa3af;
  --gray-500: #747e8b;
  --gray-600: #5d6673;
  --gray-700: #434b57;
  --gray-800: #2b313a;
  --gray-900: #1a1d23;

  --bg: var(--gray-50);                 /* the page */
  --surface: #ffffff;                   /* cards, fields */
  --surface-subtle: var(--gray-50);     /* set off inside a card */
  --surface-muted: var(--gray-100);     /* chips, quiet buttons, group heads */
  --line: #e8ebef;                      /* thin dividers */
  --border: var(--gray-200);
  --border-strong: var(--gray-300);     /* buttons */
  --border-field: #8b94a0;              /* fields: their edge at 3:1 (WCAG 1.4.11) */
  --text: var(--gray-900);
  --text-muted: var(--gray-600);
  --text-faint: var(--gray-500);        /* icons that can be used (grip, clear) at 3:1 or more */
  --text-inverse: #ffffff;              /* on the brand colour and dark grounds */

  --accent: #c8102e;                    /* brand: header, main action */
  --accent-hover: #9b0c23;
  --header-bg: var(--gray-600);           /* dark and neutral; the brand shows in the active item (2026-11-22) */
  --header-active: var(--accent);
  --header-hover: rgb(255 255 255 / 0.12);
  --header-field-bg: rgb(255 255 255 / 0.16);
  --header-field-bg-focus: rgb(255 255 255 / 0.24);
  --header-field-placeholder: rgb(255 255 255 / 0.8);
  --header-field-border: rgb(255 255 255 / 0.6);
  --header-button-border: rgb(255 255 255 / 0.35);
  --brand-halo: rgb(255 255 255 / 0.7);
  --link: #1f4fae;
  --link-hover: #163b86;
  --focus: #1a5fd0;
  --hover: #e3ecfc;                     /* row under the mouse */
  --hover-edge: #1f4fae;

  /* states: text and ground in pairs */
  --ok-text: #1f5e23;
  --ok-bg: #e2f0e3;
  --ok-border: #a9d1ac;
  --warn-text: #7a4b00;
  --warn-bg: #ffe9c2;
  --warn-bg-subtle: #fff8e1;
  --warn-border: #f0d78c;
  --warn-strong: #e0b400;
  --danger-text: #b3261e;
  --danger-bg: #fbe4e2;
  --danger-border: #e3a6a1;
  --info-text: #1d3a8a;
  --info-bg: #e8f0fd;
  --info-bg-strong: #d9e5fb;
  --info-border: #b8cbef;
  --neutral-text: var(--gray-700);
  --neutral-bg: var(--gray-100);

  /* the areas and the tags of topics */
  --area-verein: #2f5bb7;
  --area-aktive: #c8102e;
  --area-jugend: #2e7d32;
  --area-offen: #8a929e;
  --tag-bg: #ecdcff;
  --tag-bg-hover: #e0c9ff;
  --tag-text: #53208f;

  /* dark grounds: the note at the bottom, the trial run */
  --toast-bg: var(--gray-800);
  --toast-link: #9cc3ff;
  --header-trial-bg: var(--warn-text);     /* amber: the trial run, besides its striped banner */
  --trial-stripe: #ffd35c;

  /* type: Inter, six steps, three weights (400, 500, 600) */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 0.75rem;     /* 12 px: tags, group heads */
  --fs-sm: 0.875rem;    /* 14 px: secondary text, labels, dates */
  --fs-md: 1rem;        /* 16 px: text, values, fields */
  --fs-lg: 1.125rem;    /* 18 px: card titles, rows of topics */
  --fs-xl: 1.375rem;    /* 22 px: the title of a topic, sections */
  --fs-2xl: 1.75rem;    /* 28 px: page titles */

  /* spacing in steps of 4 px, two radii */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --radius-sm: 6px;     /* fields, buttons */
  --radius: 10px;       /* cards */

  /* shadows: a fine edge, something raised, a menu or panel, a dialog, the note at the bottom */
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.06);
  --shadow-raised: 0 2px 10px rgb(0 0 0 / 0.08);
  --shadow-menu: 0 6px 20px rgb(0 0 0 / 0.14);
  --shadow-dialog: 0 12px 36px rgb(0 0 0 / 0.18);
  --shadow-toast: 0 6px 20px rgb(0 0 0 / 0.25);
  --page-width: 84rem;

  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
}

.app-nav a {
  color: var(--text-inverse);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
}

.app-nav a:hover {
  color: var(--text-inverse);
  text-decoration: none;
  background: var(--header-hover);
}

.app-nav a[aria-current="page"] {
  background: var(--header-active);
}

.app-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: calc(var(--space-4) * 1.5) var(--space-4);
}

.app-main:focus {
  outline: none;
}

h1 {
  margin-top: 0;
  font-size: var(--fs-2xl);       /* page titles: 28 px */
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;               /* not the browser's 700 */
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.card > h2:first-child {
  margin-top: 0;
}

.muted {
  color: var(--text-muted);
}

.status-ok {
  color: var(--ok-text);
}

.status-error {
  color: var(--danger-text);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 0;
  list-style: none;
}

.legend li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.swatch {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--border);
  border-radius: 3px;
}

.small {
  font-size: var(--fs-sm);
}

.pre {
  white-space: pre-line;
}

/* -- navigation inside views -- */

.tabs a {
  padding: var(--space-2) var(--space-4);
  color: var(--text);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.tabs a[aria-current="page"] {
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.pager {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

/* -- badges -- */

td .badge,
li > .badge:first-child {
  margin-left: 0;
}

.badge-open,
.status-open.badge {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.status-done.badge {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.kind-decision { background: var(--info-bg-strong); color: var(--info-text); }

/* -- lists -- */

.meeting-list,
.topic-list,
.search-results {
  list-style: none;
  padding: 0;
  margin: 0;
}

.meeting-list li,
.topic-list li,
.search-results li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--bg);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.15rem var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.participants summary {
  cursor: pointer;
}

.chips li.absent {
  border-style: dashed;
  color: var(--text-muted);
}

.timeline h2 {
  font-size: var(--fs-md);
  margin: 0 0 var(--space-2);
}

mark {
  background: var(--warn-bg);
  padding: 0 0.1rem;
}

/* -- search -- */

.search {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.search input {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  font: inherit;
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
}

button {
  padding: 7px var(--space-4);    /* with the 1 px edge and 20 px of text: 36 px high */
  font: inherit;
  font-weight: 500;
  line-height: 1.25rem;
  color: var(--text-inverse);
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

button:hover {
  background: var(--accent-hover);
}

/* -- members -- */

/* Sticky table headers need the window as scroll container, so the wrapper only scrolls
   sideways on narrow screens. */
.table-scroll {
  overflow-x: visible;
}

@media (max-width: 60rem) {
  .table-scroll {
    overflow-x: auto;
  }
}

.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: var(--fs-sm);
}

.data th,
.data td {
  padding: var(--space-2) var(--space-2);
  text-align: left;
  border-bottom: 1px solid var(--bg);
  vertical-align: top;
}

.data .num {
  text-align: right;
}

.category-aktiv.badge { background: var(--danger-bg); color: var(--danger-text); }

.category-passiv.badge { background: var(--surface-muted); color: var(--text); }

.category-foerdernd.badge { background: var(--ok-bg); color: var(--ok-text); }

.category-ehren.badge { background: var(--warn-bg); color: var(--warn-text); }

.badge.former { opacity: 0.6; }

.badge-office { background: var(--info-bg-strong); color: var(--info-text); margin: 0 var(--space-1) var(--space-1) 0; }

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-4);
  margin: 0;
}

.facts dt {
  color: var(--text-muted);
}

.facts dd {
  margin: 0;
}

.minutes .who a,
.chips a {
  color: inherit;
}

.deceased {
  color: var(--text-muted);
  font-weight: 400;
}

.edit-box {
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--bg);
}

.edit-box summary {
  cursor: pointer;
  color: var(--text-muted);
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.inline-form input {
  padding: var(--space-2) var(--space-2);
  font: inherit;
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
}

button.secondary {
  color: var(--text);
  background: var(--border);
}

button.secondary:hover {
  background: var(--border-strong);
}

.period h3 {
  font-size: var(--fs-md);
  margin: var(--space-3) 0 var(--space-1);
}

.timeline-compact {
  list-style: none;
  padding-left: var(--space-3);
  margin: 0;
  border-left: 2px solid var(--border);
}

.timeline-compact li {
  padding: 0.15rem 0 0.15rem var(--space-2);
}

/* ===== step 1: shared building blocks ===== */

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

/* header with global search */
.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--header-bg);
  color: var(--text-inverse);
  position: sticky;
  top: 0;
  z-index: 10;
}

.global-search {
  position: relative;
  flex: 1 1 320px;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 36px;
  padding: 0 var(--space-3);
  border-radius: var(--radius);
  background: var(--header-field-bg);
  color: var(--text-inverse);
}

.global-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-inverse);
  font: inherit;
  font-size: var(--fs-md);
}

.global-search input::placeholder {
  color: var(--header-field-placeholder);
}

.global-search:focus-within {
  background: var(--header-field-bg-focus);
  outline: 2px solid var(--surface);
}

.global-search kbd {
  font: inherit;
  font-size: var(--fs-xs);
  padding: 0 var(--space-2);
  border: 1px solid var(--header-field-border);
  border-radius: var(--radius-sm);
}
.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-left: auto;
}

.search-popup {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  max-height: 70vh;
  overflow: auto;
  padding: var(--space-2);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-dialog);
}

.search-group + .search-group {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--bg);
}

.search-group-title {
  padding: var(--space-1) var(--space-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.search-hit {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 7px var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.search-hit:hover,
.search-hit.active {
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
}

.search-all {
  margin-top: var(--space-2);
  border-top: 1px solid var(--bg);
  color: var(--link);
}

.search-year h3 {
  margin: var(--space-4) 0 var(--space-1);
  font-size: var(--fs-md);
}

/* chips and fields */

.chip-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  align-items: center;
}

.chip {
  display: inline-block;
  padding: 1px var(--space-2);
  border-radius: 999px;
  font-size: var(--fs-sm);
  line-height: 1.5;
  white-space: nowrap;
  color: var(--text);
  background: var(--surface-muted);
  border: 1px solid transparent;
}

a.chip:hover {
  text-decoration: none;
  border-color: var(--border);
  color: var(--text);
}

.chip-unresolved {
  background: transparent;
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
}

.chip-everyone {
  background: var(--info-bg);
  color: var(--info-text);
}

.field {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 2px var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
}

.field-label {
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.topic-head {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: center;
  margin-top: var(--space-2);
}

.heading-meta {
  margin-left: var(--space-3);
  font-weight: 400;
}

.participants .chip-list {
  margin-top: var(--space-3);
}

.participants .absent .chip {
  background: transparent;
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
}

/* tabs as buttons, filter bar, sortable tables */

.tabs .tab {
  font: inherit;
  padding: var(--space-2) var(--space-4);
  color: var(--text);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}

.tabs .tab[aria-pressed="true"] {
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.filter-bar {
  position: sticky;
  top: 60px;
  z-index: 5;
  display: flex;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-2) 0;
  background: var(--bg);
}

.filter-bar input {
  flex: 1;
  max-width: 480px;
  padding: var(--space-2) var(--space-3);
  font: inherit;
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
}

.filter-bar p {
  margin: 0;
}

.data th .sort {
  font: inherit;
  font-weight: 600;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

.data tr.clickable {
  cursor: pointer;
}

/* collapsible years */

details.year > summary {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  cursor: pointer;
  list-style: none;
}

details.year > summary::before {
  content: "▸";
  color: var(--text-muted);
}

details.year[open] > summary::before {
  content: "▾";
}

details.year > summary h2 {
  margin: 0;
}

details.year[open] > summary {
  margin-bottom: var(--space-2);
}

/* loading and empty states */

.app-main.loading {
  opacity: 0.55;
  transition: opacity 0.2s;
  cursor: progress;
}

.empty {
  padding: var(--space-2) 0;
}

/* ===== step 2: minutes read mode ===== */

.reader.has-aside {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}

.reader-aside {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  font-size: var(--fs-sm);
}

.toc {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.toc-title {
  padding: 0 var(--space-2) var(--space-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.toc-chapter {
  font-weight: 600;
  margin-top: var(--space-1);
}

.toc-section {
  padding-left: var(--space-5);
  color: var(--text);
}

.toc-open {
  color: var(--warn-text);
  white-space: nowrap;
}

.since-last {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.since-last ul {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-4);
}

.since-last li {
  margin-bottom: 3px;
}

.link-button {
  padding: 0;
  font: inherit;
  text-align: left;
  color: var(--link);
  background: none;
  border: none;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
  background: none;
}

.reader-bar {
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
}

.filter-buttons .tab {
  font: inherit;
  padding: var(--space-2) var(--space-3);
  color: var(--text);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.filter-buttons .tab[aria-pressed="true"] {
  color: var(--text-inverse);
  background: var(--text);
}

.reader-bar select {
  max-width: 12rem;
  padding: var(--space-2) var(--space-2);
  font: inherit;
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.spacer {
  flex: 1;
}

a.button {
  display: inline-block;
  text-align: center;   /* like a button, also when stretched (side bars) */
  padding: 7px var(--space-4);
  font-weight: 500;
  line-height: 1.25rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

a.button:hover {
  text-decoration: none;
  border-color: var(--border-strong);
}

.reader-main {
  min-width: 0;
}

.reader-main > h2,
.reader-main > h3,
.item-card {
  scroll-margin-top: 130px;
}

.reader-chapter,
.reader-section {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
}

.reader-chapter {
  margin: var(--space-5) 0 var(--space-2);
  font-size: var(--fs-lg);
}

.reader-section {
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--fs-md);
  color: var(--text);
}

.reader-chapter .heading-meta,
.reader-section .heading-meta {
  margin-left: 0;
}

.item-number {
  min-width: 2.5rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
}

.item-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
}

.item-head .badge {
  margin-left: 0;
}

.item-title {
  flex: 1;
  min-width: 12rem;
  margin: 0;
  font-size: var(--fs-md);
  line-height: 1.35;
}

.item-meta,
.item-body {
  padding-left: calc(2.5rem + 10px);
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-2);
  align-items: center;
}

.history-link {
  color: var(--text-muted);
}

.item-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--fs-md);
  line-height: 1.45;
}

.item-text {
  margin: 0;
  white-space: pre-wrap;
}

.sub-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}

.sub-mark {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.sub-open .sub-mark {
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.sub-done .sub-mark {
  color: var(--ok-text);
  font-weight: 600;
}

.sub-text {
  flex: 1;
  min-width: 10rem;
}

.sub-done .sub-text {
  color: var(--text-muted);
  text-decoration: line-through;
}

.sub-date {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  white-space: nowrap;
}

.change-new.badge {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.change-changed.badge {
  background: var(--info-bg);
  color: var(--info-text);
}

@media (max-width: 60rem) {
  .reader.has-aside {
    display: block;
  }

  .reader-aside {
    display: none;
  }

  .item-meta,
  .item-body {
    padding-left: 0;
  }
}

@media print {
  .app-header,
  .pager,
  .tabs,
  .reader-aside,
  .reader-bar {
    display: none;
  }

  body,
  .app-main {
    background: var(--surface);
    max-width: none;
    padding: 0;
  }

  .item-card {
    break-inside: avoid;
  }
}

/* ===== members: list and person page ===== */

/* Quick filters and view tabs as pills, the same everywhere (protocol filters too). */
.tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  gap: var(--space-1);
  padding-bottom: var(--space-2);
}

.tabs a,
.tabs .tab {
  padding: var(--space-2) var(--space-3);
  border: none;
  border-radius: var(--radius-sm);
}

.tabs a:hover,
.tabs .tab:hover {
  text-decoration: none;
  background: var(--surface-muted);
}

.tabs a[aria-current="page"],
.tabs .tab[aria-pressed="true"] {
  color: var(--text-inverse);
  background: var(--text);
  font-weight: 500;
}

.tabs .empty-tab:not([aria-pressed="true"]) {
  color: var(--text-faint);
}

/* Column lines, a clear row hover, names in text colour (the whole row is clickable). */
.data th + th,
.data td + td {
  border-left: 1px solid var(--line);
}
.data th {
  background: var(--bg);
  position: sticky;
  top: 0;
  top: 116px;
  z-index: 4;
  border-bottom: 1px solid var(--border);
}

.data th + th {
  border-left-color: var(--border);
}
.data th[aria-sort] .sort::after {
  content: " ▾";
  color: var(--accent);
  content: " ▲";
  font-size: 0.75em;
}

.data th[aria-sort="descending"] .sort::after {
  content: " ▼";
}

.data th.num {
  text-align: right;
}

.badge-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px var(--space-1);
}

.badge-list .badge {
  margin-left: 0;
}

.honor-jubilee.badge { background: var(--info-bg); color: var(--info-text); }

.honor-decoration.badge { background: var(--danger-bg); color: var(--danger-text); }

.honor-title.badge { background: var(--warn-bg); color: var(--warn-text); font-weight: 600; }

.honor-commendation.badge { background: var(--ok-bg); color: var(--ok-text); }

.honor-due.badge { background: transparent; color: var(--info-text); border: 1px dashed var(--link); }

.honor-due-active.badge { color: var(--danger-text); border-color: var(--danger-border); }

/* person page */

.person-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  margin-top: -0.25rem;
}

.person-summary .badge {
  margin-left: 0;
}

.person-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.person-cards .card {
  margin: 0;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
}

.card-head h2 {
  margin-top: 0;
}

.small-button,
a.button.small-button {
  padding: var(--space-1) var(--space-3);    /* 30 px high */
  font-size: var(--fs-sm);
  line-height: 1.25rem;
}

.add-value {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.edit-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: flex-end;
}

/* Text fields at the end of a row take the rest of it; dates and choices keep their size. */
.form-row .form-field:last-child:has(input:not([type="date"]):not([type="time"]):not([type="checkbox"]):not([size]):not(.field-text):not(.field-native)) {
  flex: 1;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.form-field input,
.form-field textarea,
.contact-row input,
.contact-row select,
.import-line input,
.import-line select {
  padding: 7px var(--space-3);    /* 36 px high, like a button */
  font: inherit;
  font-size: var(--fs-md);
  line-height: 1.25rem;
  color: var(--text);
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.contact-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.contact-row input[name="value"] {
  flex: 1;
  min-width: 10rem;
}

.form-actions {
  display: flex;
  gap: var(--space-2);
}

.history summary {
  cursor: pointer;
  font-weight: 600;
}

/* ===== member table ===== */

/* The member list may use more width than the other pages. */
.app-main:has(.members-wrap) {
  max-width: 84rem;
}

.members {
  width: 100%;
  table-layout: fixed; /* widths do not jump when a filter changes the rows */
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
}

.members col.col-year { width: 6.5rem; }

.members col.col-age { width: 5rem; }

.members col.col-birthday { width: 10.5rem; }

.members col.col-died { width: 9.5rem; }

.members col.col-category { width: 8.5rem; }

.members col.col-since { width: 6rem; }

.members col.col-years { width: 5rem; }

.members col.col-end { width: 12rem; }

.members col.col-district { width: 9rem; }

.members col.col-office { width: 10rem; }

.members col.col-honors { width: 17.5rem; }

.members col.col-groups { width: 14rem; }

.members thead {
  position: sticky;
  top: 116px;
  z-index: 4;
}

.members th {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  vertical-align: bottom;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.members thead tr:first-child th:first-child { border-top-left-radius: 12px; }

.members thead tr:first-child th:last-child { border-top-right-radius: 12px; }

/* Group header: a label with a bracket line over the columns that belong together. */
.members th.group-head {
  padding: var(--space-2) var(--space-3) 0;
  text-align: center;
  border-bottom: none;
}

.members th.group-head span {
  display: block;
  padding-bottom: var(--space-1);
  border-bottom: 2px solid var(--border-strong);
}

.members th .sort {
  padding: 0;
  white-space: nowrap;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.members th .sort:hover {
  color: var(--text);
}

.members th[aria-sort] .sort {
  color: var(--text);
}

.members th[aria-sort] .sort::after {
  content: " ▲";
  color: var(--accent);
}

.members th[aria-sort="descending"] .sort::after {
  content: " ▼";
}

.members th.num,
.members td.num {
  text-align: right;
}

.members td {
  padding: var(--space-3) var(--space-3);
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.members td.col-honors,
.members td.col-office {
  white-space: normal;
}

/* Grouped columns: a light band with a line on each side of the group. */
.members td.in-group {
  background: var(--surface-subtle);
}

.members .group-start {
  border-left: 1px solid var(--line);
}

.members .group-end {
  border-right: 1px solid var(--line);
}

.members .group-end + .group-start {
  border-left: none;
}

.members tbody tr {
  cursor: pointer;
}

.members tbody tr:last-child td {
  border-bottom: none;
}

.members tbody tr:hover td,
.members tbody tr:focus-visible td {
  background: var(--info-bg);
}

.members tbody tr:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.members tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.person-name {
  font-weight: 500;
}

.filter-hint {
  margin: -4px 0 var(--space-3);
  padding: var(--space-2) var(--space-3);
  font-size: var(--fs-sm);
  color: var(--text);
  background: var(--info-bg);
  border-radius: var(--radius);
}

@media (max-width: 60rem) {
  .members col.col-office,
  .members col.col-honors,
  .members .col-office,
  .members .col-honors {
    display: none;
  }
}

.members tr.year-row td {
  padding: var(--space-4) var(--space-3) var(--space-1);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--surface);
  border-bottom: 2px solid var(--accent);
  cursor: default;
}

.members tbody tr.year-row:hover td {
  background: var(--surface);
  box-shadow: none;
}

/* ===== person page: processes and lists ===== */

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--bg);
}

.action-bar .active {
  color: var(--text-inverse);
  background: var(--text);
}

.more-actions {
  position: relative;
}

.more-actions > summary {
  display: inline-block;
  list-style: none;
  cursor: pointer;
  color: var(--text);
  background: var(--border);
  border-radius: var(--radius-sm);
}

.more-actions > summary::after {
  content: " ▾";
}

.more-actions[open] > summary::after {
  content: " ▴";
}

.more-actions > summary.active {
  color: var(--text-inverse);
  background: var(--text);
}

.more-actions-menu .menu-item {
  text-align: left;
  white-space: nowrap;
  background: transparent;
}

.more-actions-menu .menu-item:hover {
  background: var(--bg);
}

.action-form {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}

.action-form h3 {
  margin: 0;
  font-size: var(--fs-md);
}

.action-form p {
  margin: 0;
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-sm);
}

.form-field select {
  padding: var(--space-2) var(--space-2);
  font: inherit;
  font-size: var(--fs-md);
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.plain-list li {
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--bg);
}

.plain-list li:last-child {
  border-bottom: none;
}

.membership-card .period .card-head h3 {
  margin: var(--space-3) 0 var(--space-1);
}

/* A card being edited takes the full width of its row. */
.person-cards .card:has(> form.edit-form) {
  grid-column: 1 / -1;
}

.contact-row {
  align-items: center;
}

.edit-form > .form-field:has(date-input) {
  align-self: flex-start;
}

/* ===== new person, groups, grouped filters ===== */

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
}

.tab-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  padding-right: var(--space-2);
  margin-right: var(--space-1);
  border-right: 1px solid var(--border);
}

.tab-group:last-child {
  border-right: none;
}

.group-badge.badge {
  background: var(--tag-bg);
  color: var(--tag-text);
}

.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  color: var(--text);
}

.groups-field input[name="new_groups"] {
  max-width: 24rem;
}

.new-person .card {
  margin-bottom: 0;
}

.new-person .card h2 {
  margin-top: 0;
}

.kind-choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin-bottom: var(--space-3);
}

.kind-choice {
  font-size: var(--fs-md);
}

.similar:not(:empty) {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius);
  background: var(--warn-bg-subtle);
  border: 1px solid var(--warn-border);
}

.similar p {
  margin: var(--space-1) 0 0;
}

/* Stacked fields keep a readable width even when the card spans the page. */
.form-grid > .form-field {
  max-width: 32rem;
}

.form-grid > .form-field:has(date-input) {
  max-width: 12rem;
}

.filter-bar .reset-order {
  white-space: nowrap;
}

/* ===== person menu and merging ===== */

.page-menu {
  align-self: center;
}

.more-actions-menu.align-right {
  left: auto;
  right: 0;
}

.merge-panel {
  border-color: var(--warn-border);
}

.merge-table {
  width: 100%;
  max-width: 48rem;
  border-collapse: collapse;
  margin: var(--space-2) 0;
}

.merge-table th,
.merge-table td {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--bg);
}

.merge-table thead th {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.merge-table tbody th {
  width: 10rem;
  font-weight: 500;
  color: var(--text-muted);
}

.merge-conflicts {
  margin: var(--space-2) 0;
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-5);
  color: var(--danger-text);
  background: var(--danger-bg);
  border-radius: var(--radius);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rename-note:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  background: var(--warn-bg-subtle);
  border: 1px solid var(--warn-border);
  max-width: 32rem;
}

/* A field holding a list of rows (e.g. former names) is wider, even if the rows contain dates. */
.form-grid > .form-field.wide-field:has(input) {
  max-width: 44rem;
  align-self: stretch;
}

.former-row input[name="former_value"] {
  flex: 1;
  min-width: 12rem;
}

.due-note {
  color: var(--warn-text);
}

a.menu-item {
  display: block;
  padding: 0.2rem var(--space-2);
  color: var(--text);
  font-size: var(--fs-sm);
  background: transparent;
  border: none;
}

a.menu-item:hover {
  text-decoration: none;
}

/* objections against publishing */

.objection {
  color: var(--danger-text);
}

.no-press.badge {
  margin-left: var(--space-2);
  color: var(--danger-text);
  background: transparent;
  border: 1px solid var(--danger-border);
}

.objections-field {
  margin-top: var(--space-3);
}

.objection-row {
  min-height: 2.2rem;
}

/* ===== topics ===== */

.app-main:has(.topics-layout) {
  max-width: 84rem;
}

.topics-layout {
  display: grid;
  grid-template-columns: minmax(20rem, 34rem) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}

/* -- topic list: search and filters in one bar (B1, 2026-11-23) -- */
.topics-filter {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.filter-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.topics-filter .topic-search {
  flex: 1 1 16rem;
  max-width: none;
}

/* all, mine, overdue: one block of buttons */
.topics-filter .filter-buttons:not(.area-filters) {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.topics-filter .filter-buttons:not(.area-filters) .tab {
  border-radius: 0;
  border-right: 1px solid var(--border);
}

.topics-filter .filter-buttons:not(.area-filters) .tab:last-child {
  border-right: none;
}

.filter-divider {
  align-self: stretch;
  width: 1px;
  margin: 0 var(--space-1);
  background: var(--border);
}

.filter-reset {
  margin-left: auto;
}

.topic-list-groups {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.topic-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.topic-group h2 {
  margin: 0;
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.topic-row.selected {
  border-color: var(--text);
  box-shadow: inset 0 0 0 1px var(--text);
}

.topic-row-button {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-3);
  font: inherit;
  text-align: left;
  color: var(--text);
  background: none;
  border: none;
  border-radius: 0;
  cursor: pointer;
}

.topic-row-tasks {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: 0 var(--space-2) var(--space-2) var(--space-4);
}

.topic-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.topic-row-title {
  font-size: var(--fs-lg);        /* one pattern for rows: title 18 px, 500 (docs/decisions/design.md) */
  font-weight: 500;
  line-height: 1.35;
}

.topic-row-meta {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.tag-badge.badge {
  margin-left: 0;
  background: var(--tag-bg);
  color: var(--tag-text);
}

a.tag-badge.badge {
  text-decoration: none;
}

a.tag-badge.badge:hover {
  background: var(--tag-bg-hover);
}

.topic-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
}

.topic-detail-head h2 {
  margin: var(--space-1) 0 var(--space-2);
}

.topic-detail .topic-detail-head h2 {
  font-size: var(--fs-xl);        /* the title of a topic: 22 px, over ".card h2" */
  line-height: 1.25;
}

.topic-area {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.topic-tasks,
.topic-history {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* the progress of a task list: a ring with "2/6" (A1, 2026-11-23); the ring is a mask, so it
   sits on any ground (a row under the mouse) */
.progress-ring {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  color: var(--text-muted);
  vertical-align: middle;
}

.progress-ring.wide {
  font-size: 8px;
  letter-spacing: -0.03em;
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--ok-text) var(--p), var(--border-strong) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
}

.progress-ring > span {
  position: relative;
}

.tasks-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.tasks-head-count {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--text-muted);
}

.tasks-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.agenda-meta .progress-ring {
  width: 24px;
  height: 24px;
  margin: -4px 0;
}

.topic-tasks h3,
.topic-history h3 {
  margin: 0 0 var(--space-1);
  font-size: var(--fs-md);
}

.task-row:hover {
  background: var(--surface-muted);
}

.task-check {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-inverse);
  background: transparent;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.task-check:hover {
  background: transparent;
  border-color: var(--text);
}

.task-row.done .task-check {
  background: var(--ok-text);
  border-color: var(--ok-text);
}

.task-check.placeholder {
  cursor: default;
  opacity: 0.5;
}

.task-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.task-text {
  padding: 0;
  font: inherit;
  text-align: left;
  color: var(--text);
  background: none;
  border: none;
  overflow-wrap: anywhere;
}

button.task-text {
  cursor: pointer;
}

button.task-text:hover {
  background: none;
}

.task-row.done .task-text {
  color: var(--text-muted);
  text-decoration: line-through;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.task-meta .sep {
  color: var(--text-faint);
}

.task-topic {
  color: var(--text-muted);
}

.text-name {
  border-bottom: 1px dashed var(--border-strong);
}

.task-due {
  white-space: nowrap;
}

.task-due.overdue {
  color: var(--danger-text);
  font-weight: 600;
}

.chip-text {
  background: transparent;
  border: 1px dashed var(--border-strong);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.filter-select {
  padding: var(--space-2) var(--space-2);
  font: inherit;
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

/* A discreet row that opens an editor ("+ Aufgabe"). */
.add-row {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  align-self: flex-start;
  padding: var(--space-2) var(--space-3);
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: var(--radius);
}

.add-row:hover {
  color: var(--text);
  background: var(--surface-muted);
}

/* -- task editor and choosing people -- */

.task-editor {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 7px var(--space-3);
  border: 1px solid var(--text);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
}

.task-editor-main {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.task-text-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.task-editor-actions {
  display: inline-flex;
  gap: 2px;
}

.task-editor-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-2) var(--space-2);
  padding-left: var(--space-6);
}

.task-editor-line .people-field {
  flex: 1 1 14rem;
}

/* -- date with "bis / am / ab" -- */

.segmented {
  display: flex;
  flex-wrap: wrap;
  padding: 2px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.segmented button {
  flex: 1;
  padding: var(--space-1) var(--space-2);
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--text);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
}

.segmented button:hover {
  background: var(--surface-muted);
}

.due-quick {
  display: flex;
  justify-content: space-between;
  padding: var(--space-1) var(--space-2);
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--text);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
}

.due-quick:hover {
  background: var(--surface-muted);
}

.people-box {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  min-height: 2rem;
  padding: 2px var(--space-2);
  box-sizing: border-box;
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: text;
}

.people-box:focus-within {
  outline: 2px solid var(--info-text);
  outline-offset: -1px;
}

.people-input {
  flex: 1;
  min-width: 6rem;
  padding: 3px 2px;
  font: inherit;
  border: none;
  outline: none;
  background: transparent;
}

.chip-remove {
  margin-left: var(--space-1);
  padding: 0;
  font: inherit;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}

.chip-remove:hover {
  color: var(--danger-text);
  background: none;
}

.suggest-menu {
  position: absolute;
  z-index: 8;
  top: calc(100% + 2px);
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: 18rem;
  max-width: 28rem;
  padding: var(--space-1);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-menu);
}

.suggest-option.extra {
  color: var(--text-muted);
}

.suggest-option.extra:first-of-type,
.suggest-option:not(.extra) + .suggest-option.extra {
  border-top: 1px solid var(--bg);
}
.suggest-option {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2);
  font: inherit;
  text-align: left;
  color: var(--text);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex: none;
}

.suggest-option.current {
  font-weight: 600;
}

.combo {
  position: relative;
}

.combo input {
  width: 100%;
  padding-right: var(--space-6);
}

.combo .suggest-menu {
  right: 0;
  min-width: 0;
  max-width: none;
  max-height: 16rem;
  overflow-y: auto;
}

.combo-toggle,
.combo-toggle:hover {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2rem;
  padding: 0;
  font-size: var(--fs-md);
  color: var(--text-muted);
  background: none;
  border: 0;
  cursor: pointer;
}

.suggest-option.active,
.suggest-option:hover {
  background: var(--info-bg);
  color: var(--text);
}

.suggest-hint {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  white-space: nowrap;
}

.new-person-form {
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.new-person-form p {
  margin: var(--space-1) 0 0;
}

.similar-people {
  margin-top: var(--space-1);
  color: var(--warn-text);
}

.danger-text {
  color: var(--danger-text);
}
.topic-head-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.topic-head-line .small-button,
.topic-head-line summary {
  white-space: nowrap;
}

.small-button.pressed {
  color: var(--info-text);
  background: var(--info-bg-strong);
}

.done-tasks summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin: var(--space-1) 0;
}

.done-tasks .task-row {
  margin-top: var(--space-1);
}

.history-entry {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--bg);
}

.history-entry p {
  margin: 0 0 var(--space-1);
}

.history-entry .decision {
  color: var(--info-text);
}

@media (max-width: 60rem) {
  .topics-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .topic-detail {
    position: static;
  }
}

/* -- preparing the next meeting -- */

.app-main:has(.prepare) {
  max-width: 72rem;
}

.prepare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: var(--space-5);
  align-items: start;
}

.prepare:has(.prepare-create) {
  grid-template-columns: minmax(0, 40rem);
}

.prepare-head h2 {
  margin: 0 0 2px;
}

.prepare-head p {
  margin: 0;
}

.prepare-side {
  position: sticky;
  top: 72px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
}

.prepare-side p {
  margin: 0;
}

.prepare-count strong {
  font-size: var(--fs-2xl);
  margin-right: var(--space-1);
}

.review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-2);
}

.review-head h2 {
  margin: 0;
}

.review ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.review-date {
  width: 6rem;
  flex-shrink: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.review-kind {
  display: inline-flex;
  color: var(--text-muted);
}

/* Links in lists read like text; underlined on hover. */
a.plain-link {
  color: var(--text);
}

a.plain-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.agenda-area {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.agenda-area h2 {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin: 0 0 2px;
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.agenda-reporter {
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  font-size: var(--fs-sm);
}

.agenda-row.deferred {
  background: transparent;
  border-style: dashed;
  opacity: 0.6;
}

.grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 30px;
  flex-shrink: 0;
  padding: 0;
  color: var(--text-faint);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: grab;
}

.grip:hover,
.grip:focus-visible {
  color: var(--text);
  background: var(--surface-muted);
}

.agenda-row.dragging {
  opacity: 0.4;
}

.agenda-row.drop-before {
  box-shadow: 0 -3px 0 0 var(--text);
}

.agenda-row.drop-after {
  box-shadow: 0 3px 0 0 var(--text);
}

.agenda-row:not(.suggestion):hover {
  background: var(--surface-subtle);
}

.hidden-suggestions {
  margin-top: var(--space-2);
}

.hidden-suggestions summary {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: var(--space-2);
}

.agenda-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.agenda-title {
  font-size: var(--fs-lg);
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
}

a.agenda-title:hover {
  color: var(--text);
  text-decoration: underline;
}

.agenda-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.agenda-meta .badge {
  margin-left: 0;
}

.flagged-badge.badge {
  background: var(--info-bg-strong);
  color: var(--info-text);
}

.suggestion-badge.badge {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.agenda-empty {
  margin: 0;
}

@media (max-width: 60rem) {
  .prepare {
    grid-template-columns: minmax(0, 1fr);   /* not 1fr: that grows with the widest row */
  }

  .prepare-side {
    position: static;
    order: -1;
  }
}

.suggestion-lines summary {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  cursor: pointer;
}

.suggestion-lines ul {
  margin: var(--space-1) 0 0;
  padding-left: var(--space-4);
  font-size: var(--fs-sm);
}

.topic-detail .facts dd {
  white-space: pre-line;
}

.people-box input.people-input {
  padding: 3px 2px;
  border: none;
  outline: none;
  box-shadow: none;
  background: transparent;
}

/* -- icon buttons (docs/ui-guide.md, "Symbolknopf") --
   Grey and round; on hover darker with a grey circle, never red. "primary" confirms,
   "danger" deletes; "row-action" only shows while the row is hovered or focused. */

html {
  scrollbar-gutter: stable;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  padding: 0;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 50%;
}

.icon-button:hover:not(:disabled) {
  color: var(--text);
  background: var(--surface-muted);
}

.icon-button.primary {
  color: var(--ok-text);
}

.icon-button.primary:hover:not(:disabled) {
  color: var(--text-inverse);
  background: var(--ok-text);
}

.icon-button.danger:hover:not(:disabled) {
  color: var(--danger-text);
  background: var(--danger-bg);
}

.icon-button:disabled {
  opacity: 0.35;
}

.row-action {
  opacity: 0;
}

.task-row:hover .row-action,
.row-action:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .row-action {
    opacity: 1;
  }
}

.menu-item:disabled {
  color: var(--text-muted);
}

/* -- "Ich bin …" -- */

.whoami {
  position: relative;
}

.whoami-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-2);
  color: var(--text-inverse);
  background: none;
  border: 1px solid var(--header-button-border);
}

.whoami-button:hover {
  background: var(--accent-hover);
}

.whoami-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  width: 20rem;
  padding: var(--space-3) var(--space-3);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-menu);
}

.whoami-panel p {
  margin: 0 0 var(--space-2);
}

.whoami-panel p.muted {
  margin: var(--space-2) 0 0;
}

/* the menu of an account: name and rights, a line, then the entries alike (2026-11-25) */
.account-menu {
  width: 16rem;
  padding: 0;
}

.account-menu-head {
  display: grid;
  gap: 2px;
  padding: var(--space-3) var(--space-3) var(--space-2);
  border-bottom: 1px solid var(--line);
}

.account-menu-items {
  display: grid;
  padding: var(--space-1) 0;
}

.account-menu-items a,
.account-menu-items button {
  display: block;
  width: 100%;
  margin: 0;
  padding: var(--space-2) var(--space-3);
  font: inherit;
  text-align: left;
  color: var(--text);
  background: none;
  border: none;
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
}

.account-menu-items a:hover,
.account-menu-items button:hover {
  background: var(--bg);
}

/* A hit from the search lights up briefly after the jump. */
.item-card.highlight {
  border-color: var(--warn-strong);
  box-shadow: 0 0 0 3px var(--warn-bg);
  animation: flash-hit 1.6s ease-out 0.2s;
}

@keyframes flash-hit {
  from { box-shadow: 0 0 0 6px var(--warn-strong); }
  to { box-shadow: 0 0 0 0 transparent; }
}

/* -- topic list: search and quick filters -- */

.topic-search {
  flex: 1 1 16rem;
  max-width: 22rem;
}

.filter-buttons .tab .count {
  margin-left: var(--space-2);
  font-size: var(--fs-sm);
  opacity: 0.7;
}

.filter-select.active {
  color: var(--text-inverse);
  background: var(--text);
  border-color: var(--text);
}

.closed-topics {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

.closed-topics > .link-button {
  align-self: flex-start;
}

/* -- areas: one mark each, everywhere the same -- */

.area-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.area-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}

.area-badge.area-verein .area-dot { background: var(--area-verein); }

.area-badge.area-aktive .area-dot { background: var(--area-aktive); }

.area-badge.area-jugend .area-dot { background: var(--area-jugend); }

.area-badge.area-offen .area-dot { background: var(--area-offen); }

.area-badge.short {
  gap: 0;
}

/* -- Sitzungen: the next meeting above the minutes -- */

.section-title {
  margin: var(--space-5) 0 var(--space-2);
  font-size: var(--fs-md);
}

/* -- mentions: "@Anna Berger" in a text -- */

.mention {
  padding: 0 3px;
  color: var(--info-text);
  background: var(--info-bg);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.mention-wrap {
  position: relative;
  display: block;
}

.mention-wrap textarea {
  width: 100%;
  box-sizing: border-box;
}

.mention-bridge {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.bridge-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 2rem;
  padding: 0 var(--space-2);
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--info-text);
  background: none;
  border: 1px dashed var(--info-border);
  border-radius: var(--radius-sm);
}

.bridge-button:hover {
  background: var(--info-bg);
}

.area-filters .tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.topics-filter .filter-select {
  max-width: 14rem;
}

/* -- chosen quick filter: a calm blue, everywhere (red means alarm, black looked heavy) -- */

.tabs .tab[aria-pressed="true"],
.filter-buttons .tab[aria-pressed="true"],
.filter-select.active {
  color: var(--info-text);
  background: var(--info-bg);
  border-color: var(--info-border);
  box-shadow: inset 0 0 0 1px var(--info-border);
  font-weight: 600;
}

.filter-buttons .tab:hover:not([aria-pressed="true"]) {
  background: var(--surface-muted);
}

.tab[aria-pressed="true"] .count {
  opacity: 0.85;
}
.area-filters .tab[aria-pressed="true"] .area-badge .area-dot {
  box-shadow: 0 0 0 2px var(--surface);
  box-shadow: none;
}

.topics-filter .tab-group {
  align-items: center;
  gap: var(--space-2);
}

.task-check.checked {
  color: var(--text-inverse);
  background: var(--ok-text);
  border-color: var(--ok-text);
}

/* -- agenda: compact rows; moving and deferring show on hover -- */
.agenda-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  gap: var(--space-2);
}

/* two lines in every row: title and badges, below the small print */
.agenda-row .agenda-main {
  gap: 2px;
}

.agenda-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--space-2);
}

.agenda-line .badge {
  margin-left: 0;
}

.agenda-row .agenda-meta {
  font-size: var(--fs-sm);
}

.agenda-row .grip {
  opacity: 0;
}

.agenda-row:hover .grip,
.agenda-row .grip:focus-visible,
.agenda-row:hover .row-action,
.agenda-row .row-action:focus-visible {
  opacity: 1;
}

.grip.placeholder {
  visibility: hidden;
}

@media (hover: none) {
  .agenda-row .grip {
    opacity: 1;
  }
}

.outlook-badge.badge {
  margin-left: 0;
}

/* the date of a topic: outlined grey only in the tool, filled in the colour of the area in the
   calendar (web/js/views/prepare.js, dateMark) */
.date-mark {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: inherit;
  text-decoration: none;
  --mark: var(--info-text);
}

.date-mark:hover {
  text-decoration: underline;
}

.date-mark .icon {
  flex: none;
  color: var(--text-muted);
}

.date-mark.on-plan .icon {
  color: var(--mark);
}

.date-mark.on-plan .icon path {
  fill: color-mix(in srgb, var(--mark) 22%, transparent);
}

/* passed: brown as "Termin war am" in the topic list; closed or done: green with a tick */
.date-mark.past,
.date-mark.past .icon {
  color: var(--warn-text);
}

.date-mark.closed,
.date-mark.closed .icon,
.date-mark.done,
.date-mark.done .icon {
  color: var(--ok-text);
}

span.date-mark:hover {
  text-decoration: none;
}

.review-task .date-mark {
  vertical-align: -2px;
}

/* the date and "im Ausblick" belong together: no dot between them */
.date-group {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.date-group .badge {
  margin-left: 0;
}

.date-mark.area-verein { --mark: var(--area-verein); }

.date-mark.area-aktive { --mark: var(--area-aktive); }

.date-mark.area-jugend { --mark: var(--area-jugend); }

.past-badge.badge {
  margin-left: 0;
  color: var(--warn-text);
  background: var(--warn-bg);
}

.deferred-items summary {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  cursor: pointer;
  margin: 2px 0 var(--space-2);
}
.toc-entry {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  font: inherit;
  text-align: left;
  color: var(--text);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-1) var(--space-2);
  font: inherit;
  color: var(--text);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
}
.toc-entry:hover {
  background: var(--surface);
  background: var(--surface-muted);
}

.toc-entry .count {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.agenda-area {
  scroll-margin-top: 80px;
}

/* -- review: one row per topic -- */

.review .area-badge.short {
  margin-top: 7px;
}

.review-topic .badge {
  margin-left: var(--space-2);
}

.review-topic .review-kind {
  margin-left: var(--space-2);
  vertical-align: -2px;
}

.review-task {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.review-task .icon {
  color: var(--ok-text);
  flex-shrink: 0;
}

.review-more {
  margin-top: var(--space-2);
}

/* -- a point of old minutes: who, when and "Verlauf" on the right of the title -- */

.item-facts {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-1) var(--space-2);
  margin-left: auto;
}

.item-date,
.item-votes {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  white-space: nowrap;
}

.history-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 1px var(--space-2);
  font-size: var(--fs-sm);
  color: var(--info-text);
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: 999px;
  white-space: nowrap;
}

.history-button:hover {
  color: var(--info-text);
  background: var(--info-bg-strong);
  text-decoration: none;
}

.item-state {
  padding-left: calc(2.5rem + 10px);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.state-text.change-new {
  color: var(--ok-text);
}

.state-text.change-changed {
  color: var(--info-text);
}

.state-text.status-open {
  color: var(--warn-text);
}

/* -- title of the page in the header (docs/ui-guide.md, "Seitentitel im Kopf") -- */

.header-title {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: var(--fs-md);
}

.header-title.shown::before {
  content: "›  ";
}

/* the title stands large on the page; in the header only where the bar has room for it, so that
   on a beamer with 1280 px the account stays in the line (2026-11-22) */
@media (max-width: 90rem) {
  .header-title {
    display: none;
  }
}

/* While a page title is shown in the header, the search gives it room (until it is used). */
.app-header:has(.header-title.shown) .global-search:not(:focus-within) {
  flex: 0 1 220px;
}
.header-title.shown {
  opacity: 0.9;
  flex: 1 1 12rem;
}

/* =====================================================================================
   Design rules (docs/ui-guide.md, "Gestaltung"): colours, buttons, links, headings,
   lists and badges in one place. Earlier rules keep their class names; this block sets the
   look for all pages at once.
   ===================================================================================== */

/* one page width everywhere: a full list, or main part and side column */
.app-main,
.app-main:has(.members-wrap),
.app-main:has(.topics-layout),
.app-main:has(.prepare) {
  max-width: var(--page-width);
}

/* -- buttons: main action (red, at most one per view), side action (white with a frame),
      quiet action (text only) -- */

button.secondary,
a.button,
.more-actions > summary {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

button.secondary:hover:not(:disabled),
a.button:hover,
.more-actions > summary:hover {
  color: var(--text);
  background: var(--hover);
  border-color: var(--hover-edge);
  text-decoration: none;
}

a.button.primary {
  color: var(--text-inverse);
  background: var(--accent);
  border-color: var(--accent);
}

a.button.primary:hover {
  color: var(--text-inverse);
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.link-button,
.add-row {
  color: var(--link);
}

.link-button:hover,
.add-row:hover {
  color: var(--link-hover);
}

/* -- headings: page title, section title with a grey line below, group label -- */

.card h2,
.card-head h2 {
  font-size: var(--fs-lg);
  font-weight: 600;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.section-head h2 {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 600;
}

.section-head .section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  margin-right: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-inverse);
  background: var(--info-text);
  border-radius: 50%;
  vertical-align: 1px;
}

.section-sub {
  margin: 2px 0 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* -- lists: one card, rows divided by lines; the row under the mouse turns blue with an edge -- */

.topic-group,
.agenda-area {
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.topic-group > h2,
.agenda-area > h2 {
  margin: 0;
  padding: var(--space-2) var(--space-4);
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--line);
}
.topic-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.topic-row + .topic-row {
  border-top: 1px solid var(--line);
}

.topic-row.selected {
  background: var(--info-bg);
  box-shadow: inset 4px 0 0 var(--hover-edge);
}

.topic-row:has(> .topic-row-button:hover),
.agenda-list .agenda-row:hover,
.task-row:hover,
.meeting-table tbody tr:hover,
.home-list li:hover {
  background: var(--hover);
  box-shadow: inset 4px 0 0 var(--hover-edge);
}
.agenda-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  gap: 0;
}

.agenda-row,
.agenda-list .agenda-row {
  border: none;
  border-radius: 0;
  background: var(--surface);
}

.agenda-area .agenda-list .agenda-row + .agenda-row,
.agenda-area > .agenda-row,
.agenda-area > .deferred-items {
  border-top: 1px solid var(--line);
}
.agenda-row.suggestion {
  background: var(--warn-bg-subtle);
  border-color: var(--warn-border);
  background: var(--warn-bg-subtle);
}

.agenda-area > .deferred-items {
  padding: var(--space-2) var(--space-4);
}

.agenda-area > .agenda-empty {
  padding: var(--space-3) var(--space-4);
}
.task-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: 7px var(--space-3);
  border-radius: var(--radius);
  background: var(--surface-subtle);
  background: none;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}

.topic-tasks > .task-row:first-of-type,
.task-list > .task-row:first-child {
  border-top: 1px solid var(--line);
}

.topic-row-tasks .task-row:last-child {
  border-bottom: none;
}

/* -- badges: grey information, blue hint or choice, green done, amber attention, red error;
      violet only for the tags of topics -- */
.badge {
  display: inline-block;
  margin-left: var(--space-2);
  padding: 1px var(--space-2);    /* 20 px high */
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.125rem;
  white-space: nowrap;
  background: var(--surface-muted);
  color: var(--text);
}

.flagged-badge.badge,
.change-changed.badge {
  color: var(--info-text);
  background: var(--info-bg);
}

.status-done.badge,
.change-new.badge {
  color: var(--ok-text);
  background: var(--ok-bg);
}

.badge-open,
.status-open.badge,
.past-badge.badge,
.suggestion-badge.badge {
  color: var(--warn-text);
  background: var(--warn-bg);
}

/* -- calendar sheet: day of the week, day, month -- */

.date-tile {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 4.2rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.date-tile .tile-weekday {
  width: 100%;
  padding: 2px 0;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  color: var(--text-inverse);
  background: var(--accent);
}

.date-tile .tile-day {
  font-size: var(--fs-2xl);
  font-weight: 600;
  line-height: 1.2;
}

.date-tile .tile-month {
  padding-bottom: var(--space-1);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* small quick filters inside a card */
.filter-buttons.small .tab {
  padding: 0.15rem var(--space-2);
  font-size: var(--fs-sm);
}

/* -- Sitzungen: the next meeting as a wide head, the minutes as a table -- */
.next-meeting-card {
  display: flex;
  flex-wrap: wrap;                /* narrow: the buttons go below the text */
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-4);
}

.next-meeting-card .next-meeting-text {
  flex: 1 1 14rem;
  min-width: 0;
}

.next-meeting-card h2 {
  margin: 0 0 2px;
  font-size: var(--fs-lg);
}

.next-meeting-card p {
  margin: 0;
}

.eyebrow {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.list-card {
  padding: var(--space-4) 0 var(--space-2);
}

.list-card > .section-head {
  padding: 0 var(--space-4);
}

.meeting-table {
  width: 100%;
  border-collapse: collapse;
}

.meeting-table th,
.meeting-table td {
  padding: var(--space-2) var(--space-4);
  text-align: left;
}

.meeting-table thead th {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}

.meeting-table .number {
  text-align: right;
  width: 7rem;
  font-variant-numeric: tabular-nums;
}

.meeting-table .date {
  width: 12rem;
  white-space: nowrap;
}

.meeting-table td.actions {
  width: 5rem;
  text-align: right;
}

.meeting-table tbody td {
  border-top: 1px solid var(--line);
}

.meeting-table tr.clickable {
  cursor: pointer;
}

.meeting-table .year-row th {
  padding: var(--space-3) var(--space-4) var(--space-2);
  background: var(--surface-subtle);
  border-top: 1px solid var(--line);
}

.year-toggle {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: 0;
  font: inherit;
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
}

.year-toggle:hover {
  background: none;
  color: var(--link);
}

.year-mark {
  width: 1rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

a.quiet-link {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

a.quiet-link:hover {
  color: var(--link);
}

/* -- Nächste Sitzung: head with calendar sheet, numbered sections, table of contents -- */
.prepare-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-4);
}

.prepare-head-text {
  flex: 1;
}

.prepare-head-text h2 {
  margin: 0 0 2px;
  font-size: var(--fs-xl);
}

.prepare-head-text p {
  margin: 0;
}

.prepare-head .link-button {
  align-self: flex-start;
}

.prepare-section {
  margin: var(--space-5) 0 var(--space-2);
}

.prepare-section > .card {
  margin-bottom: 0;
}

.agenda-areas {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.agenda-area {
  margin-bottom: 0;
}

.review {
  padding: var(--space-3) var(--space-4);
}

/* only on wide screens: otherwise this later rule would undo the one column of narrow ones */
@media (min-width: 60.0625rem) {
  .prepare {
    grid-template-columns: minmax(0, 1fr) 17rem;
  }
}

.prepare-side .eyebrow {
  margin: 0;
}
.agenda-toc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-top: none;
  padding-top: 0;
}

.toc-entry.sub {
  padding-left: var(--space-5);
}

.toc-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  margin-right: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--text-inverse);
  background: var(--info-text);
  border-radius: 50%;
}

.toc-entry .area-badge {
  font-size: var(--fs-xs);
}

/* -- start page -- */

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.home-card {
  margin: 0;
  padding: var(--space-4) var(--space-4);
}

.home-card.wide {
  grid-column: 1 / -1;
}

.home-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: 7px var(--space-2);
  border-top: 1px solid var(--line);
}

.home-list li:first-child {
  border-top: none;
}

.home-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.home-meta {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.home-meta .overdue {
  color: var(--danger-text);
  font-weight: 600;
}

.home-date {
  width: 8.5rem;
  flex-shrink: 0;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.home-list .area-badge.short,
.area-spacer {
  width: 9px;
  margin-top: var(--space-2);
}

@media (max-width: 60rem) {
  .home-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.data tr.clickable:hover td {
  background: var(--surface-subtle);
  background: var(--info-bg);
  background: var(--hover);
}
.data tr.clickable:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
  box-shadow: inset 4px 0 0 var(--hover-edge);
}

/* -- the meeting on the beamer: agenda on the left, the current step on the right -- */

.session-head-text {
  flex: 1;
}

.session-head-text p {
  margin: 0;
}

.session-head [aria-pressed="true"] {
  color: var(--info-text);
  background: var(--info-bg);
  border-color: var(--hover-edge);
}

.session-layout {
  display: grid;
  grid-template-columns: 19rem minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}

.session-nav {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: var(--space-2);
}

.session-area-head {
  padding: var(--space-3) var(--space-2) var(--space-1);
}

.session-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-2);
  font: inherit;
  font-size: var(--fs-sm);
  text-align: left;
  color: var(--text);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
}

.session-step:hover {
  background: var(--hover);
}

.session-step.current {
  font-weight: 600;
  background: var(--info-bg);
  box-shadow: inset 4px 0 0 var(--hover-edge);
}

.session-step.done .step-title {
  color: var(--text-muted);
}

.session-step .step-title {
  flex: 1;
}

.session-step .count {
  margin-left: auto;
  color: var(--text-muted);
}

.step-mark {
  display: inline-flex;
  width: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--ok-text);
}

.session-topic-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.session-topic-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

/* "+ Thema" at the end of an area of the side column (D1, 2026-11-24) */
.session-step.session-add .step-title {
  color: var(--link);
}

.badge.new-badge {
  color: var(--ok-text);
  background: var(--ok-bg);
}

/* "Neues Thema" over the meeting */
.session-new-topic {
  width: min(40rem, calc(100vw - 2 * var(--space-4)));
  max-height: calc(100vh - 2 * var(--space-5));
  padding: var(--space-5);
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.18);
}

.session-new-topic .new-topic-head {
  margin-bottom: var(--space-3);
}

.session-new-topic::backdrop {
  background: rgb(26 29 35 / 0.45);
}

.session-stand .stand-text {
  white-space: pre-line;
}

.note-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.note-head h3,
.session-subhead {
  margin: 0;
  font-size: var(--fs-md);
}

.save-state {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.save-state.error {
  color: var(--danger-text);
}

.decision-box {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.decision-box textarea {
  width: 100%;
  padding: var(--space-2) var(--space-2);
  font: inherit;
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
}

.decision-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.vote-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-2) var(--space-3);
}

.vote-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.vote-field input {
  width: 5.5rem;
  padding: var(--space-1) var(--space-2);
  font: inherit;
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
}

.vote-field date-input {
  width: auto;
}

.attendance-list {
  display: flex;
  flex-direction: column;
}

.attendance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-1);
  border-bottom: 1px solid var(--line);
}

.attendance-row .segmented {
  width: 20rem;
}

.guest-field {
  max-width: 24rem;
}

.session-history summary {
  cursor: pointer;
  color: var(--link);
}

@media (max-width: 60rem) {
  .session-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .session-nav {
    position: static;
    max-height: none;
  }
}

/* -- minutes of the new style -- */

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.protocol-state {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: -6px 0 var(--space-3);
}

.protocol-state .badge {
  margin-left: 0;
}

.protocol-area {
  margin-bottom: var(--space-4);
}

.protocol-entry {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--line);
}

.protocol-area > h2 + .protocol-entry {
  border-top: none;
}

.protocol-entry h3 {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: 0 0 var(--space-1);
  font-size: var(--fs-md);
}

.protocol-entry p {
  margin: 0 0 var(--space-2);
}

.protocol-decision {
  padding: var(--space-2) var(--space-3);
  color: var(--info-text);
  background: var(--info-bg);
  border-radius: var(--radius-sm);
}

.protocol-tasks {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
}

.protocol-tasks li {
  padding: 2px 0;
}

.protocol-tasks .badge {
  margin-left: 0;
}

/* -- trial run ("ff-tool probelauf"): a bar that cannot be overlooked -- */

.trial-banner {
  display: none;
}

body.trial-run .trial-banner {
  display: block;
  position: sticky;
  top: 60px;
  z-index: 9;
  padding: var(--space-2) var(--space-4);
  font-weight: 600;
  text-align: center;
  color: var(--warn-text);
  background: repeating-linear-gradient(135deg, var(--warn-bg) 0 18px, var(--trial-stripe) 18px 36px);
  border-bottom: 1px solid var(--warn-strong);
}

body.trial-run .app-header {
  background: var(--header-trial-bg);
}

/* -- meeting: "besprochen" (blue dot) and "abgeschlossen" (badge) in the side column -- */

.discussed-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-top: var(--space-1);
  border-radius: 50%;
  background: var(--hover-edge);
}

.session-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 2px var(--space-2) var(--space-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}

.session-legend .discussed-dot {
  margin-top: 0;
}

.session-legend .badge,
.session-step .badge {
  margin-left: var(--space-2);
}

.session-step.closed .step-title {
  color: var(--text-muted);
}

/* -- review: rows that open in place -- */
.review li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 3px 0;
  align-items: flex-start;
  display: block;
  padding: 0;
  border-top: 1px solid var(--line);
}

.review li:first-child {
  border-top: none;
}

.review-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-1);
  font: inherit;
  text-align: left;
  color: var(--text);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
}

.review-row:hover {
  background: var(--hover);
}

.review-row .area-badge.short {
  margin-top: 7px;
}

.review-title .badge {
  margin-left: var(--space-2);
}
.review-topic {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.review-toggle {
  color: var(--text-muted);
  padding: 0 var(--space-1);
}

/* the topic stands on the agenda too: the row leads there */
.review-later {
  flex: none;
  color: var(--link);
  font-size: var(--fs-sm);
  white-space: nowrap;
}

.review-details {
  margin: 0 0 var(--space-2) var(--space-5);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.review-details .facts {
  margin: 0 0 var(--space-2);
}
.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
  margin: 0;
  padding-left: var(--space-4);
}

.review-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.review-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

.review-done {
  align-self: flex-start;
  padding: var(--space-2) var(--space-3);
  font-weight: 600;
  background: var(--info-bg);
  border-radius: var(--radius-sm);
}

.session-area-head .area-badge:not(:has(.area-dot)) {
  padding-left: 0;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

/* -- meeting: "besprochen" as a speech bubble (the dots belong to the areas) -- */

.done-mark {
  display: inline-flex;
  color: var(--info-text);
}

.session-legend .done-mark {
  margin-right: 2px;
}

/* switches (bis / am / ab, attendance): a calm blue when chosen instead of black */
.segmented button[aria-pressed="true"] {
  color: var(--text-inverse);
  background: var(--text);
  color: var(--info-text);
  background: var(--info-bg);
  box-shadow: inset 0 0 0 1px var(--info-border);
  font-weight: 600;
}

.segmented button.state-attended[aria-pressed="true"] {
  color: var(--ok-text);
  background: var(--ok-bg);
  box-shadow: inset 0 0 0 1px var(--ok-border);
}

.segmented button.state-excused[aria-pressed="true"] {
  color: var(--warn-text);
  background: var(--warn-bg);
  box-shadow: inset 0 0 0 1px var(--warn-border);
}

.segmented button.state-unexcused[aria-pressed="true"] {
  color: var(--danger-text);
  background: var(--danger-bg);
  box-shadow: inset 0 0 0 1px var(--danger-border);
}

/* proposals for the date of the next meeting */
/* five proposals in one row, the best guess in the middle */
.date-proposals {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-2);
  max-width: 54rem;
  margin-bottom: var(--space-2);
}

.date-proposals > .muted {
  grid-column: 1 / -1;
}

.date-proposals .due-quick {
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-2) var(--space-1);
  border: 1px solid var(--line);
}

/* -- the meeting, tighter: a topic with little content fits on one screen -- */
.session-head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  margin-bottom: var(--space-2);
}

.session-head .date-tile {
  transform: scale(0.8);
  transform-origin: left center;
  margin-right: -10px;
}
.session-head-text h1 {
  margin: 0;
  font-size: var(--fs-xl);
}
.session-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
  padding: var(--space-4) var(--space-5);
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4);
}
.session-topic-head h2 {
  margin: var(--space-1) 0 0;
  font-size: var(--fs-xl);
  margin: 2px 0 0;
  font-size: var(--fs-xl);
}

.session-panel .facts {
  margin: 0;
}

.session-panel .topic-tasks h3,
.session-panel .note-head h3 {
  margin: 0;
}

.session-panel .topic-tasks {
  gap: var(--space-1);
}
.session-note {
  width: 100%;
  min-height: 7rem;
  padding: var(--space-2) var(--space-3);
  font: inherit;
  line-height: 1.45;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
  min-height: 4.5rem;
}
.session-note-box {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3);
}
.session-steps {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
  padding-top: var(--space-2);
}

.protocol-entry h3 .area-badge.short {
  margin-right: 2px;
}

/* an empty error line takes no room */
.status-error:empty {
  display: none;
}

.date-proposals .due-quick.chosen {
  border-color: var(--hover-edge);
  background: var(--info-bg);
}

/* -- login (app/auth.py) and input kept in the browser (unsaved.js) -- */

.login-dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--space-5) var(--space-6);
  width: min(24rem, calc(100vw - 32px));
  box-shadow: var(--shadow-dialog);
}

.login-dialog::backdrop {
  background: var(--accent);
}

.login-dialog h1 {
  margin: 0 0 var(--space-1);
}

.login-dialog .form-field input {
  width: 100%;
}

.login-dialog .form-actions {
  margin-top: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
}

/* -- setting up an account (#/einrichten/…) and "Mein Konto" (docs/decisions/accounts.md) -- */
.setup-card {
  max-width: 32rem;
  margin: var(--space-5) auto;
  display: grid;
  gap: var(--space-2);
}

.setup-card p {
  margin: 0;
}

.setup-card h2 {
  margin: var(--space-3) 0 0;
  font-size: var(--fs-lg);
}

.setup-card .form-field input {
  width: 100%;
}

.setup-qr svg {
  display: block;
  width: min(240px, 100%);
  height: auto;
  background: #ffffff;   /* the code needs its light border to scan, also in a dark theme */
}

.setup-secret {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.account-page {
  display: grid;
  gap: var(--space-4);
  max-width: 40rem;
}

.account-card h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-lg);
}

.account-card .form-field input {
  width: min(100%, 22rem);
}

.unsaved-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 50;
  max-width: min(44rem, calc(100vw - 32px));
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
  background: var(--warn-bg-subtle);
  box-shadow: var(--shadow-menu);
}

.unsaved-banner pre {
  white-space: pre-wrap;
  max-height: 12rem;
  overflow: auto;
  font: inherit;
}

.save-state.offline {
  color: var(--warn-text);
}

.whoami-logout {
  margin-top: var(--space-2);
}

/* -- calendar (views/calendar.js) -- */

.calendar-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-4);
}

.calendar-months {
  display: grid;
  gap: var(--space-4);
}

.calendar-month {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.calendar-month > h2 {
  margin: 0;
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-md);
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--line);
}

.calendar-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.calendar-row + .calendar-row {
  border-top: 1px solid var(--line);
}

.calendar-row-link {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-4);
  color: inherit;
  text-decoration: none;
}

.calendar-row-link:hover {
  background: var(--hover);
  box-shadow: inset 4px 0 0 var(--hover-edge);
  text-decoration: none;
}

.calendar-day {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-shrink: 0;
  width: 6.5rem;
  font-variant-numeric: tabular-nums;
}

.calendar-weekday {
  width: 1.8rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.calendar-number {
  font-size: var(--fs-lg);
  font-weight: 600;
}

.calendar-row-main {
  display: grid;
  flex: 1;
  min-width: 0;
}

.calendar-row-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
}

.calendar-row-meta {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.calendar-row.cancelled .calendar-row-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.calendar-row-marks {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

.calendar-row-marks .area-badge {
  white-space: nowrap;
}

/* the topic of a date, as a chip: dot of its area and title */
.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 var(--space-1);
  padding: 1px var(--space-3);
  border: 1px solid var(--hover-edge);
  border-radius: 999px;
  background: var(--surface);
  color: var(--info-text);
  font-weight: 600;
  text-decoration: none;
}

.topic-chip:hover {
  background: var(--hover);
  text-decoration: none;
}

.badge-plan {
  background: var(--info-bg);
  color: var(--info-text);
}

.event-form {
  display: grid;
  gap: var(--space-4);
  max-width: 48rem;
  padding: var(--space-4);
}

.event-form .form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3) var(--space-4);
}

.event-form .form-field input,
.event-form .form-field textarea {
  width: 100%;
  box-sizing: border-box;
}

.event-form .segmented {
  max-width: 28rem;
}

.event-form .wide-field {
  grid-column: 1 / -1;
}

.form-block {
  margin: 0;
  padding: 0;
  border: none;
}

.form-block > legend {
  margin-bottom: var(--space-2);
  font-weight: 600;
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.form-hint {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  background: var(--info-bg);
  color: var(--info-text);
}

@media (max-width: 640px) {
  .event-form .form-grid {
    grid-template-columns: 1fr;
  }

  .calendar-row-link {
    flex-wrap: wrap;
  }
}

/* the crest in front of the name (web/img/crest.png, also the tab icon) */
.brand {
  font-weight: 600;
  font-size: var(--fs-lg);
  color: inherit;
  text-decoration: none;
  margin-right: auto;
  margin-right: 0;
  margin-right: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.brand-crest {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 1px var(--brand-halo));
}

/* the year in the tool (views/calendar.js, "Jahr"): six months side by side, twice */
/* On a projector the year takes the whole width. */
.app-main:has(.year-grid) {
  max-width: none;
}

.year-grid {
  display: grid;
  gap: var(--space-4);
}

.year-half {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.year-month + .year-month {
  border-left: 1px solid var(--line);
}

.year-month > h2 {
  margin: 0;
  padding: var(--space-2) var(--space-2);
  font-size: var(--fs-md);
  text-align: center;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--line);
}

.year-day {
  display: grid;
  grid-template-columns: 1.4rem 1.6rem minmax(0, 1fr);
  align-items: start;
  gap: 2px;
  min-height: 1.6rem;
  padding: 2px var(--space-2);
  font-size: var(--fs-xs);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.year-day:hover {
  background: var(--hover);
}

.year-day.weekend {
  background: var(--surface-subtle);
}

.year-day.school {
  box-shadow: inset 3px 0 0 var(--info-border);
}

.year-day.today {
  outline: 2px solid var(--hover-edge);
  outline-offset: -2px;
}

.year-day-number {
  font-weight: 600;
  text-align: right;
  padding-right: 3px;
}

.year-day-weekday {
  color: var(--text-muted);
}

.year-day.holiday .year-day-number,
.year-day.holiday .year-day-name {
  color: var(--accent);
  font-weight: 600;
}

.year-day-entries {
  display: grid;
  min-width: 0;
}

.year-day-name {
  color: var(--text-muted);
}

.year-entry {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
}

/* Up to two lines, then "…"; the tooltip has the whole title. */
.year-entry-text {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.year-entry:hover {
  color: var(--link);
  text-decoration: underline;
}

.year-entry.cancelled {
  text-decoration: line-through;
  color: var(--text-muted);
}

.year-entry .area-badge,
.year-entry .conflict-mark {
  flex-shrink: 0;
}
.year-entry-intern {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
}

.school-form {
  padding: var(--space-4) var(--space-4);
  margin-bottom: var(--space-4);
  max-width: 48rem;
}

.school-list {
  padding: var(--space-2) var(--space-4);
  max-width: 48rem;
}

.school-list li {
  display: grid;
  grid-template-columns: 14rem 1fr auto;
  gap: var(--space-3);
}

@media (max-width: 900px) {
  .year-half {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form-hint-note {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* exercises: the places by year (views/calendar.js, renderExercises) */
.exercise-add {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.exercise-matrix-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.exercise-matrix {
  border-collapse: collapse;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

.exercise-matrix th,
.exercise-matrix td {
  padding: var(--space-1) var(--space-2);
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: top;
  white-space: nowrap;
}

.exercise-matrix thead th {
  position: sticky;
  top: 0;
  background: var(--surface-subtle);
}

.exercise-matrix .place {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.exercise-matrix thead .place {
  z-index: 2;
  background: var(--surface-subtle);
}

.exercise-matrix tbody tr:hover th,
.exercise-matrix tbody tr:hover td {
  background: var(--hover);
}

.exercise-matrix .without {
  font-weight: 600;
}

.exercise-matrix .without.long {
  color: var(--warn-text);
  background: var(--warn-bg);
}

.exercise-matrix .this-year {
  background: var(--info-bg);
}

.exercise-day {
  display: block;
  color: var(--text);
  text-decoration: none;
}

.exercise-day:hover {
  color: var(--link);
  text-decoration: underline;
}

.exercise-day.planned,
.planned-mark {
  color: var(--link);
  font-style: italic;
}

.exercise-field[hidden] {
  display: none;
}

.calendar-filter .segmented button {
  white-space: nowrap;
}

.exercise-matrix .icon-button {
  width: auto;
  height: auto;
  padding: 0 var(--space-1);
  line-height: 1.2;
}

/* planning a year (views/calendar.js: renderPlans, renderPrepareYear) and its hints */
.conflict-mark {
  color: var(--warn-text);
  font-weight: 600;
}

.conflict-note {
  display: block;
  font-size: var(--fs-sm);
  color: var(--warn-text);
}

.conflict-note > span {
  display: block;
}

.event-form > .conflict-note {
  margin-bottom: var(--space-3);
}

.year-entry.conflict {
  color: var(--warn-text);
}

.plans {
  display: grid;
  gap: var(--space-4);
  max-width: 56rem;
}

.plan-card {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4);
}

.plan-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.plan-head h2 {
  margin: 0;
}

.plan-card textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
}

.prepare-card {
  padding: var(--space-2) 0 0;
}

.prepare-filter {
  padding: var(--space-2) var(--space-3);
}

.prepare-scroll {
  overflow-x: auto;
}

/* Stays in view along the long table: how many are chosen, and the one thing to do. */
.prepare-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
}

.prepare-actions .status-error {
  flex: 1;
  margin: 0;
}

.prepare-actions button {
  margin-left: auto;
}

.prepare-table {
  width: 100%;
  border-collapse: collapse;
}

.prepare-table th,
.prepare-table td {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.prepare-table thead th {
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.prepare-table tr.unchecked td {
  color: var(--text-muted);
}

.prepare-table tr.unchecked strong {
  font-weight: 400;
}

.prepare-date {
  white-space: nowrap;
}

.prepare-date-field {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.prepare-weekday {
  min-width: 1.5em;
}

.prepare-date .conflict-note {
  max-width: 16rem;
  margin-top: 2px;
  white-space: normal;
}

.prepare-month th {
  padding: var(--space-3) var(--space-3) var(--space-1);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  background: var(--bg);
}

.prepare-more td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 0;
}

.small-segmented button {
  padding: 2px var(--space-2);
  font-size: var(--fs-sm);
}

/* drop-down menus ("Weitere"): one card with rows like every list; the entries are no framed
   buttons. The row under the mouse turns blue with an edge, a chosen one is blue. */
.more-actions-menu {
  position: absolute;
  z-index: 6;
  top: calc(100% + 4px);
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: 13rem;
  padding: var(--space-1) 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-menu);
  gap: 0;
}

.more-actions-menu .menu-item,
.more-actions-menu a.menu-item,
.more-actions-menu button.menu-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 7px var(--space-4);
  font-size: var(--fs-sm);
  text-align: left;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.more-actions-menu .menu-item:hover:not(:disabled),
.more-actions-menu a.menu-item:hover {
  color: var(--text);
  background: var(--hover);
  box-shadow: inset 4px 0 0 var(--hover-edge);
  text-decoration: none;
}
.more-actions-menu .menu-item.active {
  color: var(--text-inverse);
  background: var(--text);
  color: var(--info-text);
  background: var(--info-bg);
}

.more-actions-menu .menu-item + .menu-item {
  border-top: 1px solid var(--line);
}

/* choices inside forms and tables look like the fields around them */
.prepare-table date-input,
.prepare-table select,
.exercise-add input {
  padding: var(--space-2) var(--space-2);
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* categories next to check boxes read like the plans next to them */
.check-row .area-badge {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text);
}

.exercise-hidden {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  align-items: baseline;
}

/* -- the date and time fields (web/js/date-input.js; docs/ui-principles.md 34) -- */
/* One height for every field of a form: 2.25rem, like the text fields and the choices next to them. */

:is(date-input, time-input) {
  position: relative;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: 2.25rem;
  max-width: 100%;
  padding: 0 var(--space-1) 0 0;
  font: inherit;
  font-size: var(--fs-md);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
}

:is(date-input, time-input):focus-within {
  border-color: var(--info-text);
  box-shadow: 0 0 0 1px var(--info-text);
}

:is(date-input, time-input, .event-form .form-field date-input, .event-form .form-field time-input) .field-text {
  box-sizing: border-box;
  height: 100%;
  min-width: 0;
  padding: 0 0 0 var(--space-2);
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

:is(date-input, .event-form .form-field date-input) .field-text {
  width: 6.4em;
}

:is(time-input, .event-form .form-field time-input) .field-text {
  width: 3.8em;
}

:is(date-input, time-input) .field-text.invalid {
  color: var(--danger-text);
  text-decoration: underline wavy var(--danger-text);
}

/* weekday or "Uhr": a fixed width, so the field does not change its size */
:is(date-input, time-input) .field-suffix {
  width: 1.7em;
  font-size: 0.85em;
  color: var(--text-muted);
}

time-input .field-suffix {
  width: 2em;
}

:is(date-input, time-input) :is(.field-clear, .field-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  font-size: var(--fs-lg);
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

:is(date-input, time-input) .field-clear {
  color: var(--text-faint);
}

:is(date-input, time-input) .field-clear:hover {
  color: var(--danger-text);
  background: none;
}

:is(date-input, time-input) .field-button:hover {
  color: var(--text);
  background: var(--surface-muted);
}

/* the place of "×" stays, so nothing moves when it comes or goes */
:is(date-input, time-input) .field-clear[hidden] {
  display: inline-flex;
  visibility: hidden;
}

/* the calendar of the browser opens from here; the field itself stays out of sight */
:is(date-input, .event-form .form-field date-input) .field-native {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

date-input .date-quick {
  position: absolute;
  z-index: 9;
  top: calc(100% + 4px);
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: 15rem;
  padding: var(--space-1);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-menu);
}

date-input .date-quick[hidden] {
  display: none;
}

.date-quick-choice {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-1) var(--space-2);
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--text);
  text-align: left;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
}

.date-quick-choice:hover {
  background: var(--surface-muted);
}

/* -- entries, "Stand" and history of a topic (docs/decisions/topics.md) -- */

.topic-stand {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-3) 0 var(--space-4);
}

.stand {
  padding: var(--space-2) var(--space-3);
  background: var(--surface-subtle);
  border-left: 3px solid var(--border-strong);
  border-radius: 0 8px 8px 0;
}

.stand-meta {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.stand-text {
  white-space: pre-wrap;
}

.entry-composer {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.entry-composer .entry-text {
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-2) var(--space-2);
  font: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
}

.task-with-entry {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
}

.task-with-entry .entry-composer {
  margin-left: var(--space-6);
}

.task-note {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  font-size: var(--fs-sm);
  color: var(--text);
}

.task-note svg {
  flex-shrink: 0;
  color: var(--text-muted);
  align-self: center;
}

.done-tasks-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.done-tasks-list > p {
  margin: 0;
}
.timeline {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--bg);
}

.timeline-item.quiet {
  padding: 3px 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.timeline-date {
  display: flex;
  flex-direction: column;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.timeline-person {
  font-size: var(--fs-xs);
  line-height: 1.3;
}

.timeline-body .clamped {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.timeline-more {
  padding: 0;
}

.timeline-body p {
  margin: 0 0 var(--space-1);
}

.timeline-body .decision {
  color: var(--info-text);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* in the meeting: what happened since the last one */
.session-since {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-3) 0;
  padding: var(--space-3) var(--space-3);
  background: var(--warn-bg-subtle);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
}

.session-since h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--fs-md);
}

.since-entry {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.badge.vorab-badge {
  color: var(--warn-text);
  background: var(--warn-bg);
}

.protocol-vorab {
  color: var(--text-muted);
}

.note-head button.pressed {
  color: var(--info-text);
  background: var(--info-bg-strong);
}

/* a new topic in one line */
.new-topic {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.new-topic-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.new-topic-line > select,
.new-topic-line > input {
  padding: 7px var(--space-3);
  font: inherit;
  line-height: 1.25rem;
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
}

.new-topic-line > input {
  flex: 1 1 16rem;
}

.new-topic-line .people-field {
  flex: 1 1 14rem;
}

.new-topic-more summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.due-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.due-kind {
  box-sizing: border-box;
  height: 2.25rem;
  padding: 0 var(--space-1);
  font: inherit;
  font-size: var(--fs-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.done-field {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.undo-toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  color: var(--text-inverse);
  background: var(--toast-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-toast);
  transform: translateX(-50%);
}

.undo-toast .link-button {
  color: var(--toast-link);
  font-weight: 600;
}

/* the whole row is hovered, also a small topic with its tick in front of the button */
.topic-row-button:hover {
  background: var(--surface-muted);
  background: none;
}

.overdue-text {
  color: var(--danger-text);
  font-weight: 600;
}

.topic-row-meta .past-text,
.agenda-meta .past-text {
  color: var(--warn-text);
  font-weight: 600;
}

/* the values in the head, the same for every topic (A1, 2026-11-23): no tick before the title;
   two columns as long as a date with time ("Mi, 09.12.2026, 19:30 Uhr") fits in one line */
.own-line {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  align-items: baseline;
  gap: var(--space-1) var(--space-4);
  margin: var(--space-2) 0 var(--space-1);
}

.own-field {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: var(--space-2);
}

.own-label {
  font-size: var(--fs-sm);
  line-height: 1.3;
  color: var(--text-muted);
}

.own-field > .own-value {
  justify-self: start;
}

.own-value .one-line {
  white-space: nowrap;
}

button.own-value {
  padding: 2px var(--space-1);
  font: inherit;
  color: var(--text);
  text-align: left;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

button.own-value:hover {
  border-color: var(--border);
  background: var(--surface);
}

.own-empty {
  color: var(--text-muted);
}

.own-dash {
  color: var(--border-strong);
}

.own-add {
  display: none;
  font-size: var(--fs-sm);
  color: var(--link);
}

.own-value:hover .own-add,
.own-value:focus-visible .own-add {
  display: inline;
}

.own-value:hover .own-dash,
.own-value:focus-visible .own-dash {
  display: none;
}

@media (hover: none) {
  .own-add {
    display: inline;
  }

  .own-dash {
    display: none;
  }
}

.topic-tasks.split {
  margin-top: var(--space-1);
}

/* a value in the meta line of a task opens the editor there (docs/ui-principles.md 33) */
.task-meta-value {
  padding: 0 2px;
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.task-meta-value:hover {
  color: var(--text);
  background: var(--surface-muted);
}

/* date and time keep their own width in forms, also where the fields of a column stretch */
.form-field > :is(date-input, time-input) {
  align-self: flex-start;
}

/* one value edited in place: a small bar right over the value, nothing on the page moves
   (docs/ui-principles.md 33) */
.value-editor {
  position: absolute;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: max-content;   /* one line; the script moves it left where the window ends */
  gap: var(--space-2);
  max-width: calc(100vw - 32px);
  padding: var(--space-1) var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-menu);
}

.value-editor .people-field {
  width: 17rem;
}

.value-editor .value-text-wrap {
  position: relative;
  display: inline-block;
}

.value-editor .value-text {
  box-sizing: border-box;
  width: 22rem;
  max-width: 100%;
  height: 2.25rem;
  padding: 0 var(--space-3);
  font: inherit;
  font-size: var(--fs-md);
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
}

.value-editor-message {
  flex-basis: 100%;
  margin: 0;
}

.value-editor-message:empty {
  display: none;
}

.task-note-icon {
  display: inline-flex;
  cursor: help;
}

.value-editor .value-entry-wrap {
  position: relative;
  display: inline-block;
}

.value-editor .value-entry {
  box-sizing: border-box;
  width: 30rem;
  max-width: calc(100vw - 160px);
  padding: var(--space-2) var(--space-2);
  font: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
}

/* the history: folded, the heading is its switch */
details.topic-history > summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  list-style: none;
}

details.topic-history > summary::-webkit-details-marker {
  display: none;
}

details.topic-history > summary::before {
  content: "▸";
  color: var(--text-muted);
}

details.topic-history[open] > summary::before {
  content: "▾";
}

details.topic-history > summary h3 {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: 0;
}

/* the tools of an entry: ✎ 📌 🗑, quiet until one points at the entry */
.entry-tools {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
  opacity: 0.45;
}

:is(.stand-head, .earlier-entry, .task-note, .since-text):hover .entry-tools,
.entry-tools:focus-within {
  opacity: 1;
}

.entry-tools .row-action {
  opacity: 1;
}

.stand-head,
.earlier-entry,
.since-text {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.earlier-entries {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.earlier-text {
  flex: 1;
  min-width: 0;
}

.older-notes summary {
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.task-notes .task-note {
  width: 100%;
}

.entry-versions summary {
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.entry-version {
  padding: 2px 0 2px var(--space-3);
  border-left: 2px solid var(--line);
  color: var(--text-muted);
}

.removed-text {
  text-decoration: line-through;
}

/* the composer: one line until it is used */
.entry-composer:not(.open) .entry-text {
  height: 2.25rem;
  min-height: 0;
  resize: none;
  overflow: hidden;
}

.entry-composer:not(.open) .entry-buttons {
  display: none;
}

.entry-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* the tools of a comment stand right at its text, so that they plainly belong to it */
.task-notes .entry-tools {
  margin-left: var(--space-1);
}

.undo-toast .link-button + .link-button {
  margin-left: -4px;
}

/* -- the thread of a topic: its entries oldest first, the field for what is new at the end; the
      same on the topic page and in the meeting (docs/decisions/topics.md). Kept tight, so that most
      topics fit on one screen. -- */
.thread {
  display: flex;
  flex-direction: column;
  margin: var(--space-2) 0 var(--space-3);
  padding-left: var(--space-3);
  border-left: 3px solid var(--border-strong);
}

.thread-item {
  position: relative;
  padding: var(--space-1) 0 var(--space-2);
}

.thread-item + .thread-item {
  border-top: 1px solid var(--line);
}

/* a dot on the line for every item */
.thread-item::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 10px;
  width: 9px;
  height: 9px;
  background: var(--border-strong);
  border: 2px solid var(--surface);
  border-radius: 50%;
}

.thread-tail::before {
  background: var(--info-text);
}

.thread-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.thread-meta .entry-tools {
  margin-left: auto;
}

.thread-item:hover .entry-tools {
  opacity: 1;
}

.thread-item > .pre {
  line-height: 1.35;
}

.thread-done {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text);
}

.small-check,
.small-check-mark {
  width: 18px;
  height: 18px;
  font-size: var(--fs-xs);
}

.small-check-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  background: var(--ok-text);
  border-radius: var(--radius-sm);
}

.thread-older summary {
  padding: 2px 0;
}

.thread-tail .entry-composer {
  margin-top: 2px;
}

.thread-now-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-4);
  margin-top: var(--space-1);
}

.thread-now-tools .decision-box {
  margin: 0;
}

.thread-now-tools .add-row {
  padding: 2px var(--space-1);
}

.thread-now .session-note {
  width: 100%;
  box-sizing: border-box;
}

.thread-now .check-field {
  font-size: var(--fs-sm);
}

.earlier-tasks {
  margin-top: var(--space-1);
}

/* tighter in the meeting: head, tasks and thread on one screen for most topics */
.session-panel .topic-tasks h3 {
  margin: var(--space-1) 0 2px;
}

.session-panel .task-row {
  padding: var(--space-1) var(--space-2);
}

.session-panel .own-line {
  margin-top: 2px;
}

.session-steps-right {
  display: inline-flex;
  gap: var(--space-2);
}

.accepted-note {
  color: var(--ok-text);
}

/* the review of the preparation, folded: one line with the numbers */
.review-folded {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font: inherit;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.review-folded:hover {
  background: var(--hover);
}

.review-folded .link-text {
  color: var(--link);
  font-size: var(--fs-sm);
  white-space: nowrap;
}

/* the focus topics of the invitation in the side bar of the preparation */
.prepare-focus ul {
  margin: var(--space-1) 0 0;
}

.prepare-focus li + li {
  margin-top: var(--space-1);
}

.prepare-focus .link-button {
  text-align: left;
  white-space: normal;
}

.review-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
}

/* the actions of a row of the agenda; on a narrow screen in a line of their own below the text
   (on touch screens they are always in sight) */
.agenda-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--space-2);
}

@media (max-width: 40rem) {
  .agenda-row {
    flex-wrap: wrap;
  }

  .agenda-row .agenda-main {
    flex: 1 1 calc(100% - 40px);
  }

  .agenda-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
  }
}

/* -- the tags of topics (#/themen/schlagwoerter): the list first, below "Neues Schlagwort" -- */
.tags-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 48rem;
}

.page-intro {
  max-width: 48rem;
  margin: 0 0 var(--space-4);
}

.tags-group h2,
.tags-new h2 {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  font-size: var(--fs-md);
}

.tag-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-1);
  border-top: 1px solid var(--line);
}

.tag-row:first-child {
  border-top: none;
}

.tag-row:hover {
  background: var(--hover);
}

.tag-label {
  display: inline-flex;
  flex: 1;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
}

.tag-label .tag-badge {
  padding: 2px var(--space-3);
  font-size: var(--fs-sm);
  white-space: normal;
}

.tag-count {
  font-size: var(--fs-sm);
  white-space: nowrap;
}

.tag-count.muted {
  color: var(--text-muted);
}

.row-menu > summary.row-menu-button {
  padding: 0 var(--space-2);
  font-size: var(--fs-lg);
  line-height: 1.4;
  color: var(--text-muted);
  background: none;
}

.row-menu > summary.row-menu-button::after {
  content: none;
}

.row-menu > summary.row-menu-button:hover,
.row-menu[open] > summary.row-menu-button {
  color: var(--text);
  background: var(--border);
}

.value-editor .value-select {
  height: 2.25rem;
  max-width: 22rem;
}

/* the day a topic was closed, set off from the days tasks were done (green field) */
.date-mark.closed {
  padding: 0 var(--space-2);
  font-weight: 600;
  background: var(--ok-bg);
  border-radius: 999px;
}

/* -- tags at the head of a topic: labels, "×" on hover, "＋" for the list -- */
/* the "×" sits inside the label, after the name (2026-11-22: it was covered by the next label) */
.tag-chip {
  display: inline-flex;
  align-items: center;
  background: var(--tag-bg);
  border-radius: 999px;
}

.tag-chip .tag-badge {
  padding-right: 2px;
  background: none;
}

.tag-remove {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 2px;
  padding: 0;
  font: inherit;
  font-size: var(--fs-sm);
  line-height: 1;
  color: var(--tag-text);
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.55;
}

.tag-chip:hover .tag-remove,
.tag-remove:focus-visible {
  opacity: 1;
}

.tag-chip:hover {
  background: var(--tag-bg-hover);
}

.tag-add,
.fact-add {
  padding: 0 var(--space-1);
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}

.tag-add:hover,
.fact-add:hover {
  color: var(--link);
}

.tag-pick {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 16rem;
}

.tag-pick-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 16rem;
  overflow-y: auto;
}

/* -- key figures below the values of the head -- */
.facts-line {
  margin-top: 0;
}

.facts-line .fact-add {
  justify-self: start;
}

.fact-name {
  position: relative;
}

/* -- earlier topics with the same tag -- */
.topic-related {
  margin: 0 0 var(--space-4);
}

.related-tag h3 {
  margin: 0 0 var(--space-1);
  font-size: var(--fs-md);
}

.related-tag + .related-tag {
  margin-top: var(--space-3);
}

.related-list li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  align-items: baseline;
  gap: var(--space-3);
  padding: 2px 0;
}

.related-day {
  font-variant-numeric: tabular-nums;
}

.related-facts {
  display: block;
}

/* -- templates (#/themen/vorlagen): list, form, import preview -- */
.templates-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 52rem;
}

.template-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.template-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-2) var(--space-1);
  border-top: 1px solid var(--line);
}

.template-row:first-child {
  border-top: none;
}

.template-row:not(.editing):hover {
  background: var(--hover);
}

.template-row.editing {
  display: block;
  padding: var(--space-3) var(--space-1) var(--space-4);
}

.template-main {
  display: flex;
  flex: 1 1 16rem;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.template-name {
  font-weight: 600;
}

.template-badges,
.template-tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
}

.template-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.template-name-field {
  flex: 1 1 18rem;
}

.template-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.template-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.template-line:hover .row-action,
.template-line .row-action:focus-visible {
  opacity: 1;
}
.task-text-input {
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-1) var(--space-2);
  font: inherit;
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
  background: var(--surface);
  flex: 1 1 18rem;
}

.fact-name-input {
  flex: 0 1 16rem;
}

.days-input {
  width: 5.5rem;
}

.days-text {
  min-width: 7rem;
}

.import-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}

.import-head h2 {
  margin: 0 0 var(--space-1);
}

.import-totals {
  margin: var(--space-1) 0 0;
  font-weight: 600;
}

.import-list {
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.import-row {
  border-top: 1px solid var(--line);
}

.import-line {
  display: grid;
  grid-template-columns: minmax(10rem, 16rem) 7.5rem 11rem 1fr auto;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  padding: var(--space-2) var(--space-1);
}

.import-line .import-summary {
  grid-column: 4;
  grid-row: 1;
}

.import-line .import-name {
  grid-column: 3 / 5;
  grid-row: 2;
  max-width: 22rem;
}

.import-line .badge {
  justify-self: start;
}

.import-toggle {
  grid-column: 5;
  padding: 0 var(--space-2);
  font: inherit;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}

.import-details {
  padding: 0 var(--space-1) var(--space-3) var(--space-4);
}

.import-diff {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.import-diff p {
  margin: 0;
}

.diff-part h4 {
  margin: 0 0 2px;
  font-size: var(--fs-sm);
}

.diff-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.diff-line {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr) auto;
  gap: var(--space-2);
  padding: 1px 0;
}

.diff-same {
  display: block;
  padding-left: var(--space-5);
}

.diff-mark {
  font-weight: 600;
  text-align: center;
}

.diff-added .diff-mark { color: var(--ok-text); }
.diff-removed .diff-mark { color: var(--danger-text); }
.diff-removed .diff-text { text-decoration: line-through; color: var(--text-muted); }
.diff-changed .diff-mark { color: var(--info-text); }

@media (max-width: 760px) {
  .import-line {
    grid-template-columns: 1fr auto;
  }

  .import-line > * {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .import-toggle {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  .diff-line {
    grid-template-columns: 1.2rem minmax(0, 1fr);
  }

  .diff-extra {
    grid-column: 2;
  }
}

/* -- "+ Neues Thema" from a template -- */
.new-topic-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}

.new-topic-head h2 {
  margin: 0;
}

.new-topic-template {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.new-topic-template select {
  max-width: 16rem;
}

/* a new topic (C1, 2026-11-23): fields with labels on top, the template in a grey frame below */
.new-topic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12rem;
  gap: var(--space-3);
}

.new-topic-grid .form-field input,
.new-topic-grid .form-field select {
  width: 100%;
}

.new-topic-when {
  align-items: flex-end;
}

.new-topic-template-fields:empty,
.from-template:empty {
  display: none;
}

.template-frame {
  padding: var(--space-3) var(--space-4) var(--space-4);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.template-frame-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  margin: 0;
}

.template-sub {
  margin: var(--space-3) 0 var(--space-1);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.template-sub span {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.template-tasks li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 var(--space-4);
  padding: var(--space-1) 0;
  border-top: 1px solid var(--line);
}

.template-tasks li:first-child {
  border-top: none;
}

.template-task-when {
  margin-left: auto;
  font-size: var(--fs-sm);
  text-align: right;
  white-space: nowrap;
}

.template-task-when small {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.template-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
}

.template-fact {
  padding: 2px var(--space-2);
  font-size: var(--fs-sm);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

.template-hints {
  margin: 0;
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-5);
  font-size: var(--fs-sm);
  background: var(--surface);
  border-left: 2px solid var(--border);
}

@media (max-width: 30rem) {
  .new-topic-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* quiet buttons stay without the red of button:hover */
.template-main:hover,
.tag-add:hover,
.tag-remove:hover,
.fact-add:hover,
.import-toggle:hover {
  background: none;
}

.tag-remove:hover {
  color: var(--text);
  background: var(--surface);
}

.import-toggle:hover {
  color: var(--text);
}

/* -- one look for every select (2026-11-21): like an input, wherever no rule says more -- */
select {
  min-height: 2.25rem;
  padding: 0 var(--space-1) 0 var(--space-2);
  font: inherit;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border-field);
  border-radius: var(--radius-sm);
}

select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

/* with a tag the closed topics follow at once, under a small head */
.closed-topics .closed-head {
  margin: var(--space-2) 0 0;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* -- narrow screens (design system step 3): nothing wider than the screen; wide tables scroll in
   their own box, filter rows wrap -- */
.people-panel {
  max-width: calc(100vw - 2rem);
}

.filter-bar,
.page-head {
  flex-wrap: wrap;
}

.home-list li > * {
  min-width: 0;                   /* the text wraps inside, the tick stays beside it */
}

@media (max-width: 40rem) {
  .tab-group {
    padding-right: 0;
    margin-right: 0;
    border-right: none;
  }

  .filter-select {
    max-width: 100%;
  }
}

/* the field for what is new: its label clear of the focus ring */
.thread-now > .thread-meta {
  margin-bottom: var(--space-1);
}

/* narrow screens: the member table scrolls sideways in its own box with every column (the fixed
   widths left no room for the names), and its head does not stick: inside the box it slid
   116 px into the rows */
@media (max-width: 60rem) {
  .members {
    min-width: 80rem;
  }

  .table-scroll .members thead,
  .table-scroll .data th {
    position: static;
  }
}

/* -- Einsicht (docs/decisions/accounts.md): the controls for changes are hidden, values are not
   clickable. The server refuses changes anyway; this only keeps the page from offering them. -- */
body.read-only :is(
  .page-actions > button, a.button[href="#/person/neu"], a.button[href="#/termin/neu"],
  .add-row, .fact-add, .tag-add, .tag-remove, .entry-composer, .task-editor, .session-add,
  .session-topic-actions, .topic-head-actions, .new-topic, .card-edit, .card-head > button,
  .entry-actions, .task-row-actions, .review-done, .decision-add, .add-value, .action-bar,
  .topic-head-line > button, .prepare-create form
) {
  display: none !important;
}

body.read-only :is(.own-value, .task-check, .agenda-row button, .value-button) {
  pointer-events: none;
}

/* -- the accounts (#/konten) -- */
.accounts-page {
  display: grid;
  gap: var(--space-4);
}

.accounts-table {
  padding: 0;
  overflow-x: auto;
}

.accounts-table table {
  width: 100%;
  border-collapse: collapse;
}

.accounts-table th,
.accounts-table td {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}

.accounts-table thead th {
  border-top: none;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
}

.accounts-table tr.inactive td {
  color: var(--text-muted);
}

.accounts-table .account-actions {
  white-space: nowrap;
  text-align: right;
}

.accounts-table .account-actions button + button {
  margin-left: var(--space-2);
}

.pending-rights {
  margin-top: var(--space-1);
}

.link-box {
  display: grid;
  gap: var(--space-2);
  border-color: var(--warn-border);
  background: var(--warn-bg-subtle);
}

.link-box p {
  margin: 0;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.link-row .setup-link {
  flex: 1 1 24rem;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: var(--fs-sm);
}

.new-account h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-lg);
}
