:root {
      /* Flaechen hell (Basis) */
      --bg:     #F6F6EE;   /* Creme, Grundflaeche */
      --surf:   #FFFFFF;   /* Formularfelder, Tabellenkopf */
      --fg:     #172521;   /* Haupttext; tiefste Flaeche (Footer) */
      --mut:    #4F625C;   /* Nebentext, Labels, Metadaten */
      --line:   #D3D3C6;   /* Trenner 1px, dekorativ */
      --line-2: #7C8C86;   /* Feldrahmen, Secondary-Buttons */

      /* Flaechen dunkel (gezielt) */
      --petrol:    #2E4942;
      --on-dark:   #F6F6EE;
      --mut-dark:  #B9C6C1;
      --line-dark: #4A6660;

      /* Marke. Kupfer unter 5 % der Flaeche, Regeln in BRAND.md */
      --acc:      #B87E58;  /* Flaechen, Linien, grosse Zahlen >= 24px */
      --acc-ink:  #172521;  /* Text auf Kupferflaeche, nie Weiss */
      --acc-text: #8C5A3A;  /* kleiner Kupfertext auf Creme/Weiss */
      --acc-dark: #DDAE8E;  /* Kupfertext auf Petrol */

      /* Nur im Signet, nie im Layout */
      --signet-teal:   #179184;
      --signet-orange: #E97825;

      /* Funktional. Nur mit Bedeutung und immer mit Text, nie dekorativ,
         nie als zweiter Markenakzent. */
      --neg:       #9E3B2C;  /* Fehler */
      --warn:      #7A5B00;  /* Frist, Hinweis */
      --ok:        #33693D;  /* erledigt, gesendet */
      --neg-dark:  #E8A595;  /* auf Petrol */
      --warn-dark: #E0C27A;
      --ok-dark:   #A8D0A0;

      /* Schrift. Ersatzschriften mit aehnlichen Massen: greifen im PDF-Export und Druck. */
      --display: 'Jost', 'Futura', 'Century Gothic', 'Avenir Next', sans-serif;
      --body:    'Jost', 'Futura', 'Century Gothic', 'Avenir Next', sans-serif;
      --mono:    'IBM Plex Mono', Consolas, ui-monospace, monospace;

      /* Raster */
      --pad-x:   48px;     /* Seitenrand Desktop, mobil 20px */
      --content: 1120px;   /* Inhaltsbreite */
      --section: 112px;    /* Sektionsabstand vertikal, mobil 64px */
      --gutter:  32px;
      --r:       2px;      /* Buttons, Felder */
      --r-card:  0px;      /* Flaechen, Kaesten, Bilder */
      --r-btn:   2px;
    }

    @media (max-width: 720px) {
      :root { --pad-x: 20px; --section: 64px; --gutter: 24px; }
    }

    * { box-sizing: border-box; }

    html { -webkit-text-size-adjust: 100%; }

    body {
      margin: 0;
      background: var(--bg);
      color: var(--fg);
      font-family: var(--body);
      font-size: 18px;
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
    }
    @media (max-width: 720px) { body { font-size: 17px; } }

    h1, h2, h3 {
      margin: 0;
      font-family: var(--display);
      font-weight: 500;
      letter-spacing: -0.01em;
      text-wrap: balance;
    }
    h1 { font-size: 56px; line-height: 1.1; }
    h2 { font-size: 36px; line-height: 1.2; }
    h3 { font-size: 22px; line-height: 1.3; }
    @media (max-width: 720px) {
      h1 { font-size: 36px; line-height: 1.15; }
      h2 { font-size: 28px; }
      h3 { font-size: 20px; }
    }

    p { margin: 0; text-wrap: pretty; max-width: 38em; }
    .lead { font-size: 21px; line-height: 1.55; }
    @media (max-width: 720px) { .lead { font-size: 18px; } }
    small, .small { font-size: 15px; line-height: 1.5; }

    /* Linkfarben immer setzen. Sonst rendern spaeter ergaenzte Links
       im Browser-Standardblau. */
    a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
    a:hover { text-decoration-color: var(--acc); }

    /* Sichtbarer Fokus. Ohne das ist die Seite per Tastatur unbenutzbar. */
    :focus-visible { outline: 3px solid var(--acc); outline-offset: 3px; }

    /* Label: das technische Kleinstelement der Marke */
    .lbl {
      font-family: var(--mono);
      font-size: 12px;
      font-weight: 500;
      line-height: 1.4;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--mut);
    }
    @media (max-width: 720px) { .lbl { font-size: 11px; } }

    /* Zahlen, Preise, Codes: gleiche Ziffernbreite, damit Spalten stehen */
    .val { font-family: var(--mono); font-variant-numeric: tabular-nums; }

    /* Aktenzeile: Signature-Element, ueber jeder Sektion */
    .akte { border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 24px; }
    .akte .lbl { color: var(--acc-text); }
    .dark .akte { border-top-color: var(--line-dark); }
    .dark .akte .lbl { color: var(--acc-dark); }

    /* Dunkle Flaeche */
    .dark { background: var(--petrol); color: var(--on-dark); }
    .dark .lbl { color: var(--mut-dark); }

    /* Buttons */
    .btn {
      display: inline-flex; align-items: center; justify-content: center;
      height: 48px; padding: 0 24px;
      font: 500 16px/1 var(--body);
      border-radius: var(--r-btn);
      text-decoration: none;
      border: 1px solid transparent;
    }
    .btn-primary { background: var(--acc); color: var(--acc-ink); }
    .btn-primary:hover { background: var(--acc-dark); }
    .btn-secondary { background: transparent; color: inherit; border-color: var(--line-2); }
    .btn-secondary:hover { border-color: currentColor; }

    /* Hinweiskasten und Feldfehler */
    .note { background: var(--surf); border-left: 3px solid var(--line-2); padding: 12px 16px; font-size: 16px; }
    .note.neg { border-left-color: var(--neg); }
    .note.warn { border-left-color: var(--warn); }
    .note.ok { border-left-color: var(--ok); }
    .field-error { color: var(--neg); font-size: 15px; margin-top: 6px; }
    [aria-invalid="true"] { border: 2px solid var(--neg) !important; }

    /* KI-Kennzeichnung im Layout (zusaetzlich zur eingebrannten Markierung) */
    .ai-note { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--mut); }

    /* Nur fuer Screenreader */
    .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

    img { max-width: 100%; height: auto; display: block; }
    table { border-collapse: collapse; width: 100%; }
    button { font: inherit; cursor: pointer; }
  
