/*
 * Theme "bauhoefe-st-anton": internal project area.
 * Loads after the platform theme.css: overrides its variables, then lays out the project pages.
 *
 * Idea: the duty board of the municipal depots. A slate field carries the project and the next date
 * like a board in the depot office; the orange of the municipal service vehicles marks what is running
 * and what to do. Neutral towards the four partners: no partner colour, no partner logo.
 * House rules: surfaces instead of lines, no shadows or gradients (a neutral scrim on photographs only),
 * square corners (var(--radius)), one face (Inter, self-hosted by the platform).
 */

:root {
  --color-primary: #1c2b32;          /* slate: header field, headings, buttons on light ground */
  --color-accent: #c24f0c;           /* municipal orange on light ground (white text 4.9:1) */
  --color-background: #eceeec;       /* cool stone */
  --color-surface: #ffffff;
  --color-text: #172126;
  --color-text-muted: #4c585e;
  --color-border: #d6dcd8;
  --color-on-primary: #eef2f0;
  --font-heading: "Inter", Arial, sans-serif;
  --font-body: "Inter", Arial, sans-serif;

  --bsa-field: #1c2b32;              /* the board */
  --bsa-field-2: #243841;            /* a step up on the board */
  --bsa-on-field-muted: #aebcbf;
  --bsa-orange-on-field: #f08236;    /* municipal orange on slate (5.2:1) */
  --bsa-sunk: #e1e6e3;
  --bsa-ok: #24704a;
  --bsa-wait: #4c585e;
  --bsa-width: 1240px;
  --bsa-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

body.bsa {
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-feature-settings: "cv11", "ss01";
}
.bsa ::selection { background: var(--bsa-orange-on-field); color: var(--bsa-field); }
.bsa h1, .bsa h2, .bsa h3 { font-family: var(--font-heading); font-weight: 650; letter-spacing: -0.02em; text-wrap: balance; margin: 0; color: var(--color-primary); }
.bsa h1 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; }
.bsa h2 { font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.025em; }
.bsa h3 { font-size: 1.0625rem; }
.bsa :focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.bsa a { color: var(--color-primary); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.bsa .skip-link { background: var(--color-surface); color: var(--color-primary); }

.bsa-wrap { max-width: var(--bsa-width); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); box-sizing: border-box; }

/* Header: wordmark and account on the board */
.bsa-top { background: var(--bsa-field); color: var(--color-on-primary); }
.bsa-top__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); padding-block: 18px 6px; }
.bsa-brand { display: grid; color: inherit; text-decoration: none; line-height: 1.15; }
.bsa-brand strong { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; }
.bsa-brand span { font-size: 0.9375rem; color: var(--bsa-on-field-muted); }
.bsa .bsa-brand { color: var(--color-on-primary); }
.bsa-user { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: 0.9375rem; }
.bsa-user form { margin: 0; }
.bsa-user__name { color: var(--bsa-on-field-muted); }
.bsa .bsa-user__link { color: var(--color-on-primary); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.bsa .bsa-user__link:hover { color: var(--bsa-orange-on-field); }

/* Area navigation: still on the board, the current area underlined in orange */
.bsa-nav { background: var(--bsa-field); }
.bsa-nav ul { display: flex; gap: var(--space-3); list-style: none; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.bsa-nav li { flex: none; }
.bsa .bsa-nav a { display: block; padding: 14px 0 12px; color: var(--bsa-on-field-muted); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; transition: color 160ms ease, border-color 160ms ease; }
.bsa .bsa-nav a:hover { color: var(--color-on-primary); }
.bsa .bsa-nav a[aria-current="page"] { color: var(--color-on-primary); border-bottom-color: var(--bsa-orange-on-field); }

.bsa-main { flex: 1; }
.bsa-page { padding-block: var(--space-5) 96px; display: grid; gap: var(--space-5); }
.bsa-hero + .bsa-page { padding-top: var(--space-4); }

/* Hero of the dashboard: the project and the next date on the board, beside the village */
.bsa-hero { position: relative; background: var(--bsa-field); color: var(--color-on-primary); }
.bsa-hero h1, .bsa-hero h2 { color: var(--color-on-primary); }
.bsa-hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: stretch; padding-block: clamp(40px, 5vw, 72px); }
.bsa-hero__text { display: grid; align-content: start; gap: var(--space-3); }
.bsa-hero h1 { font-size: clamp(2.75rem, 6.4vw, 5.75rem); line-height: 0.95; letter-spacing: -0.045em; max-width: 9ch; }
.bsa-hero__lead { margin: 0; max-width: 46ch; font-size: 1.25rem; line-height: 1.5; color: var(--color-on-primary); }
.bsa-hero__actions { margin: 0; }
/* Desktop: the village fills the right part of the board up to the window edge */
.bsa-hero__bild { margin: 0; position: absolute; top: 0; right: 0; bottom: 0; width: calc(41.6% - 8px); overflow: hidden; }
.bsa-hero__bild img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 45% 35%; }

