/* Friendraising Finder
   Tintenblau auf kühlem Papier, Textmarker-Gelb für alles, was fällig ist.
   Eine Schriftfamilie (Instrument Sans): schmal gesetzt in Tabellen und Feldnamen,
   damit lange deutsche Wörter Platz haben; normal breit in Überschriften. */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  src: url("fonts/instrument-sans-latin-ext-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  src: url("fonts/instrument-sans-latin-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f3f5f9;
  --surface: #ffffff;
  --sunken: #eaedf4;
  --ink: #141b2d;
  --ink-2: #47506a;
  --ink-3: #6c7590;
  --line: #d9deea;
  --line-strong: #b9c1d4;
  --blue: #2443b0;
  --blue-deep: #1a3185;
  --blue-tint: #e8ecfa;
  --marker: #ffe45c;
  --marker-soft: #fff6c2;
  --green: #17683f;
  --green-tint: #dcf2e4;
  --red: #a5301f;
  --red-tint: #fbe5e1;
  --violet: #5a3394;
  --violet-tint: #eee6f9;
  --amber: #6d5300;
  --radius: 8px;
  --radius-s: 5px;
  --font: "Instrument Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.0625rem;
  --step-2: 1.3125rem;
  --step-3: 1.75rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-deep); }
h1 { font-size: var(--step-3); line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; }
h2 { font-size: var(--step-1); line-height: 1.3; font-weight: 650; letter-spacing: -0.005em; }
h3 { font-size: var(--step-0); font-weight: 650; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.86em; background: var(--sunken); padding: 1px 5px; border-radius: 4px; }
mark { background: var(--marker); color: var(--ink); padding: 0 4px; border-radius: 2px; font-weight: 600; }
.mark { background: linear-gradient(transparent 12%, var(--marker) 12%, var(--marker) 88%, transparent 88%); padding: 0 3px; font-weight: 600; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--radius-s); z-index: 20; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-3); }
.small { font-size: var(--step--1); }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-line; }
.open { color: var(--ink-3); font-style: italic; }
.js .nojs { display: none; }

/* ---------- Gerüst ---------- */
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 22px 14px 18px;
  display: flex; flex-direction: column; gap: 26px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 0 8px; }
.brand-mark {
  width: 26px; height: 30px; flex: none; border-radius: 3px;
  background: linear-gradient(var(--blue) 0 9px, var(--surface) 9px);
  border: 1.5px solid var(--blue);
  position: relative;
}
.brand-mark::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 5px; height: 6px; background: var(--marker); border-radius: 1px; }
.brand-name { font-weight: 700; font-size: 1.02rem; line-height: 1.08; letter-spacing: -0.015em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .side-foot a, .side-foot .linklike {
  display: block; padding: 8px 10px; border-radius: var(--radius-s);
  color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: var(--step-0);
  border-left: 3px solid transparent;
}
.nav a:hover, .side-foot a:hover, .side-foot .linklike:hover { background: var(--paper); color: var(--ink); }
.nav a[aria-current="page"], .side-foot a[aria-current="page"] { background: var(--blue-tint); color: var(--blue-deep); border-left-color: var(--blue); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.side-foot .linklike { width: 100%; text-align: left; font-weight: 550; }
.langswitch { display: flex; gap: 4px; padding: 4px 10px 8px; font-size: var(--step--1); }
.langswitch a, .langswitch strong { padding: 2px 8px; border-radius: var(--radius-s); border: 1px solid var(--line); text-decoration: none; }
.langswitch strong { background: var(--blue-tint); color: var(--blue-deep); border-color: var(--blue); }
.page-login .langswitch { position: absolute; top: 12px; right: 16px; }
.main { padding: 30px clamp(18px, 3.2vw, 44px) 72px; max-width: 1280px; width: 100%; min-width: 0; }
.cols > *, .split > *, .lage > div, .projcard-head > * { min-width: 0; }

.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.lead { color: var(--ink-2); margin-top: 6px; max-width: 72ch; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: var(--step--1); color: var(--ink-3); margin-bottom: 8px; }
.crumbs a { color: var(--ink-2); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.panel > h2 { margin-bottom: 12px; }
.subhead { color: var(--ink-2); margin: 18px 0 8px; font-stretch: 88%; }
.panel > h2 + .subhead { margin-top: 4px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 18px; align-items: start; }
.empty { color: var(--ink-2); padding: 6px 0; max-width: 64ch; }
.empty p + p { margin-top: 12px; }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: var(--step-0); line-height: 1.2;
  padding: 8px 14px; border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); color: var(--ink); background: #fafbfe; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--sunken); border-color: transparent; }
.btn-small { padding: 5px 10px; font-size: var(--step--1); }
.btn-block { width: 100%; padding: 10px 14px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.linklike { font: inherit; background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; cursor: pointer; }
.side-foot .linklike { text-decoration: none; }
.danger { color: var(--red); }
.ext::after { content: "↗"; font-size: 0.8em; margin-left: 3px; }

/* ---------- Hinweise ---------- */
.flashes { margin-bottom: 16px; display: grid; gap: 8px; }
.flash { padding: 10px 14px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); border-left-width: 4px; }
.flash ul { margin: 6px 0 0 18px; list-style: disc; }
.flash-ok { border-left-color: var(--green); }
.flash-error { border-left-color: var(--red); background: var(--red-tint); border-color: #efc4bd; }
.flash-warn { border-left-color: #c9a400; background: var(--marker-soft); border-color: #ecd98a; margin-bottom: 16px; }
.notice { display: flex; gap: 12px 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--marker-soft); border: 1px solid #ecd98a; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; }
.notice p { max-width: 80ch; }
.hint { background: var(--marker-soft); border-left: 3px solid #d9b800; padding: 8px 12px; border-radius: 0 var(--radius-s) var(--radius-s) 0; margin-top: 10px; font-size: var(--step--1); }
.hint-inline { font-size: var(--step--1); background: var(--marker-soft); padding: 1px 5px; border-radius: 3px; }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius-s); font-weight: 550; opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s; pointer-events: none; z-index: 30; max-width: min(420px, calc(100vw - 40px)); }
.toast.show { opacity: 1; transform: none; }
.toast.err { background: var(--red); }

/* ---------- Marken, Schlagworte, Status ---------- */
.badge { display: inline-block; font-size: 0.72rem; font-weight: 650; padding: 1px 7px; border-radius: 99px; background: var(--sunken); color: var(--ink-2); vertical-align: 2px; white-space: nowrap; font-stretch: 88%; }
.badge-demo { background: transparent; border: 1px dashed var(--ink-3); color: var(--ink-3); }
.badge-blue { background: var(--blue-tint); color: var(--blue-deep); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: var(--step--1); font-stretch: 88%; background: var(--sunken); color: var(--ink-2); padding: 1px 8px; border-radius: 4px; white-space: nowrap; }
.pill { display: inline-block; font-size: var(--step--1); font-weight: 650; font-stretch: 88%; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.pill-phase { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink-2); }
.pill-idea { background: var(--marker-soft); color: var(--amber); }
.st-vorgemerkt { background: var(--sunken); color: var(--ink-2); }
.st-in_pruefung { background: var(--blue-tint); color: var(--blue-deep); }
.st-antrag_in_arbeit { background: var(--marker-soft); color: var(--amber); }
.st-eingereicht { background: var(--violet-tint); color: var(--violet); }
.st-bewilligt { background: var(--green-tint); color: var(--green); }
.st-abgelehnt { background: var(--red-tint); color: var(--red); }
.st-verworfen { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
.status-form { display: inline-flex; gap: 6px; align-items: center; }
.status-select {
  width: auto; min-width: 9.5rem; min-height: 0;
  font: inherit; font-size: var(--step--1); font-weight: 650; font-stretch: 88%;
  border: 1px solid transparent; border-radius: 99px; padding: 4px 26px 4px 11px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2347506a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.status-select:hover { border-color: var(--line-strong); }
.status-select.saving { opacity: .6; }
.status-select option { background: #fff; color: var(--ink); font-weight: 400; }
.frist-run { color: var(--green); font-weight: 600; }
.frist-past { color: var(--red); font-weight: 600; }
.frist-date { font-weight: 600; }

/* ---------- Kalenderblatt: das wiederkehrende Zeichen für Fristen und Wiedervorlagen ---------- */
.tile { flex: none; width: 50px; border: 1px solid var(--line-strong); border-radius: 5px; overflow: hidden; background: var(--surface); text-align: center; display: grid; line-height: 1; }
.tile-month { background: var(--blue); color: #fff; font-size: 0.7rem; font-weight: 650; padding: 4px 0 3px; font-stretch: 85%; }
.tile-day { font-size: 1.32rem; font-weight: 650; padding: 5px 0 1px; letter-spacing: -0.02em; }
.tile-wd { font-size: 0.68rem; color: var(--ink-3); padding-bottom: 5px; font-stretch: 85%; }
.tile-soon { background: var(--marker); border-color: #c9ac00; }
.tile-soon .tile-wd { color: var(--ink-2); }
.tile-past .tile-month { background: var(--red); }
.tile-past { border-color: #d9a39b; }
.tile-none { border-style: dashed; }
.tile-none .tile-month { background: var(--sunken); }
.tile-none .tile-day { color: var(--ink-3); }
.agenda { display: grid; gap: 12px; }
.agenda li { display: flex; gap: 12px; align-items: flex-start; }
.agenda-body { display: grid; gap: 2px; min-width: 0; padding-top: 1px; }
.agenda-title { font-weight: 650; color: var(--ink); text-decoration: none; }
.agenda-title:hover { color: var(--blue); text-decoration: underline; }
.agenda-links { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: var(--step--1); }
.agenda-quiet .tile { transform: scale(.86); transform-origin: top left; margin-right: -7px; margin-bottom: -8px; }

/* ---------- Tabellen ---------- */
.tablewrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; position: relative; }
.table { width: 100%; border-collapse: collapse; font-stretch: 92%; }
.table th { text-align: left; font-size: var(--step--1); font-weight: 650; color: var(--ink-2); padding: 8px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; vertical-align: bottom; font-stretch: 88%; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfe; }
.table .num { text-align: right; white-space: nowrap; }
.table-catalog { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; }
.table-catalog th:first-child, .table-catalog td:first-child { padding-left: 18px; }
.table-catalog th:last-child, .table-catalog td:last-child { padding-right: 18px; }
.table-tight td { padding: 8px 10px; }
.projcard .table-tight th:last-child { width: 178px; }
.col-main { min-width: 230px; }
.w-bar { min-width: 190px; }
.w-check { width: 1%; text-align: center; white-space: nowrap; }
.rowactions { white-space: nowrap; text-align: right; }
.row-off td { color: var(--ink-3); }
.row-off a { color: var(--ink-3); }
.sort { color: inherit; text-decoration: none; }
.sort:hover { color: var(--blue); }
.sort-on { color: var(--ink); }
.pager { display: flex; gap: 4px; margin-top: 14px; }
.pager a { padding: 5px 11px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 600; }
.pager a[aria-current="page"] { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Filterleiste ---------- */
.filters { display: grid; grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(120px, 1fr)); gap: 10px 12px; align-items: end; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.filters .field { margin: 0; }
.filter-actions { display: flex; gap: 6px; }
.table-catalog + .pager { margin-bottom: 18px; }

/* ---------- Formulare ---------- */
label, legend { display: block; font-size: var(--step--1); font-weight: 650; color: var(--ink-2); margin-bottom: 4px; font-stretch: 88%; }
input[type="text"], input[type="search"], input[type="url"], input[type="date"], input[type="password"], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: 7px 10px; min-height: 36px;
}
input[type="text"], input[type="search"], input[type="url"], input[type="date"], input[type="password"], select { height: 38px; }
textarea { resize: vertical; line-height: 1.45; }
textarea.code, textarea.prompt { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.8rem; background: var(--paper); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
input::placeholder, textarea::placeholder { color: #98a0b5; font-style: italic; }
input.num { text-align: right; }
input.short { max-width: 90px; }
.field { min-width: 0; }
.field-help { font-size: var(--step--1); color: var(--ink-3); margin-top: 4px; }
.field-msg { font-size: var(--step--1); color: var(--red); font-weight: 600; margin-top: 4px; }
.field-error input, .field-error select, .field-error textarea { border-color: var(--red); background: #fff8f7; }
.req { color: var(--red); font-weight: 650; font-size: var(--step--1); }
.fieldgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.field-wide { grid-column: 1 / -1; }
.checkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.checkitem { display: flex; gap: 8px; align-items: center; font-weight: 400; font-size: var(--step-0); color: var(--ink); margin: 0; font-stretch: 100%; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--blue); flex: none; margin: 0; }
.form { max-width: 880px; }
.formgroup > summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.formgroup > summary h2 { display: inline; }
.formgroup[open] > summary { margin-bottom: 14px; }
.formgroup > p.muted { margin: -6px 0 14px; }
.formbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.formbar-sticky { position: sticky; bottom: 0; background: var(--paper); padding: 14px 0; border-top: 1px solid var(--line); }
.formbar form { display: flex; gap: 10px; align-items: center; }
.stack { display: grid; gap: 12px; }
.inline-edit { margin-top: 8px; }
.inline-edit > summary { cursor: pointer; color: var(--blue); font-size: var(--step--1); font-weight: 600; width: fit-content; }
.inline-edit[open] > summary { margin-bottom: 10px; }
.inline-edit form + form { margin-top: 8px; }

/* ---------- Detailseiten ---------- */
.keyfacts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; }
.keyfact { padding: 14px 18px; display: grid; gap: 2px; align-content: start; border-left: 1px solid var(--line); }
.keyfact:first-child { border-left: 0; }
.keyfact-label { font-size: var(--step--1); color: var(--ink-2); font-weight: 650; font-stretch: 88%; }
.keyfact-value { font-size: var(--step-2); font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.keyfact-value .muted, .keyfact-value .open { font-size: var(--step-0); font-weight: 400; letter-spacing: 0; }
.summary { font-size: var(--step-1); max-width: 70ch; margin-bottom: 14px; }
.longtext { max-width: 70ch; margin-bottom: 14px; }
.facts { display: grid; }
.fact { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 4px 18px; padding: 9px 0; border-top: 1px solid var(--line); }
.fact:first-child { border-top: 0; padding-top: 0; }
.fact dt { font-size: var(--step--1); font-weight: 650; color: var(--ink-2); font-stretch: 88%; padding-top: 2px; }
.fact dd { min-width: 0; overflow-wrap: anywhere; max-width: 78ch; }
.facts-stack .fact { grid-template-columns: 1fr; gap: 2px; }
.facts-stack + form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.plain li + li, .questions li + li { margin-top: 4px; }
.questions li { padding-left: 14px; position: relative; }
.questions li::before { content: "?"; position: absolute; left: 0; font-weight: 700; color: var(--amber); }
.rounds { display: grid; gap: 14px; margin-bottom: 6px; }
.rounds li { display: flex; gap: 12px; align-items: flex-start; }
.round-body { display: grid; gap: 1px; min-width: 0; flex: 1; font-size: var(--step--1); }
.round-body strong { font-size: var(--step-0); }
.linklist { display: grid; gap: 10px; }
.linklist li { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.split-side .linklist li { display: grid; gap: 2px; }
.linklist-row { display: flex; gap: 10px; align-items: center; margin-top: 3px; }
.history { display: grid; gap: 9px; border-left: 2px solid var(--line); padding-left: 12px; }
.history li { display: grid; }

/* ---------- Projektübersicht ---------- */
.orgblock { margin-bottom: 30px; }
.orghead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); margin-bottom: 14px; }
.orghead h2 { font-size: var(--step-2); }
.orghead h2 a { color: var(--ink); text-decoration: none; }
.orghead h2 a:hover { color: var(--blue); }
.projcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.projcard-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px 24px; padding: 16px 20px; align-items: start; }
.projcard-title h3 { font-size: var(--step-1); }
.projcard-title h3 a { color: var(--ink); text-decoration: none; }
.projcard-title h3 a:hover { color: var(--blue); text-decoration: underline; }
.projcard-title p { margin-top: 5px; font-size: var(--step--1); }
.projcard-money { display: grid; gap: 6px; }
.projcard-next { display: grid; gap: 1px; }
.projcard-next a { font-weight: 600; color: var(--ink); text-decoration: none; }
.projcard-next a:hover { color: var(--blue); text-decoration: underline; }
.projcard .tablewrap { margin: 0; padding: 0 10px 4px; border-top: 1px solid var(--line); background: #fcfcfe; }
.projcard-empty { padding: 10px 20px 14px; border-top: 1px solid var(--line); font-size: var(--step--1); }

/* ---------- Finanzierungsbild ---------- */
.fbar { display: flex; height: 18px; border-radius: 4px; overflow: hidden; background: var(--sunken); gap: 2px; }
.fbar-compact { height: 9px; border-radius: 3px; }
.fseg { display: block; height: 100%; min-width: 3px; }
.fseg-granted { background: var(--green); }
.fseg-submitted { background: var(--violet); }
.fseg-drafting { background: repeating-linear-gradient(135deg, #e3c400 0 5px, #f6dc45 5px 10px); }
.fseg-uncovered { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 3px; }
.legend { font-size: var(--step--1); color: var(--ink-2); margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.legend .key { margin-left: 10px; }
.legend .key:first-child { margin-left: 0; }
.lage { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; }
.lage > div { padding: 20px 22px; }
.lage-next { border-left: 1px solid var(--line); }
.lage h2 { margin-bottom: 10px; }
.lage-figure { font-size: var(--step-0); color: var(--ink-2); }
.lage-figure strong { font-size: 2.1rem; font-weight: 600; letter-spacing: -0.025em; color: var(--ink); line-height: 1.1; margin-right: 4px; }
.lage .fbar { margin: 12px 0 10px; }
.fkey { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: var(--step--1); color: var(--ink-2); }
.fkey strong { color: var(--ink); }
.minifacts { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.minifacts dt { font-size: var(--step--1); color: var(--ink-2); font-weight: 650; font-stretch: 88%; }
.minifacts dd { font-weight: 600; }
.addbar { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line); }
.addform { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.addform .field { flex: 1 1 320px; }

/* ---------- Passungs-Check ---------- */
.marks { display: inline-flex; gap: 3px; vertical-align: middle; }
.mk { width: 9px; height: 14px; border-radius: 2px; display: inline-block; }
.mk-ok { background: var(--green); }
.mk-warn { background: #e0bf00; }
.mk-no { background: var(--red); }
.mk-open { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.checks { display: grid; gap: 0; margin-top: 8px; }
.check { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: var(--step--1); }
.check-state { grid-column: 2; grid-row: 1; font-weight: 650; font-stretch: 88%; padding: 1px 8px; border-radius: 4px; height: fit-content; }
.check-label { grid-column: 1; grid-row: 1; }
.check-text { grid-column: 1 / -1; max-width: 80ch; }
.check-ok .check-state { background: var(--green-tint); color: var(--green); }
.check-warn .check-state { background: var(--marker-soft); color: var(--amber); }
.check-no .check-state { background: var(--red-tint); color: var(--red); }
.check-open .check-state { box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-3); }
.check-label { font-weight: 650; color: var(--ink); }
.check-text { color: var(--ink-2); }
.fitcell > summary, .sugg details > summary { cursor: pointer; white-space: nowrap; }
.fitcell[open] { min-width: 300px; }
.fitcell[open] > summary { margin-bottom: 6px; }
.sugg { display: grid; }
.sugg > li { padding: 12px 0; border-top: 1px solid var(--line); }
.sugg > li:first-child { border-top: 0; }
.sugg-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sugg-head > div { display: grid; gap: 1px; justify-items: start; }
.table a.strong, .sugg a.strong { text-decoration: none; }
.table a.strong:hover, .sugg a.strong:hover { text-decoration: underline; }
.table td a.muted { text-decoration-color: var(--line-strong); }
.sugg details { margin-top: 6px; }
.sugg details > summary { font-size: var(--step--1); color: var(--ink-2); }
.panel > h2 + p.muted { margin: -6px 0 14px; max-width: 86ch; }

/* ---------- Import ---------- */
.upload { display: grid; gap: 12px; max-width: 760px; }
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 22px; background: var(--paper); display: grid; gap: 8px; }
.dropzone.over { border-color: var(--blue); background: var(--blue-tint); }
.dropzone label { font-size: var(--step-0); font-weight: 400; color: var(--ink); font-stretch: 100%; margin: 0; }
.errorpanel { border-color: #e2a79e; border-left: 4px solid var(--red); }
.errorpanel > p { margin-bottom: 10px; }
.errorpanel .table { margin-bottom: 12px; }
.formats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.format { display: grid; gap: 10px; align-content: start; min-width: 0; }
.downloads { display: flex; flex-wrap: wrap; gap: 8px; }
.fielddoc > summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: var(--step--1); }
.fielddoc[open] > summary { margin-bottom: 8px; }
.docgroup td { background: var(--paper); }
.importsec-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.choices { display: grid; gap: 8px; margin-bottom: 14px; }
.choices-note { font-size: var(--step--1); font-weight: 650; color: var(--ink-2); }
.choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: var(--step-0); color: var(--ink); margin: 0; font-stretch: 100%; }
.choice input { margin-top: 3px; }
.choice-other { display: grid; gap: 4px; max-width: 420px; }
.choice-other label { margin: 0; }
.values > summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: var(--step--1); margin-bottom: 10px; }
.difftable td { font-stretch: 96%; }
.diff-old { color: var(--ink-2); width: 34%; }
.diff-new { width: 34%; background: #f4fbf6; }
.chooser { display: block; }

/* ---------- Anmeldung ---------- */
.page-login { background: var(--paper); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 30px 26px; display: grid; gap: 18px; }
.brand-login { padding: 0; }
.login-card h1 { font-size: var(--step-2); }
.login-card-wide { width: min(460px, 100%); }

/* ---------- Dialog ---------- */
.dialog { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 24px; width: min(480px, calc(100vw - 32px)); color: var(--ink); }
.dialog::backdrop { background: rgba(20, 27, 45, .42); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 1080px) {
  .split, .lage { grid-template-columns: 1fr; }
  .lage-next { border-left: 0; border-top: 1px solid var(--line); }
  .keyfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keyfact:nth-child(3) { border-left: 0; }
  .keyfact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .projcard-head { grid-template-columns: 1fr 1fr; }
  .projcard-title { grid-column: 1 / -1; }
  .formats { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .brand-name br { display: none; }
  .brand-name { white-space: nowrap; font-size: .95rem; }
  .brand-mark { width: 20px; height: 24px; }
  .nav { flex-direction: row; }
  .nav a, .side-foot a, .side-foot .linklike { border-left: 0; white-space: nowrap; padding: 7px 9px; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; border-top: 0; padding-top: 0; }
  .main { padding: 20px 16px 60px; }
  .cols, .fieldgrid, .filters { grid-template-columns: 1fr; }
  .projcard-head { grid-template-columns: 1fr; }
  .fact { grid-template-columns: 1fr; gap: 2px; }
  h1 { font-size: 1.45rem; }
}
@media (max-width: 520px) {
  .keyfacts { grid-template-columns: 1fr; }
  .keyfact { border-left: 0; border-top: 1px solid var(--line); }
  .keyfact:first-child { border-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
@media print {
  .side, .actions, .filters, .formbar, .toast, .rowactions, .addbar { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .panel, .lage, .keyfacts { border-color: #999; }
}
.status-select { height: auto; }
.upload > .btn { justify-self: start; }
.fitcell > summary { white-space: normal; }
.fitcell .marks { display: flex; margin: 4px 0 0 16px; }
.col-step { min-width: 190px; }
.status-select { min-width: 9rem; }
.col-main { min-width: 200px; }
.prio { display: inline-block; margin: 4px 0 0 11px; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
form.inline { display: inline; }
.bullets { list-style: disc; padding-left: 20px; display: grid; gap: 6px; margin-bottom: 12px; }

/* ---------- Stiftungsprofil ---------- */
.tabsnav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: -6px 0 16px; font-size: var(--step--1); font-weight: 600; }
.tabsnav a { color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; padding-bottom: 2px; }
.tabsnav a:hover { color: var(--blue); border-bottom-color: var(--blue); }
.panelhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.panelhead h2 { margin: 0; }
.panelhead + p.muted { margin: -4px 0 14px; max-width: 86ch; }
.practice, .contacts { display: grid; }
.practice > li, .contacts > li { padding: 12px 0; border-top: 1px solid var(--line); }
.practice > li:first-child, .contacts > li:first-child { border-top: 0; padding-top: 0; }
.practice-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.practice-actions { margin-left: auto; }
.practice p { margin-top: 5px; max-width: 80ch; }
.party { font-size: var(--step--1); color: var(--ink-2); margin-top: 3px; }
.check-state-pill { grid-column: 2; grid-row: 1; }

/* Importvorschau: Unterdatensätze des Fördergebers */
.childlist { list-style: none; margin: 0; padding: 0; }
.childitem { padding: .6rem 0; border-top: 1px solid var(--line); }
.childitem:first-child { border-top: 0; }
.childitem p { margin: 0 0 .35rem; }
.childitem .choice { margin: 0; }

/* Projektprofil */
.entries { list-style: none; margin: 0; padding: 0; }
.entries > li { padding: .75rem 0; border-top: 1px solid var(--line); }
.entries > li:first-child { border-top: 0; padding-top: .25rem; }
.entries p { margin: .35rem 0; }
.facts-tight { margin: .35rem 0; }
.facts-tight .fact { padding: .2rem 0; }
.figure { font-weight: 600; }
.tag-period { font-size: .78rem; }
.srcs { margin-top: .3rem; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; }
.src { display: inline; }
.pill.ev { font-size: .72rem; }
.ev-oeffentlich { background: #e3f1e7; color: #1f5a33; }
.ev-intern { background: #e6ecfa; color: #24407a; }
.ev-geschaetzt { background: #fbf0d9; color: #6b4a07; }
.ev-zu_pruefen { background: #f6e3e3; color: #7a2424; }
.pill-internal { background: #f1f1f4; color: #50535f; }
.pill-release { background: #e3f1e7; color: #1f5a33; }
.entry-internal blockquote { border-left-color: var(--line-strong); }
.quote { margin: .5rem 0; padding: .25rem 0 .25rem .9rem; border-left: 3px solid #b9c7ef; }
.impact { list-style: none; margin: 0; padding: 0; }
.impact-level { padding: .6rem 0; border-top: 1px solid var(--line); }
.impact-empty .impact-head { color: #8a8f9c; }
.impact-head { font-weight: 600; display: flex; gap: .6rem; align-items: center; }
.impact-n { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #e6ecfa; color: #24407a; font-size: .85rem; }
.impact-goal { margin: .4rem 0 .6rem 2.2rem; }
.measure { margin-bottom: .25rem; }
.periodpick { margin: 0 0 .35rem; display: flex; gap: .5rem; align-items: center; }
.openlist li { padding: .35rem 0; border-top: 1px solid var(--line); }
.openlist li:first-child { border-top: 0; }
.num-right { float: right; }
.table-budget td { vertical-align: top; }
.ok-text { color: #1f5a33; }
.gs-bewilligt { background: #e3f1e7; color: #1f5a33; }
.gs-beantragt { background: #fbf0d9; color: #6b4a07; }
.gs-abgelehnt, .gs-zurueckgezogen { background: #f1f1f4; color: #50535f; }
.mt-small { margin-top: .35rem; }

/* ---------------------------------------------------------------- Antragswerkstatt */
.aw-steps ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.25rem; padding: 0; }
.aw-steps a { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem .45rem .5rem; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: inherit; text-decoration: none; font-size: .92rem; }
.aw-steps a:hover { border-color: var(--line-strong); }
.aw-steps a[aria-current="step"] { background: #1f3a8a; border-color: #1f3a8a; color: #fff; }
.aw-step-n { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: #e6ecfa; color: #24407a; font-size: .8rem; font-weight: 600; }
.aw-steps a[aria-current="step"] .aw-step-n { background: #fff; color: #1f3a8a; }
.aw-count { font-size: .78rem; opacity: .8; }
.aw-st-entwurf { background: #f1f1f4; color: #50535f; }
.aw-st-in_arbeit { background: #fbf0d9; color: #6b4a07; }
.aw-st-eingereicht { background: #e6ecfa; color: #24407a; }
.aw-st-bewilligt { background: #e3f1e7; color: #1f5a33; }
.aw-st-abgelehnt, .aw-st-zurueckgezogen { background: #f6e3e3; color: #7a2424; }
.aw-howto { margin: .5rem 0 1rem; padding-left: 1.25rem; }
.aw-howto li { margin-bottom: .4rem; }

/* Auswahlbaum */
.aw-toolbar { position: sticky; top: 0; z-index: 5; }
.aw-toolbar-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.aw-toolbar-row input[type=search] { flex: 1 1 16rem; min-width: 12rem; }
.tn-root, .tn-children { list-style: none; margin: 0; padding: 0; }
.tn-children { padding-left: 1.6rem; border-left: 1px dashed var(--line); margin-left: .6rem; }
.tn { margin: 0; }
.tn-line, .tn-leaf { display: flex; align-items: baseline; gap: .4rem; padding: .22rem 0; flex-wrap: wrap; }
.tn-root > .tn > .tn-line label { font-weight: 700; font-size: 1.05rem; }
.tn-group > .tn-line label { font-weight: 600; }
.tn-unit > .tn-line label { font-weight: 500; }
.tn-leaf label { font-weight: 500; }
.tn-val { color: #5a6072; font-size: .88rem; flex: 1 1 18rem; min-width: 0; }
.tn-count { color: #7a8092; font-size: .8rem; }
.tn-has > .tn-line .tn-count { color: #1f3a8a; font-weight: 600; }
.tn-toggle { width: 1.3rem; height: 1.3rem; border: 0; background: none; cursor: pointer; padding: 0; color: #50535f; flex: none; }
.tn-toggle::before { content: "▸"; display: inline-block; transition: transform .15s; }
.tn-toggle[aria-expanded="true"]::before { transform: rotate(90deg); }
.tn-leaf { padding-left: 1.7rem; }
.tn-box { width: 1.05rem; height: 1.05rem; accent-color: #1f3a8a; flex: none; }
.pill-edited { background: #fbf0d9; color: #6b4a07; font-size: .72rem; }
.pill-changed { background: #f6e3e3; color: #7a2424; font-size: .72rem; text-decoration: none; }
.aw-area-projekt, .aw-area-organisation { background: #e6ecfa; color: #24407a; font-size: .72rem; }
.aw-area-foerdergeber { background: #efe6fa; color: #4b2a7a; font-size: .72rem; }
.aw-area-foerderprogramm { background: #e3f1e7; color: #1f5a33; font-size: .72rem; }

/* Mappe */
.aw-board-grid { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 1.25rem; align-items: start; }
@media (max-width: 960px) { .aw-board-grid { grid-template-columns: 1fr; } }
.aw-tools { position: sticky; top: 1rem; }
.aw-blocks { list-style: none; margin: 0; padding: 0; }
.awb-children { margin: .35rem 0 .2rem 1.4rem; padding-left: .6rem; border-left: 2px solid #e6ecfa; min-height: .6rem; }
.awb { margin: .35rem 0; }
.awb-card { display: flex; gap: .6rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .6rem; }
.awb-section > .awb-card { background: #f4f6fb; border-color: #d4dbec; }
.awb-text > .awb-card { border-left: 3px solid #b9c7ef; }
.awb-budget_summary > .awb-card { border-left: 3px solid #8fc4a0; }
.awb-handle { width: .7rem; align-self: stretch; cursor: grab; background-image: radial-gradient(#9aa1b2 1.2px, transparent 1.3px); background-size: 5px 5px; opacity: .8; flex: none; }
.awb-main { flex: 1 1 auto; min-width: 0; }
.awb-head { display: flex; flex-wrap: wrap; gap: .35rem; align-items: baseline; }
.awb-kind { font-size: .72rem; color: #6b7183; }
.awb-section > .awb-card .awb-title { font-size: 1.02rem; }
.awb-chars { font-size: .75rem; color: #7a8092; margin-left: auto; }
.awb-preview { display: flex; flex-direction: column; gap: .1rem; margin-top: .25rem; font-size: .87rem; color: #3b4152; }
.awb-field { overflow-wrap: anywhere; }
.awb-budget { color: #1f5a33; }
.awb-actions { display: flex; gap: .15rem; align-items: center; flex: none; }
.awb-btn { border: 1px solid transparent; background: none; border-radius: 6px; padding: .15rem .4rem; cursor: pointer; color: #3b4152; font-size: .85rem; text-decoration: none; }
.awb-btn:hover, .awb-btn:focus-visible { border-color: var(--line-strong); background: #f4f6fb; }
.awb-del { color: #8a2c2c; }
.awb.dragging > .awb-card { opacity: .45; }
.awb.moved > .awb-card { box-shadow: 0 0 0 2px #b9c7ef; transition: box-shadow .3s; }
.awb.drop-before > .awb-card { box-shadow: 0 -3px 0 #1f3a8a; }
.awb.drop-after > .awb-card { box-shadow: 0 3px 0 #1f3a8a; }
.awb.drop-inside > .awb-card { outline: 2px dashed #1f3a8a; outline-offset: 2px; }
@media (max-width: 640px) { .awb-card { flex-wrap: wrap; } .awb-actions { width: 100%; justify-content: flex-end; } }
.aw-add { margin: .4rem 0; }
.aw-add summary { cursor: pointer; font-weight: 600; }
.form-compact { display: flex; flex-direction: column; gap: .35rem; margin-top: .5rem; }
.charcount { display: block; font-size: .78rem; color: #7a8092; margin-top: .2rem; }
.aw-field-edited textarea { border-color: #e2c27a; }
.aw-original { margin-top: .35rem; font-size: .88rem; }
.aw-change { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .8rem; }
.row-warn td { background: #fffaf0; }

/* Vorschau des Dokuments */
.aw-doc { max-width: 46rem; }
.aw-doc .doc-title { font-size: 1.6rem; margin: .2rem 0 1rem; }
.aw-doc h2 { font-size: 1.3rem; margin: 1.6rem 0 .5rem; }
.aw-doc h3 { font-size: 1.1rem; margin: 1.2rem 0 .4rem; color: #24407a; }
.aw-doc h4, .aw-doc h5 { font-size: 1rem; margin: 1rem 0 .3rem; color: #24407a; }
.aw-doc .doc-fields { display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr; gap: .25rem 1rem; margin: .4rem 0 .8rem; }
.aw-doc .doc-fields dt { font-weight: 600; }
.aw-doc .doc-fields dd { margin: 0; }
.aw-doc .doc-fields dd p { margin: 0 0 .3rem; }
.aw-doc .doc-note { font-size: .82rem; color: #6b7183; font-style: italic; }
.aw-doc .doc-table { margin: .4rem 0 1rem; }
@media (max-width: 640px) { .aw-doc .doc-fields { grid-template-columns: 1fr; } }
.aw-gaps li { margin-bottom: .3rem; }

.aw-board-tools { margin: -.25rem 0 .5rem; }
.awb-children[hidden] { display: none; }
@media (max-width: 960px) { .aw-board-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .awb-children { margin-left: .4rem; padding-left: .4rem; }
  .awb-card { padding: .45rem; }
  .awb-main { flex-basis: calc(100% - 1.5rem); }
  .aw-board .panelhead .muted { display: none; }
}

/* ---------------------------------------------------------------- Reiter (Projektseite) */
.tabs {
  display: flex; gap: 2px; margin: 4px 0 22px; padding: 0 2px;
  flex-wrap: wrap; border-bottom: 2px solid var(--line-strong);
  position: sticky; top: 0; z-index: 5; background: var(--paper);
}
.tabs a {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 12px 18px 11px; margin-bottom: -2px;
  font-size: var(--step-1); font-weight: 650; color: var(--ink-2); text-decoration: none;
  border: 1px solid transparent; border-bottom: 3px solid transparent; border-radius: var(--radius-s) var(--radius-s) 0 0;
}
.tabs a:hover { color: var(--ink); background: var(--surface); }
.tabs a[aria-selected="true"] {
  color: var(--blue-deep); background: var(--surface);
  border-color: var(--line-strong) var(--line-strong) transparent; border-bottom: 3px solid var(--blue);
}
.tabs a:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.tabs .count {
  font-size: var(--step--1); font-weight: 600; line-height: 1; padding: 3px 7px; border-radius: 999px;
  background: var(--sunken); color: var(--ink-2);
}
.tabs a[aria-selected="true"] .count { background: var(--blue-tint); color: var(--blue-deep); }
.tabpanel[hidden] { display: none; }
.tabpanel > .panel:last-child, .tabpanel > .split:last-child { margin-bottom: 0; }
@media (max-width: 820px) { .tabs a { padding: 10px 12px 9px; font-size: var(--step-0); } }

/* Dezentes Aktionsmenü im Seitenkopf */
.morebox { position: relative; align-self: flex-start; }
.morebox > summary {
  list-style: none; cursor: pointer; font-size: var(--step-0); font-weight: 650; color: var(--blue-deep);
  padding: 8px 16px; border-radius: var(--radius-s); border: 1px solid var(--blue); background: var(--surface);
}
.morebox > summary::-webkit-details-marker { display: none; }
.morebox > summary::after { content: " ▾"; }
.morebox > summary:hover, .morebox[open] > summary { color: #fff; border-color: var(--blue); background: var(--blue); }
.morebox > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.moremenu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 220px;
  display: flex; flex-direction: column; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s);
  box-shadow: 0 8px 24px rgba(20, 27, 45, .12);
}
.moremenu a, .moremenu .linklike {
  display: block; width: 100%; text-align: left; padding: 7px 10px; border-radius: var(--radius-s);
  color: var(--ink); text-decoration: none; font-size: var(--step-0);
}
.moremenu a:hover, .moremenu .linklike:hover { background: var(--paper); }
.moremenu form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }
.moremenu .danger { color: var(--red); }

/* Schwebende Speicherleiste in Formularen: bleibt beim Scrollen unten sichtbar */
.formbar-float {
  position: sticky; bottom: 0; z-index: 10; margin: 18px -12px 0; padding: 12px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 -6px 20px rgba(20, 27, 45, .10);
}
.savebar-state { margin-left: auto; }
.savebar-state.is-dirty { color: var(--ink); font-weight: 600; }
.savebar-state.is-dirty::before { content: "● "; color: var(--marker, #e0b400); }

/* Projektprofil: Aktivitäten-Überblick und Meilensteine */
.activities { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.activities .subhead { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.activities p { max-width: 75ch; margin: 0; }
.milestones { list-style: none; margin: 0; padding: 0 0 0 4px; }
.milestones > li { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 0 0 16px 20px; border-left: 2px solid var(--line-strong); }
.milestones > li:last-child { padding-bottom: 0; }
.milestones > li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--blue); }
.milestones > li.is-past::before { background: var(--blue); }
.milestone-date { font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink-2); }
@media (max-width: 520px) { .milestones > li { grid-template-columns: 1fr; gap: 2px; } }

/* Sprungziele nicht unter der festen Reiterleiste verstecken */
.tabpanel [id] { scroll-margin-top: 130px; }
.activities-legacy { background: var(--paper); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 10px 12px; }
.measure-activities { margin-top: 6px; }
.measure-activities ul { margin: 2px 0 0; padding-left: 1.2em; list-style: disc; font-size: .875rem; }
.measure-activities li { margin: 1px 0; }

/* Formatierte Textfelder (einfaches HTML) */
.rich ul, .rich ol { margin: 4px 0; padding-left: 1.3em; }
.rich ul { list-style: disc; }
.rich ol { list-style: decimal; }
.rich li { margin: 2px 0; }
.rich p { margin: 0 0 .6em; }
.rich p:last-child { margin-bottom: 0; }
.rich a { text-decoration: underline; }
.richbar { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 4px; }
.richbar button { font: inherit; font-size: .8rem; line-height: 1; min-width: 28px; padding: 5px 7px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.richbar button:hover { background: var(--paper); color: var(--ink); }
.richbar .richbar-hint { margin-left: auto; font-size: .75rem; color: var(--muted, #6b7280); align-self: center; }

/* Fotos bei Zitaten und Testimonials */
.photo-current { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.photo-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); }
.photo-remove { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.photo-preview { display: block; margin-top: 8px; }
.quote-entry { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 16px; align-items: start; }
.quote-photo { width: 84px; height: 84px; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); }
.quote-photo-small { width: 44px; height: 44px; object-fit: cover; border-radius: 50%; float: left; margin: 0 10px 4px 0; }
@media (max-width: 520px) { .quote-photo { width: 56px; height: 56px; } }

/* Umschalter der Anzeigewährung (Seitenleiste) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.curswitch { padding: 0 10px 8px; font-size: var(--step--1); }
.curswitch-row { display: flex; gap: 4px; align-items: center; }
.curswitch-row .muted { margin-right: 2px; }
.curswitch-row button { font: inherit; padding: 2px 9px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.curswitch-row button:hover { border-color: var(--blue); color: var(--blue-deep); }
.curswitch-row button.is-on { background: var(--blue-tint); color: var(--blue-deep); border-color: var(--blue); font-weight: 650; }
.curswitch-rate-box { margin-top: 4px; }
.curswitch-rate-box > summary { cursor: pointer; color: var(--ink-3); }
.curswitch-rate-box[open] { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.curswitch-rate { display: flex; gap: 6px; align-items: center; white-space: nowrap; font-weight: 400; margin: 0; }
.curswitch-rate input { width: 4.8em; min-width: 0; padding: 3px 6px; }
.curswitch-rate-box p { margin: 0; }
.curswitch-rate-box .btn { justify-self: start; }

/* Kostenposition: berechneter Plan-Betrag */
input.is-computed { background: var(--paper); color: var(--ink); font-weight: 650; }

/* Prinzipien (Design angelehnt an bereishit.de/friendraising) */
.fr-page {
  --fr: #356d9f; --fr-soft: #a9bdd3;
  color: var(--fr); padding: 22px clamp(14px, 3vw, 34px) 30px; border-radius: var(--radius); border: 1px solid var(--line);
  background-color: #fff;
  background-image: linear-gradient(rgba(53, 109, 159, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(53, 109, 159, .07) 1px, transparent 1px);
  background-size: 22px 22px;
}
.fr-section + .fr-section { margin-top: 34px; }
.fr-bar {
  position: relative; margin: 0 0 18px; padding: 10px 20px 9px 46px; border-radius: 10px; background: var(--fr);
  color: #fff; font-size: 1.15rem; font-weight: 500; line-height: 1.35;
}
.fr-bar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 26px; border-radius: 10px 0 0 10px; background: var(--fr-soft); }
.fr-story { font-size: 1.05rem; line-height: 1.7; }
.fr-story::after { content: ""; display: block; clear: both; }
.fr-story p { margin: 0 0 .7em; max-width: 78ch; }
.fr-story-img { float: left; width: clamp(140px, 26%, 240px); height: auto; margin: -6px 22px 8px -8px; }
.fr-source { clear: both; text-align: right; text-transform: uppercase; letter-spacing: .03em; font-size: .8rem; max-width: none !important; opacity: .9; }
@media (max-width: 560px) { .fr-story-img { float: none; display: block; margin: 0 auto 10px; width: 160px; } }

.fr-slider { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.fr-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; gap: 0;
  scrollbar-width: none; padding: 14px 0 18px; outline-offset: 4px;
}
.fr-track::-webkit-scrollbar { display: none; }
.fr-card {
  flex: 0 0 100%; scroll-snap-align: center; display: flex; justify-content: center; padding: 0 6px; box-sizing: border-box;
}
.fr-card > .fr-num {
  align-self: flex-start; font-size: 3.4rem; line-height: 1; font-weight: 600; color: var(--fr-soft); margin: 6px 14px 0 0;
}
.fr-card-body {
  width: min(560px, 100%); background: #fff; border-left: 30px solid var(--fr); border-radius: 10px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, .25); padding: 16px 20px 18px;
}
.fr-card-body h3 { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 0 0 10px; font-size: 1.25rem; font-weight: 500; color: var(--fr); }
.fr-q { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--fr); color: #fff; font-weight: 700; font-size: 1rem; }
.fr-card-body p { margin: 0; line-height: 1.7; }
.fr-nav {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--fr); background: #fff; color: var(--fr);
  font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 3px;
}
.fr-nav:hover:not(:disabled) { background: var(--fr); color: #fff; }
.fr-nav:disabled { opacity: .35; cursor: default; }
.fr-dots { grid-column: 1 / -1; display: flex; justify-content: center; gap: 8px; }
.fr-dots a { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--fr); border: 1px solid var(--fr-soft); background: #fff; }
.fr-dots a[aria-current="true"] { background: var(--fr); border-color: var(--fr); color: #fff; }
@media (max-width: 560px) {
  .fr-slider { grid-template-columns: minmax(0, 1fr); }
  .fr-nav { display: none; }
  .fr-card > .fr-num { display: none; }
  .fr-card-body { border-left-width: 16px; }
}
@media (prefers-reduced-motion: reduce) { .fr-track { scroll-behavior: auto; } }

/* Notiz für die Übersicht (Förderkatalog, Fördergeber) */
.listnote {
  margin-top: 4px; font-size: var(--step--1); color: var(--ink); max-width: 62ch; line-height: 1.45;
}
.listnote ul, .listnote ol { margin: 2px 0; padding-left: 1.2em; }
.listnote ul { list-style: disc; }
.listnote ol { list-style: decimal; }
.listnote-big { margin-top: 8px; font-size: 1rem; max-width: 72ch; }

/* Förderprogramm: Organisationen, für die es in Frage kommt */
.orgchips { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.orgchips a { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--blue-tint); color: var(--blue-deep); text-decoration: none; font-weight: 600; font-size: var(--step--1); }
.orgchips a:hover { text-decoration: underline; }
.orgpick > summary { cursor: pointer; color: var(--blue); font-size: var(--step--1); font-weight: 600; }
.orgpick form { margin-top: 8px; }
.orgpick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 14px; margin-bottom: 10px; }
.orgpick-list label { display: flex; gap: 7px; align-items: baseline; font-weight: 400; margin: 0; }
.orgline { margin-top: 4px; }

/* Programm mehreren Projekten zuordnen */
.projpick { border: 0; padding: 0; margin: 0; }
.projpick legend { font-weight: 650; margin-bottom: 6px; }
.projpick-list { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.projpick-list label { display: flex; gap: 8px; align-items: baseline; font-weight: 400; margin: 0; }

/* ---------------------------------------------------------------- Organisationsdokumente */
.doclist { list-style: none; margin: 0 0 12px; padding: 0; }
.doc { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.doc:first-child { border-top: 0; padding-top: 0; }
.doc-icon { flex: none; width: 42px; padding: 9px 0; text-align: center; font-size: .7rem; font-weight: 700; letter-spacing: .04em; border-radius: 4px; background: var(--blue-tint); color: var(--blue-deep); }
.doc-expired .doc-icon { background: #f6e3e3; color: #7a2424; }
.doc-body { min-width: 0; flex: 1; }
.doc-meta, .doc-note { display: block; margin-top: 2px; }
.doc-actions { display: flex; gap: 14px; margin-top: 4px; }
.docform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 14px; }
.docupload { margin-top: 14px; }

/* ---------- Markierung (Stern) und Aufgaben ---------- */
.markform { display: inline; margin: 0; }
.star { background: none; border: 0; padding: 0 2px; cursor: pointer; font: inherit; font-size: 1.25rem; line-height: 1; color: var(--ink-3, #8a8a8a); }
.star:hover, .star:focus-visible { color: #b88a00; }
.star.is-on { color: #c99700; }
.star-text { font-size: var(--step--1); font-weight: 650; border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; background: var(--surface); color: var(--ink-2); }
.star-text span[aria-hidden] { font-size: 1.1rem; vertical-align: -1px; }
.star-text.is-on { border-color: #e3c25a; background: var(--marker-soft); color: var(--ink); }
.star-icon { color: #c99700; }
.titlerow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.titlerow h1 { margin: 0; }
.col-star { width: 2rem; text-align: center; padding-left: 6px !important; padding-right: 0 !important; }
.filter-check { align-self: end; }
.filter-check label { display: flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; padding-bottom: 8px; }
.badge-task { background: var(--marker-soft); color: var(--amber); text-decoration: none; margin-left: 4px; }
.badge-task:hover { text-decoration: underline; }

.tasklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.task { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task-check { margin: 0; flex: none; }
.checkbox { width: 20px; height: 20px; margin-top: 1px; border: 2px solid var(--ink-2); border-radius: 4px; background: var(--surface); cursor: pointer; padding: 0; position: relative; }
.checkbox:hover, .checkbox:focus-visible { border-color: var(--blue); }
.checkbox.is-on { background: var(--blue); border-color: var(--blue); }
.checkbox.is-on::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.task-body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.task-title { font-weight: 600; overflow-wrap: anywhere; }
.task.is-done .task-title { text-decoration: line-through; color: var(--ink-2); font-weight: 500; }
.task.is-late .task-meta { color: var(--red); }
.task-note { color: var(--ink-2); overflow-wrap: anywhere; }
.taskform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 14px; }
.taskform-grid .field-wide { grid-column: 1 / -1; }
.taskadd, .taskdone { margin-top: 12px; }
.small-head { font-size: var(--step--1); font-weight: 700; margin: 16px 0 6px; color: var(--ink-2); }
.small-head.is-late { color: var(--red); }
.tasklinks { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.marklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; font-size: var(--step--1); }
.segmented a { padding: 3px 12px; text-decoration: none; color: var(--ink-2); font-weight: 600; }
.segmented a + a { border-left: 1px solid var(--line); }
.segmented a[aria-current="page"] { background: var(--blue-tint); color: var(--blue-deep); }