/* "Als Nächstes": the next date set like a departure board */
.bsa-next { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3); align-items: center; margin-top: var(--space-2); padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3); background: var(--bsa-field-2); border-radius: var(--radius); max-width: 640px; }
.bsa-next > .bsa-next__meta:only-child { grid-column: 1 / -1; }
.bsa-next__als { color: var(--bsa-orange-on-field); font-weight: 600; }
.bsa-next__date { display: grid; justify-items: start; line-height: 0.9; font-variant-numeric: tabular-nums; }
.bsa-next__date b { font-size: clamp(3.5rem, 6.4vw, 5.75rem); font-weight: 700; letter-spacing: -0.04em; color: var(--color-on-primary); }
.bsa-next__date span { font-size: 1.0625rem; font-weight: 600; color: var(--bsa-on-field-muted); margin-top: 6px; }
.bsa-next__what { display: grid; gap: 6px; min-width: 0; }
.bsa .bsa-next__title { margin: 0; font-size: 1.75rem; font-weight: 650; color: var(--color-on-primary); line-height: 1.2; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.bsa-next__meta { margin: 0; color: var(--bsa-on-field-muted); font-size: 1.0625rem; }

/* Sub-project hero: the TP number large in orange, the name beside it */
.bsa-hero--tp .bsa-tphead { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-3) clamp(24px, 4vw, 64px); padding-block: var(--space-4) clamp(40px, 5vw, 64px); align-items: end; }
.bsa-tphead__state { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--space-2); color: var(--bsa-on-field-muted); }
.bsa-tphead__title { display: grid; gap: var(--space-1); }
.bsa-hero--tp .bsa-tp__nr { font-size: clamp(3.5rem, 6.4vw, 5.75rem); line-height: 0.85; font-weight: 700; letter-spacing: -0.05em; color: var(--bsa-on-field-muted); font-variant-numeric: tabular-nums; }
.bsa-hero--tp .bsa-tp--laufend .bsa-tp__nr { color: var(--bsa-orange-on-field); }
.bsa-hero--tp h1 { font-size: clamp(2rem, 4.4vw, 3.75rem); line-height: 1.02; letter-spacing: -0.035em; max-width: 16ch; }
.bsa-tphead__facts { display: grid; gap: var(--space-2); justify-items: start; }
.bsa-hero .bsa-crumb, .bsa-hero .bsa-crumb a { color: var(--bsa-on-field-muted); }
.bsa-hero .bsa-crumb a:hover { color: var(--color-on-primary); }

/* Page heads of the light pages (dates, documents, knowledge) */
/* On the board: dates, documents and knowledge open with their name at full size */
.bsa-hero--page .bsa-head { padding-block: clamp(40px, 5vw, 72px); }
.bsa-hero--page .bsa-head h1 { font-size: clamp(2.75rem, 6.4vw, 5.75rem); line-height: 0.95; letter-spacing: -0.045em; }
.bsa-hero .bsa-lead { color: var(--color-on-primary); }
.bsa-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--space-3); }
.bsa-head > div { display: grid; gap: var(--space-2); min-width: 0; }
.bsa-head h1 { font-size: clamp(2.25rem, 4.4vw, 3.75rem); line-height: 1; letter-spacing: -0.04em; }
.bsa-lead { color: var(--color-text); max-width: 56ch; margin: 0; font-size: 1.25rem; }
.bsa-crumb { margin: 0; font-size: 0.9375rem; color: var(--color-text-muted); }
.bsa .button { background: var(--color-accent); color: #fff; border-radius: var(--radius); font-weight: 650; padding: 13px 22px; transition: background-color 160ms ease, transform 160ms var(--bsa-ease); }
.bsa .button:hover { background: #a8440a; color: #fff; }
.bsa .button:active { transform: translateY(1px); }
.bsa-hero .button { background: var(--bsa-orange-on-field); color: var(--bsa-field); }
.bsa-hero .button:hover { background: #f59a5a; color: var(--bsa-field); }
/* Buttons for the Projektbüro: the main action filled, further forms outlined */
.bsa-actions { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.bsa .button--ruhig { background: transparent; color: var(--color-accent); box-shadow: inset 0 0 0 2px currentColor; }
.bsa .button--ruhig:hover { background: transparent; color: #a8440a; }
.bsa-hero .button--ruhig, .bsa-hero .button--ruhig:hover { background: transparent; color: var(--bsa-orange-on-field); }
.bsa .bsa-edit { justify-self: start; font-size: 0.875rem; font-weight: 600; color: inherit; opacity: 0.8; }
.bsa .bsa-edit:hover { opacity: 1; }

/* Surfaces */
.bsa-panel { background: var(--color-surface); border-radius: var(--radius); padding: var(--space-4); display: grid; gap: var(--space-3); align-content: start; min-width: 0; }
.bsa-panel--sunk { background: var(--bsa-sunk); }
.bsa-panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); }
.bsa-panel__head a { font-weight: 600; font-size: 0.9375rem; }
.bsa-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-3); align-items: start; }
.bsa-split--tp { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.bsa-stack { display: grid; gap: var(--space-3); min-width: 0; }
.bsa-empty { color: var(--color-text-muted); margin: 0; }
.bsa-meta { color: var(--color-text-muted); font-size: 0.9375rem; }

/* Notes from the Projektbüro (block "Hinweis" of the platform): side by side, sunk into the ground */
.bsa-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--space-3); align-items: stretch; }
.bsa .hinweis { display: grid; align-content: start; gap: var(--space-2); background: var(--bsa-sunk); border: 0; border-radius: var(--radius); padding: var(--space-4); margin: 0; }
.bsa .hinweis > strong { font-size: 1.25rem; font-weight: 650; color: var(--color-primary); line-height: 1.2; letter-spacing: -0.015em; }
.bsa .hinweis .rich-text > * { margin: 0; }
.bsa .hinweis .rich-text > * + * { margin-top: var(--space-1); }
.bsa .hinweis ul { padding-left: 1.1em; display: grid; gap: 8px; }
.bsa .hinweis li::marker { color: var(--color-accent); }
.bsa .hinweis a { color: inherit; }
.bsa .hinweis--wichtig { background: var(--color-accent); color: #fff; }
.bsa .hinweis--wichtig > strong { color: #fff; }
.bsa .hinweis--wichtig li::marker { color: #fff; }

/* Rows: documents and dates, separated by spacing and a sunk hover surface, not by lines */
.bsa-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bsa-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; padding: 12px 14px; margin-inline: -14px; border-radius: var(--radius); text-decoration: none; color: inherit; transition: background-color 160ms ease; }
a.bsa-row:hover { background: var(--bsa-sunk); }
a.bsa-row:hover strong { color: var(--color-accent); }
.bsa-row--static { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.bsa-row__main { display: grid; gap: 2px; min-width: 0; }
.bsa-row__main strong { font-weight: 600; overflow-wrap: anywhere; transition: color 160ms ease; }
.bsa-desc { font-size: 0.9375rem; }
.bsa-fmt { background: var(--color-primary); color: var(--color-on-primary); font-size: 0.9375rem; font-weight: 700; min-width: 48px; text-align: center; padding: 6px 6px; border-radius: var(--radius); }
.bsa-date { display: grid; justify-items: center; width: 60px; padding: 8px 0; background: var(--bsa-sunk); border-radius: var(--radius); line-height: 1; font-variant-numeric: tabular-nums; }
.bsa-panel--sunk .bsa-date { background: var(--color-surface); }
.bsa-date b { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; color: var(--color-primary); }
.bsa-date span { font-size: 0.9375rem; color: var(--color-text-muted); margin-top: 4px; }

/* Sub-projects: a list like the board's columns, the number leads, the status reads on the right */
.bsa-tps { display: grid; gap: var(--space-3); }

.bsa-phase { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: var(--space-3); align-items: start; }
.bsa .bsa-phase__name { font-size: 1.0625rem; font-weight: 600; color: var(--color-text-muted); padding-top: 18px; max-width: 22ch; }
.bsa-tplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bsa-tp { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: 18px var(--space-3); background: var(--color-surface); border-radius: var(--radius); color: inherit; text-decoration: none; transition: background-color 160ms ease; }
.bsa-tp:hover { background: #f6f7f6; }
.bsa-tp__nr { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--color-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bsa-tp--laufend .bsa-tp__nr { color: var(--color-accent); }
.bsa-tp__main { display: grid; gap: 4px; min-width: 0; }
.bsa-tp__main strong { font-size: 1.25rem; font-weight: 650; color: var(--color-primary); line-height: 1.25; transition: color 160ms ease; }
.bsa-tp:hover .bsa-tp__main strong { color: var(--color-accent); }
.bsa-tp__main span { color: var(--color-text); font-size: 1.0625rem; max-width: 62ch; }

/* Status: a square in the colour plus the word, so it reads without colour too */
.bsa-status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9375rem; font-weight: 600; white-space: nowrap; color: var(--bsa-wait); }
.bsa-status::before { content: ""; width: 10px; height: 10px; background: currentColor; }
.bsa-status--laufend { color: var(--color-accent); }
.bsa-status--abgeschlossen { color: var(--bsa-ok); }
.bsa-hero .bsa-status { color: var(--bsa-on-field-muted); font-size: 1.0625rem; }
.bsa-hero .bsa-status--laufend { color: var(--bsa-orange-on-field); }

/* Key/value list (Steckbrief) */
.bsa-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2) var(--space-4); margin: 0; }
.bsa-kv dt { color: var(--color-text-muted); }
.bsa-kv dd { margin: 0; }

/* Documents table */
.bsa-tools { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: calc(-1 * var(--space-3)); }
.bsa-search { flex: 1 1 260px; max-width: 380px; padding: 12px 14px; font: inherit; color: var(--color-text); background: var(--color-surface); border: 0; border-radius: var(--radius); }
.bsa-search::placeholder { color: var(--color-text-muted); }
.bsa-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.bsa-chips a { padding: 8px 12px; border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); text-decoration: none; font-size: 0.9375rem; font-weight: 600; transition: background-color 160ms ease; }
.bsa-chips a:hover { background: var(--bsa-sunk); }
.bsa-chips a[aria-current="true"] { background: var(--color-primary); color: var(--color-on-primary); }
.bsa-table { overflow-x: auto; background: var(--color-surface); border-radius: var(--radius); }
.bsa-table table { width: 100%; min-width: 680px; border-collapse: collapse; }
.bsa-table th, .bsa-table td { text-align: left; padding: 14px 20px; vertical-align: top; }
.bsa-table th { background: var(--color-primary); color: var(--color-on-primary); font-size: 0.9375rem; font-weight: 600; }
.bsa-table tbody tr:nth-child(even) td { background: #f4f6f4; }
.bsa-table td a { font-weight: 600; }
.bsa-table td:nth-child(4), .bsa-table td:nth-child(5) { white-space: nowrap; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.bsa-table .bsa-empty { padding: var(--space-3); }

/* Dates page */
.bsa-month { gap: var(--space-2); }

.bsa-past summary { cursor: pointer; font-weight: 600; color: var(--color-primary); }
.bsa-past[open] summary { margin-bottom: var(--space-2); }

/* Knowledge and FAQ (blocks of the platform) */
.bsa-body { display: grid; gap: 12px; }
.bsa-wissen { max-width: calc(70ch + 2 * var(--space-4)); }
.bsa-body > * { margin: 0 !important; max-width: 70ch; }
.bsa-body > :not(.faq, .hinweis) { padding-block: 0 !important; }
.bsa-body > * + :is(h2, h3, .heading-block) { margin-top: var(--space-4) !important; }
.bsa-body h2 { font-size: 1.75rem; }
.bsa .faq { background: var(--color-background); border: 0; border-radius: var(--radius); padding: 16px var(--space-3) !important; }
.bsa .faq summary { font-weight: 600; }

/* Sign-in and account pages of the platform (core/account_base.html): the Scheidsee above St. Anton on the left */
.bsa .account-page { margin-block: 0; min-height: clamp(520px, 74svh, 820px); }
.bsa .account-page__context {
  position: relative;
  isolation: isolate;
  background-color: var(--bsa-field);
  background-image: linear-gradient(rgb(16 26 31 / 0.35), rgb(16 26 31 / 0.78)), url("../img/scheidsee.b341c99de99b.jpg"); /* neutral scrim under text on a photo */ /* taste-skill-ignore */
  background-size: cover;
  background-position: 40% 50%;
}
.bsa .account-page__site { font-size: clamp(2.5rem, 5vw, 4.75rem); line-height: 0.95; letter-spacing: -0.045em; }
.bsa .account-page__note { color: var(--color-on-primary); }
.bsa .account-page > .account { background: var(--color-surface); }
.bsa .account-page .form-field input { background: var(--color-background); border: 0; border-radius: var(--radius); }
.bsa .account { max-width: 440px; margin: var(--space-5) auto; background: var(--color-surface); padding: var(--space-4); border-radius: var(--radius); }
.bsa .account-page .account { margin: clamp(var(--space-3), 3.5vw, var(--space-5)); }

/* Search in the header (suche.js): a field on the board; results replace the page while ?suche= is set */
.bsa-suche { display: flex; flex: 1 1 260px; max-width: 420px; gap: 4px; margin: 0; }
.bsa-suche[hidden] { display: none; }
.bsa .bsa-suche__feld { flex: 1; min-width: 0; padding: 10px 12px; font: inherit; font-size: 0.9375rem; color: var(--color-on-primary); background: var(--bsa-field-2); border: 0; border-radius: var(--radius); }
.bsa .bsa-suche__feld::placeholder { color: var(--bsa-on-field-muted); }
.bsa .bsa-suche__los { padding: 10px 14px; font: inherit; font-size: 0.9375rem; font-weight: 650; color: var(--bsa-field); background: var(--bsa-orange-on-field); border: 0; border-radius: var(--radius); cursor: pointer; transition: background-color 160ms ease; }
.bsa .bsa-suche__los:hover { background: #f59a5a; }
.bsa-suche-kopf { gap: var(--space-1); }
.bsa-suche-kopf h1 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); overflow-wrap: anywhere; }
.bsa-suche-kopf p { margin: 0; }
.bsa-suche-kopf a { justify-self: start; font-weight: 600; }
.bsa-suche__art { min-width: 96px; font-size: 0.875rem; font-weight: 650; color: var(--color-accent); }
.bsa mark { background: #fbd9bf; color: inherit; padding: 0 1px; }

/* Decisions and measures (includes/entscheidungen.html): date, then title and text; important ones marked */
.bsa-eintrag { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: var(--space-2); align-items: start; padding: 12px 0; }
.bsa-eintrag__datum { padding-top: 2px; font-variant-numeric: tabular-nums; }
.bsa-eintrag .rich-text > * { margin: 0; }
.bsa-eintrag .rich-text > * + * { margin-top: 6px; }
.bsa-eintrag .rich-text ul { padding-left: 1.1em; }
.bsa-eintrag strong a { color: inherit; text-decoration: none; }
.bsa-eintrag strong a:hover { color: var(--color-accent); text-decoration: underline; }
.bsa-eintrag__marke { display: inline-block; margin-left: 6px; padding: 1px 8px; font-size: 0.8125rem; font-weight: 650; color: #fff; background: var(--color-accent); border-radius: var(--radius); vertical-align: 2px; }
.bsa-eintrag--fertig strong { color: var(--color-text-muted); }
.bsa-eintraege:has(li) + .bsa-empty { display: none; }
.bsa-pflegehilfe { margin: 0; flex-basis: 100%; color: var(--bsa-on-field-muted); font-size: 0.9375rem; }

/* Feedback form (platform form page, themed in sites_content/form_page.html) */
.bsa-formular { max-width: 720px; }
.bsa-formular .form-field input:not([type="checkbox"]), .bsa-formular .form-field select, .bsa-formular .form-field textarea { background: var(--color-background); border: 0; border-radius: var(--radius); }
.bsa-formular .button { justify-self: start; }

/* Footer: the name returns, then who carries the project and where the pictures come from */
.bsa-foot { background: var(--bsa-field); color: var(--bsa-on-field-muted); padding-block: var(--space-5); font-size: 0.9375rem; }
.bsa-foot__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-3) var(--space-5); align-items: start; }
.bsa-foot__name { margin: 0; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--color-on-primary); }
.bsa-foot__text { display: grid; gap: 6px; }
.bsa-foot p { margin: 0; max-width: 62ch; }
.bsa-foot a { color: var(--bsa-on-field-muted); }
.bsa-foot a:hover { color: var(--color-on-primary); }
.bsa-foot__credits { margin-top: var(--space-1) !important; }
.bsa-foot__legal { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.bsa .bsa-foot__legal a { color: var(--color-on-primary); font-weight: 600; }

/* Entrance: the parts rise once, one after another; without a motion preference everything simply stands */
@media (prefers-reduced-motion: no-preference) {
  @keyframes bsa-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @keyframes bsa-settle { from { transform: scale(1.06); } to { transform: none; } }
  .bsa-hero__text > *, .bsa-tphead > *, .bsa-tphead__facts > *, .bsa-head > *, .bsa-notes > *, .bsa-split > *, .bsa-stack > *, .bsa-tps > *, .bsa-tplist > li, .bsa-rows > li, .bsa-kv > *, .bsa-page > .bsa-panel, .bsa-tools > *, .bsa-chips > a, .bsa-table tbody tr, .bsa-body > * {
    animation: bsa-rise 620ms var(--bsa-ease) both;
  }
  .bsa-hero__text > :nth-child(2), .bsa-tphead > :nth-child(2), .bsa-tphead__facts > :nth-child(2), .bsa-stack > :nth-child(2), .bsa-rows > li:nth-child(2), .bsa-notes > :nth-child(2), .bsa-split > :nth-child(2), .bsa-tplist > li:nth-child(2) { animation-delay: 70ms; }
  .bsa-hero__text > :nth-child(3), .bsa-tphead__facts > :nth-child(3), .bsa-rows > li:nth-child(3), .bsa-notes > :nth-child(3), .bsa-tplist > li:nth-child(3) { animation-delay: 140ms; }
  .bsa-hero__text > :nth-child(4), .bsa-tplist > li:nth-child(4), .bsa-rows > li:nth-child(4) { animation-delay: 210ms; }
  .bsa-tplist > li:nth-child(5), .bsa-rows > li:nth-child(n+5) { animation-delay: 280ms; }
  .bsa-table tbody tr:nth-child(2), .bsa-body > :nth-child(2), .bsa-chips > a:nth-child(2) { animation-delay: 60ms; }
  .bsa-table tbody tr:nth-child(3), .bsa-body > :nth-child(3), .bsa-chips > a:nth-child(3) { animation-delay: 120ms; }
  .bsa-table tbody tr:nth-child(n+4), .bsa-body > :nth-child(n+4), .bsa-chips > a:nth-child(n+4) { animation-delay: 180ms; }
  .bsa-hero__bild { overflow: hidden; }
  .bsa-hero__bild img { animation: bsa-settle 1600ms var(--bsa-ease) both; }
}

@media (max-width: 960px) {
  .bsa-hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .bsa-hero__text { padding-bottom: 0; }
  .bsa-hero__bild { position: static; width: auto; }
  .bsa-hero__bild img { aspect-ratio: 16 / 9; height: auto; }
  .bsa-hero__grid { padding-bottom: 0; }
  .bsa-hero--tp .bsa-tphead { grid-template-columns: minmax(0, 1fr); }
  .bsa-split, .bsa-split--tp { grid-template-columns: minmax(0, 1fr); }
  .bsa-phase { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .bsa .bsa-phase__name { padding-top: 0; max-width: none; }
  .bsa-foot__inner { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .bsa-suche { max-width: none; flex-basis: 100%; order: 3; }
  .bsa-nav ul { flex-wrap: wrap; row-gap: 0; }
  .bsa-eintrag { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .bsa-wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .bsa-top__inner { padding-top: 14px; }
  .bsa-nav ul { gap: var(--space-2); }
  .bsa .bsa-nav a { font-size: 0.9375rem; }
  .bsa-page { gap: var(--space-4); padding-block: var(--space-4) 64px; }
  .bsa-panel, .bsa .hinweis { padding: var(--space-3) var(--space-2); }
  .bsa-next { padding: var(--space-2); gap: var(--space-2); }
  .bsa .bsa-next__title { font-size: 1.25rem; }
  .bsa-kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .bsa-kv dd + dt { margin-top: var(--space-1); }
  /* Sub-projects: number and name on one line, the status below the goal */
  .bsa-tp { grid-template-columns: 3.5rem minmax(0, 1fr); gap: 6px var(--space-2); padding: 16px; align-items: start; }
  .bsa-tp__nr { font-size: 1.25rem; padding-top: 1px; }
  .bsa-tp .bsa-status { grid-column: 2; }
  /* Document rows: the title gets the full width, format and date move into the line below */
  a.bsa-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  a.bsa-row .bsa-fmt { display: none; }
}
/* Narrow phones: all four areas stay visible without sideways scrolling */
@media (max-width: 400px) {
  .bsa-nav ul { gap: 14px; }
  .bsa .bsa-nav a { font-size: 0.875rem; }
  .bsa-table table { min-width: 0; }
  .bsa-table thead { display: none; }
  .bsa-table tr[data-dok-zeile]:not([hidden]) { display: grid; gap: 4px; padding: 14px 16px; }
  .bsa-table tbody tr:nth-child(even) { background: #f4f6f4; }
  .bsa-table td, .bsa-table tbody tr:nth-child(even) td { display: block; padding: 0; background: none; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .bsa * { transition: none !important; animation: none !important; }
}
