/* ============================================================================
   VATER IN FORM – ERNÄHRUNGS-COCKPIT
   app.css – DESIGNSYSTEM

   Markenpalette:
     Primärorange   #FF7A29    Helles Orange  #FF9245
     Anthrazit      #2B2E34    Dunkel         #141518
     Warmes Weiß    #F7F5F1    Sand           #E9E2D7
     Weiß           #FFFFFF    Gedämpft       #9AA0A8

   Abgeleitete Zwischentöne sind als solche gekennzeichnet.
   Theme: html[data-theme] = "auto" | "hell" | "dunkel"
   ========================================================================== */

/* ==========================================================================
   1. TOKENS – HELL (Standard)
   ========================================================================== */
:root {
  --c-bg:            #F7F5F1;   /* Warmes Weiß */
  --c-bg-deep:       #EFEBE4;   /* abgeleitet: tiefere warme Fläche */
  --c-surface:       #FFFFFF;   /* Weiß */
  --c-surface-2:     #F4F1EB;   /* abgeleitet: Sand-Richtung, sehr hell */
  --c-surface-3:     #E9E2D7;   /* Sand */
  --c-border:        #E4DDD1;   /* abgeleitet */
  --c-border-strong: #CFC5B4;   /* abgeleitet */
  --c-text:          #2B2E34;   /* Anthrazit */
  --c-text-2:        #454A52;   /* abgeleitet: Fliesstext auf Hell */
  --c-text-muted:    #6C737C;   /* abgeleitet für Kontrast auf Hell */
  --c-text-faint:    #949AA2;   /* abgeleitet */
  --c-accent:        #FF7A29;   /* Primärorange */
  --c-accent-soft:   #FFF1E6;   /* abgeleitet: Orange-Tint-Fläche */
  --c-accent-line:   #FFD3B0;   /* abgeleitet */
  --c-on-accent:     #FFFFFF;
  --c-ink-inverse:   #141518;

  --c-ok:            #1F8F5F;   /* funktional, ausserhalb der Markenpalette */
  --c-warn:          #9A6A08;   /* funktional */
  --c-danger:        #C23A30;   /* funktional */
  --c-ok-soft:       #E8F4EE;
  --c-warn-soft:     #FBF2DF;
  --c-danger-soft:   #FBEAE8;

  --shadow-1: 0 1px 2px rgba(20,21,24,.05), 0 1px 1px rgba(20,21,24,.03);
  --shadow-2: 0 4px 16px rgba(20,21,24,.07), 0 1px 3px rgba(20,21,24,.04);
  --shadow-3: 0 18px 48px rgba(20,21,24,.16);

  --logo-src: url("../assets/vif-logo-on-light.png");
  color-scheme: light;
}

/* ==========================================================================
   2. TOKENS – DUNKEL
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --c-bg:            #141518;
    --c-bg-deep:       #0F1013;
    --c-surface:       #1B1D22;
    --c-surface-2:     #22252B;
    --c-surface-3:     #2B2E34;
    --c-border:        #2C3037;
    --c-border-strong: #3D424A;
    --c-text:          #F7F5F1;
    --c-text-2:        #C9CDD3;
    --c-text-muted:    #9AA0A8;
    --c-text-faint:    #767C85;
    --c-accent:        #FF7A29;
    --c-accent-soft:   #2A1D14;
    --c-accent-line:   #4A3020;
    --c-on-accent:     #141518;
    --c-ink-inverse:   #F7F5F1;

    --c-ok:            #46C68B;
    --c-warn:          #E0A72E;
    --c-danger:        #E2695F;
    --c-ok-soft:       #16241D;
    --c-warn-soft:     #2A2314;
    --c-danger-soft:   #2A1917;

    --shadow-1: 0 1px 2px rgba(0,0,0,.35);
    --shadow-2: 0 4px 18px rgba(0,0,0,.35);
    --shadow-3: 0 20px 52px rgba(0,0,0,.55);

    --logo-src: url("../assets/vif-logo-on-dark.png");
    color-scheme: dark;
  }
}
html[data-theme="dunkel"] {
  --c-bg:            #141518;
  --c-bg-deep:       #0F1013;
  --c-surface:       #1B1D22;
  --c-surface-2:     #22252B;
  --c-surface-3:     #2B2E34;
  --c-border:        #2C3037;
  --c-border-strong: #3D424A;
  --c-text:          #F7F5F1;
  --c-text-2:        #C9CDD3;
  --c-text-muted:    #9AA0A8;
  --c-text-faint:    #767C85;
  --c-accent:        #FF7A29;
  --c-accent-soft:   #2A1D14;
  --c-accent-line:   #4A3020;
  --c-on-accent:     #141518;
  --c-ink-inverse:   #F7F5F1;

  --c-ok:            #46C68B;
  --c-warn:          #E0A72E;
  --c-danger:        #E2695F;
  --c-ok-soft:       #16241D;
  --c-warn-soft:     #2A2314;
  --c-danger-soft:   #2A1917;

  --shadow-1: 0 1px 2px rgba(0,0,0,.35);
  --shadow-2: 0 4px 18px rgba(0,0,0,.35);
  --shadow-3: 0 20px 52px rgba(0,0,0,.55);

  --logo-src: url("../assets/vif-logo-on-dark.png");
  color-scheme: dark;
}

/* ==========================================================================
   3. MASSE
   ========================================================================== */
:root {
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 56px;

  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 26px; --r-full: 999px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --font-num: var(--font);

  --content-max: 760px;
  --sidebar-w: 264px;
  --bottomnav-h: 62px;
  --tap: 44px;
}

/* ==========================================================================
   4. BASIS
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

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

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; letter-spacing: -0.01em; }
p  { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

img { max-width: 100%; display: block; }

svg { display: block; }

/* Sichtbarer Tastaturfokus – nie entfernen */
:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: 6px;
}
:focus:not(:focus-visible) { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   5. APP-GERÜST
   ========================================================================== */
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.app-main {
  flex: 1;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--s5) var(--s4) calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px) + var(--s7));
}

/* --- Kopfzeile mobil ------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4);
  padding-top: calc(var(--s3) + env(safe-area-inset-top, 0px));
  background: var(--c-bg);
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.topbar__logo {
  background-image: var(--logo-src);
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
.topbar__title { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--c-text-muted); }
.topbar__spacer { flex: 1; }

/* --- Bottom-Navigation (Smartphone) --------------------------------------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--c-surface);
  background: color-mix(in srgb, var(--c-surface) 94%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-top: 1px solid var(--c-border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottomnav__item {
  appearance: none; border: 0; background: none; cursor: pointer;
  min-height: var(--bottomnav-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: var(--s2) 2px;
  color: var(--c-text-muted);
  font-size: .66rem; font-weight: 600; letter-spacing: .01em;
  position: relative;
  transition: color .15s ease;
}
.bottomnav__item .icon { width: 22px; height: 22px; }
.bottomnav__item[aria-current="page"] { color: var(--c-accent); }
.bottomnav__item[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--c-accent);
}
.bottomnav__item:hover { color: var(--c-text); }
.bottomnav__item[aria-current="page"]:hover { color: var(--c-accent); }

/* --- Seitenleiste (Desktop) ----------------------------------------------- */
.sidebar { display: none; }

/* ==========================================================================
   6. TYPOGRAFIE-BAUSTEINE
   ========================================================================== */
.eyebrow {
  font-size: .7rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--c-text-muted);
}
.eyebrow--accent { color: var(--c-accent); }

.lead { font-size: 1.02rem; color: var(--c-text-2); }
.muted { color: var(--c-text-muted); }
.small { font-size: .84rem; }
.tiny  { font-size: .76rem; }

.page-title { font-size: 1.6rem; margin-bottom: var(--s2); }
.page-intro { color: var(--c-text-muted); margin-bottom: var(--s6); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s3); margin: var(--s7) 0 var(--s3);
}
.section-head:first-child { margin-top: 0; }

/* ==========================================================================
   7. KARTEN
   ========================================================================== */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s5);
  box-shadow: var(--shadow-1);
}
.card + .card { margin-top: var(--s4); }
.card__head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.card__head .icon { width: 18px; height: 18px; color: var(--c-accent); flex: 0 0 18px; }
.card__title { font-size: 1.02rem; font-weight: 700; }

.card--quiet { background: var(--c-surface-2); box-shadow: none; }
.card--flat  { box-shadow: none; }

/* Fokus-Karte: der wichtigste Block der Übersicht */
.focus-card {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-accent-line);
  border-radius: var(--r-xl);
  padding: var(--s6) var(--s5);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.focus-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--c-accent);
}
.focus-card__label { margin-bottom: var(--s3); }
.focus-card__title { font-size: 1.28rem; line-height: 1.3; margin-bottom: var(--s3); }
.focus-card__list { display: flex; flex-direction: column; gap: var(--s2); }
.focus-card__list li {
  display: flex; align-items: flex-start; gap: var(--s3);
  color: var(--c-text-2); font-size: .96rem;
}
.focus-card__list .icon { width: 17px; height: 17px; color: var(--c-accent); margin-top: 3px; flex: 0 0 17px; }

/* Hinweis-Karte */
.notice {
  display: flex; gap: var(--s3); align-items: flex-start;
  padding: var(--s4); border-radius: var(--r-md);
  background: var(--c-surface-2); border: 1px solid var(--c-border);
  font-size: .9rem; color: var(--c-text-2);
}
.notice .icon { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; color: var(--c-text-muted); }
.notice--warn   { background: var(--c-warn-soft);   border-color: color-mix(in srgb, var(--c-warn) 30%, transparent); }
.notice--warn .icon { color: var(--c-warn); }
.notice--danger { background: var(--c-danger-soft); border-color: color-mix(in srgb, var(--c-danger) 30%, transparent); }
.notice--danger .icon { color: var(--c-danger); }
.notice--accent { background: var(--c-accent-soft); border-color: var(--c-accent-line); }
.notice--accent .icon { color: var(--c-accent); }
.notice__title { font-weight: 700; color: var(--c-text); display: block; margin-bottom: 2px; }

/* ==========================================================================
   8. ZIELWERTE / STATS
   ========================================================================== */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
@media (max-width: 359px) { .stat-grid { grid-template-columns: 1fr; } }

.stat {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s4) var(--s4) var(--s5);
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: var(--s1);
}
.stat__label { display: flex; align-items: center; gap: 6px; }
.stat__label .icon { width: 15px; height: 15px; color: var(--c-accent); }
.stat__value {
  font-size: 1.42rem; font-weight: 750; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: 2px;
}
.stat__unit { font-size: .82rem; font-weight: 600; color: var(--c-text-muted); }
.stat__hint { font-size: .76rem; color: var(--c-text-muted); }
.stat--locked .stat__value { font-size: 1rem; font-weight: 600; color: var(--c-text-muted); letter-spacing: 0; }

/* Grosse Ergebnis-Anzeige im Onboarding */
.result-value {
  font-size: 2.35rem; font-weight: 780; letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums; line-height: 1.05;
}
.result-unit { font-size: 1.05rem; font-weight: 650; color: var(--c-text-muted); margin-left: 4px; }

/* ==========================================================================
   9. BUTTONS
   ========================================================================== */
.btn {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--tap); padding: 0 var(--s5);
  border-radius: var(--r-full); border: 1px solid transparent;
  font-size: .95rem; font-weight: 650; letter-spacing: -0.01em;
  background: var(--c-surface-2); color: var(--c-text);
  border-color: var(--c-border);
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
  text-align: center;
}
.btn:hover { background: var(--c-surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:active { transform: none; }

.btn--primary {
  background: var(--c-accent); color: var(--c-on-accent); border-color: var(--c-accent);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--c-accent) 26%, transparent);
}
.btn--primary:hover { background: #FF9245; border-color: #FF9245; }

.btn--ghost { background: transparent; border-color: var(--c-border-strong); }
.btn--ghost:hover { background: var(--c-surface-2); }

.btn--quiet { background: transparent; border-color: transparent; color: var(--c-text-muted); padding: 0 var(--s3); }
.btn--quiet:hover { background: var(--c-surface-2); color: var(--c-text); }

.btn--danger { background: transparent; color: var(--c-danger); border-color: color-mix(in srgb, var(--c-danger) 40%, transparent); }
.btn--danger:hover { background: var(--c-danger-soft); }

.btn--block { display: flex; width: 100%; }
.btn--lg { min-height: 52px; font-size: 1rem; padding: 0 var(--s6); }

.btn-row { display: flex; gap: var(--s3); flex-wrap: wrap; }
.btn-row--split { justify-content: space-between; }

/* ==========================================================================
   10. FORMULARE
   ========================================================================== */
.field { margin-bottom: var(--s5); }
.field__label {
  display: block; font-size: .9rem; font-weight: 650;
  margin-bottom: var(--s2); color: var(--c-text);
}
.field__help { font-size: .8rem; color: var(--c-text-muted); margin-top: var(--s2); }
.field__error {
  display: flex; gap: 6px; align-items: flex-start;
  font-size: .82rem; color: var(--c-danger); margin-top: var(--s2); font-weight: 600;
}
.field__error .icon { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input {
  width: 100%; min-height: 54px;
  padding: 0 var(--s4);
  font-size: 1.05rem; /* >= 16px verhindert Auto-Zoom auf iOS */
  font-weight: 600; font-variant-numeric: tabular-nums;
  background: var(--c-surface); color: var(--c-text);
  border: 1.5px solid var(--c-border-strong); border-radius: var(--r-md);
  transition: border-color .15s ease, background .15s ease;
}
.input::placeholder { color: var(--c-text-faint); font-weight: 500; }
.input:focus { border-color: var(--c-accent); }
.input:disabled { background: var(--c-surface-2); color: var(--c-text-muted); }
.input--has-unit { padding-right: 66px; }
.input--invalid { border-color: var(--c-danger); }
.input-unit {
  position: absolute; right: var(--s4);
  font-size: .88rem; font-weight: 650; color: var(--c-text-muted);
  pointer-events: none;
}
textarea.input { min-height: 54px; padding-top: var(--s3); padding-bottom: var(--s3); resize: vertical; line-height: 1.5; font-weight: 500; font-size: 1rem; }

/* Auswahlkarten (Radio) */
.choice-list { display: flex; flex-direction: column; gap: var(--s2); }
.choice {
  display: flex; align-items: flex-start; gap: var(--s3);
  padding: var(--s4); cursor: pointer;
  background: var(--c-surface); border: 1.5px solid var(--c-border); border-radius: var(--r-md);
  transition: border-color .15s ease, background .15s ease;
  min-height: var(--tap);
}
.choice:hover { border-color: var(--c-border-strong); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__mark {
  flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  border: 2px solid var(--c-border-strong); position: relative; transition: border-color .15s ease;
}
.choice__body { flex: 1; min-width: 0; }
.choice__title { display: block; font-weight: 650; font-size: .96rem; line-height: 1.35; }
.choice__desc { display: block; font-size: .82rem; color: var(--c-text-muted); margin-top: 2px; line-height: 1.45; }
.choice input:checked + .choice__mark { border-color: var(--c-accent); }
.choice input:checked + .choice__mark::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--c-accent);
}
.choice:has(input:checked) { border-color: var(--c-accent); background: var(--c-accent-soft); }
.choice input:focus-visible + .choice__mark { outline: 3px solid var(--c-accent); outline-offset: 2px; }

/* Ja/Nein-Umschalter */
.toggle-row {
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s4) 0; border-bottom: 1px solid var(--c-border);
}
.toggle-row:last-child { border-bottom: 0; }
.toggle-row__text { flex: 1; font-size: .94rem; line-height: 1.45; }
.segmented {
  display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 3px;
  background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: var(--r-full);
}
.segmented button {
  appearance: none; border: 0; cursor: pointer; background: transparent;
  min-height: 38px; min-width: 54px; padding: 0 var(--s3);
  border-radius: var(--r-full); font-size: .86rem; font-weight: 650; color: var(--c-text-muted);
  transition: background .15s ease, color .15s ease;
}
.segmented button[aria-pressed="true"] { background: var(--c-accent); color: var(--c-on-accent); }

/* Ampel-Auswahl (Phase 2) */
.ampel { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.ampel button {
  appearance: none; cursor: pointer; min-height: 52px;
  border: 1.5px solid var(--c-border); border-radius: var(--r-md);
  background: var(--c-surface); color: var(--c-text);
  font-size: .9rem; font-weight: 650;
  transition: border-color .15s ease, background .15s ease;
}
.ampel button:hover { border-color: var(--c-border-strong); }
.ampel button[aria-pressed="true"] { border-color: var(--c-accent); background: var(--c-accent-soft); color: var(--c-text); }

/* ==========================================================================
   11. STEPPER (Onboarding)
   ========================================================================== */
.onboarding { max-width: 560px; margin: 0 auto; padding: var(--s5) var(--s4) var(--s9); }
.onboarding__head { margin-bottom: var(--s6); }
.onboarding__logo {
  margin: 0 auto var(--s6);
  background-image: var(--logo-src); background-size: contain;
  background-repeat: no-repeat; background-position: center;
}
.stepper { margin-bottom: var(--s6); }
.stepper__meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: var(--s2);
}
.stepper__bar { height: 4px; border-radius: var(--r-full); background: var(--c-surface-3); overflow: hidden; }
.stepper__fill { height: 100%; background: var(--c-accent); border-radius: var(--r-full); transition: width .3s ease; }

.step-title { font-size: 1.45rem; margin-bottom: var(--s2); }
.step-intro { color: var(--c-text-muted); margin-bottom: var(--s6); }
.onboarding__actions { display: flex; gap: var(--s3); margin-top: var(--s6); }
.onboarding__actions .btn--primary { flex: 1; }

/* Ergebnis-Screen */
.result-hero { text-align: center; margin-bottom: var(--s7); }
.result-block {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: var(--s6) var(--s5);
  box-shadow: var(--shadow-1); margin-bottom: var(--s4);
  text-align: center;
}
.result-block .eyebrow { margin-bottom: var(--s2); }
.result-block__hint { font-size: .84rem; color: var(--c-text-muted); margin-top: var(--s2); }

/* ==========================================================================
   12. TREND / DIAGRAMME
   ========================================================================== */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-wrap { margin: var(--s4) calc(var(--s5) * -1) 0; padding: 0 var(--s5); }

.chart-line   { fill: none; stroke: var(--c-accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot    { fill: var(--c-text-faint); opacity: .55; }
.chart-grid   { stroke: var(--c-border); stroke-width: 1; }
.chart-axis   { fill: var(--c-text-faint); font-size: 10px; font-weight: 600; }
.chart-area   { fill: var(--c-accent); opacity: .07; }

.sparkline { width: 100%; height: 56px; }

.trend-headline {
  font-size: 1.12rem; font-weight: 700; line-height: 1.35; margin-bottom: var(--s2);
}
.trend-figure {
  display: flex; align-items: baseline; gap: var(--s2); margin: var(--s3) 0 var(--s1);
}
.trend-figure__value {
  font-size: 1.6rem; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.trend-basis { font-size: .78rem; color: var(--c-text-muted); }

.datenbasis {
  display: flex; align-items: center; gap: var(--s3);
  margin-top: var(--s3);
}
.datenbasis__bar { flex: 1; height: 6px; border-radius: var(--r-full); background: var(--c-surface-3); overflow: hidden; }
.datenbasis__fill { height: 100%; background: var(--c-accent); border-radius: var(--r-full); }
.datenbasis__text { font-size: .78rem; font-weight: 650; color: var(--c-text-muted); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   13. LISTEN / TABELLEN
   ========================================================================== */
.kv-list { display: flex; flex-direction: column; }
.kv {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: var(--s3) 0; border-bottom: 1px solid var(--c-border);
}
.kv:last-child { border-bottom: 0; }
.kv__label { color: var(--c-text-muted); font-size: .9rem; }
.kv__value { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 calc(var(--s5) * -1); padding: 0 var(--s5); }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th, table.data td { padding: var(--s3) var(--s2); text-align: right; white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-text-muted); border-bottom: 1px solid var(--c-border); }
table.data tbody tr { border-bottom: 1px solid var(--c-border); }
table.data tbody tr:last-child { border-bottom: 0; }
table.data td { font-variant-numeric: tabular-nums; }

/* Menügruppen (Mehr) */
.menu-group { margin-bottom: var(--s6); }
.menu-group__title { margin-bottom: var(--s3); }
.menu-list {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1);
}
.menu-item {
  display: flex; align-items: center; gap: var(--s3); width: 100%;
  min-height: 54px; padding: var(--s3) var(--s4);
  background: none; border: 0; border-bottom: 1px solid var(--c-border);
  cursor: pointer; text-align: left; font-size: .95rem; font-weight: 550;
  color: var(--c-text); transition: background .12s ease;
}
.menu-item:last-child { border-bottom: 0; }
.menu-item:hover { background: var(--c-surface-2); text-decoration: none; }
.menu-item .icon { width: 19px; height: 19px; color: var(--c-text-muted); flex: 0 0 19px; }
.menu-item__label { flex: 1; }
.menu-item__chev { width: 16px; height: 16px; color: var(--c-text-faint); flex: 0 0 16px; }
.menu-item--danger { color: var(--c-danger); }
.menu-item--danger .icon { color: var(--c-danger); }

/* ==========================================================================
   14. CHIPS, BADGES, PILLS
   ========================================================================== */
.chip-row {
  display: flex; gap: var(--s2); overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: var(--s1) var(--s4); margin: 0 calc(var(--s4) * -1) var(--s4);
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  appearance: none; cursor: pointer; white-space: nowrap; flex: 0 0 auto;
  min-height: 38px; padding: 0 var(--s4);
  border-radius: var(--r-full); border: 1px solid var(--c-border);
  background: var(--c-surface); color: var(--c-text-2);
  font-size: .85rem; font-weight: 650;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--c-border-strong); }
.chip[aria-pressed="true"] { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--r-full);
  font-size: .74rem; font-weight: 700; letter-spacing: .01em;
  background: var(--c-surface-3); color: var(--c-text-2);
  font-variant-numeric: tabular-nums;
}
.badge--accent { background: var(--c-accent-soft); color: var(--c-accent); }
.badge--ok     { background: var(--c-ok-soft); color: var(--c-ok); }
.badge--warn   { background: var(--c-warn-soft); color: var(--c-warn); }

.pill-day {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 5px var(--s3); border-radius: var(--r-full);
  background: var(--c-accent-soft); color: var(--c-accent);
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}

/* ==========================================================================
   15. TAUSCH-KARTEN
   ========================================================================== */
.swap {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: var(--s4) var(--s5) var(--s4);
  box-shadow: var(--shadow-1); margin-bottom: var(--s3);
}
.swap__head { display: flex; align-items: flex-start; gap: var(--s3); margin-bottom: var(--s4); }
.swap__title { flex: 1; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.swap__fav {
  appearance: none; border: 1px solid var(--c-border); background: var(--c-surface-2);
  cursor: pointer; width: var(--tap); height: var(--tap); flex: 0 0 var(--tap);
  border-radius: var(--r-md); display: flex; align-items: center; justify-content: center;
  color: var(--c-text-muted); transition: all .15s ease;
}
.swap__fav .icon { width: 20px; height: 20px; }
.swap__fav[aria-pressed="true"] { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }
.swap__fav:hover { border-color: var(--c-border-strong); }

.swap__flow { display: flex; flex-direction: column; gap: var(--s2); }
.swap__side { padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--c-surface-2); }
.swap__side--after { background: var(--c-accent-soft); border: 1px solid var(--c-accent-line); }
.swap__side-label { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c-text-muted); margin-bottom: 3px; }
.swap__side--after .swap__side-label { color: var(--c-accent); }
.swap__side-text { font-size: .92rem; line-height: 1.4; }
.swap__kcal { margin-top: var(--s2); }
.swap__arrow { display: flex; justify-content: center; color: var(--c-text-faint); }
.swap__arrow .icon { width: 18px; height: 18px; }
.swap__note { font-size: .82rem; color: var(--c-text-muted); margin-top: var(--s3); line-height: 1.45; }
.swap__bonus { font-size: .84rem; color: var(--c-ok); font-weight: 600; margin-top: var(--s2); }
.swap__actions { display: flex; justify-content: flex-end; margin-top: var(--s3); }

.swap-footnote {
  font-size: .76rem; color: var(--c-text-muted); line-height: 1.5;
  padding: var(--s4); background: var(--c-surface-2); border-radius: var(--r-md);
  margin-top: var(--s5);
}

/* ==========================================================================
   16. WOCHEN-CHECK
   ========================================================================== */
.wc-banner {
  position: relative; overflow: hidden;
  background: var(--c-surface-3);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-xl); padding: var(--s6) var(--s5);
  margin-bottom: var(--s4);
}
html[data-theme="dunkel"] .wc-banner,
.wc-banner { }
.wc-banner__title { font-size: 1.2rem; margin-bottom: var(--s2); }
.wc-banner__text { color: var(--c-text-2); font-size: .93rem; margin-bottom: var(--s4); }

.prio {
  border-radius: var(--r-lg); padding: var(--s5);
  border: 1px solid var(--c-border); background: var(--c-surface);
  margin-bottom: var(--s3);
}
.prio--main {
  background: var(--c-accent-soft); border-color: var(--c-accent-line); padding: var(--s6) var(--s5);
}
.prio__label { margin-bottom: var(--s2); }
.prio__title { font-size: 1.05rem; margin-bottom: var(--s2); }
.prio--main .prio__title { font-size: 1.42rem; letter-spacing: -.025em; }
.prio__text { color: var(--c-text-2); font-size: .94rem; line-height: 1.55; }

/* Reality-Check-Streifen */
.rc-strip {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4); border-radius: var(--r-md);
  background: var(--c-warn-soft); border: 1px solid color-mix(in srgb, var(--c-warn) 30%, transparent);
  margin-bottom: var(--s4);
}
.rc-strip .icon { width: 18px; height: 18px; color: var(--c-warn); flex: 0 0 18px; }
.rc-strip__text { flex: 1; font-size: .88rem; font-weight: 600; }
.rc-strip__count { font-size: .8rem; font-weight: 700; color: var(--c-warn); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   17. LERN-IMPULS
   ========================================================================== */
.impulse {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-accent);
  border-radius: var(--r-md); padding: var(--s5);
  box-shadow: var(--shadow-1);
}
.impulse__label { margin-bottom: var(--s2); }
.impulse__title { font-size: 1.06rem; line-height: 1.35; margin-bottom: var(--s3); }
.impulse__text { color: var(--c-text-2); font-size: .93rem; line-height: 1.6; white-space: pre-line; }
.impulse__task {
  margin-top: var(--s4); padding: var(--s3) var(--s4);
  background: var(--c-surface-2); border-radius: var(--r-sm);
  font-size: .89rem; display: flex; gap: var(--s3); align-items: flex-start;
}
.impulse__task .icon { width: 17px; height: 17px; color: var(--c-accent); flex: 0 0 17px; margin-top: 2px; }

/* Aufklappbar */
.disclosure { border-top: 1px solid var(--c-border); }
.disclosure__btn {
  appearance: none; background: none; border: 0; cursor: pointer; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  min-height: var(--tap); padding: var(--s3) 0;
  font-size: .9rem; font-weight: 650; color: var(--c-text-2); text-align: left;
}
.disclosure__btn .icon { width: 16px; height: 16px; color: var(--c-text-faint); transition: transform .2s ease; }
.disclosure__btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
.disclosure__body { padding-bottom: var(--s4); font-size: .89rem; color: var(--c-text-muted); line-height: 1.6; }

/* ==========================================================================
   18. MODAL & TOAST
   ========================================================================== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20,21,24,.55);
  display: flex; align-items: flex-end; justify-content: center;
  padding: var(--s4);
  animation: fadeIn .16s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-3);
  width: 100%; max-width: 460px; padding: var(--s6) var(--s5) var(--s5);
  max-height: 88vh; overflow-y: auto;
  margin-bottom: env(safe-area-inset-bottom, 0px);
}
.modal__title { font-size: 1.15rem; margin-bottom: var(--s3); }
.modal__text { color: var(--c-text-2); font-size: .94rem; line-height: 1.55; margin-bottom: var(--s5); }
.modal__actions { display: flex; gap: var(--s3); }
.modal__actions .btn { flex: 1; }

.toast-area {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px) + var(--s4));
  z-index: 90; width: calc(100% - var(--s6)); max-width: 420px;
  display: flex; flex-direction: column; gap: var(--s2); pointer-events: none;
}
.toast {
  background: var(--c-text); color: var(--c-bg);
  border-radius: var(--r-md); padding: var(--s3) var(--s4);
  font-size: .88rem; font-weight: 600; box-shadow: var(--shadow-3);
  display: flex; align-items: flex-start; gap: var(--s2);
  animation: toastIn .2s ease;
}
.toast .icon { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 2px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   19. LEERZUSTÄNDE
   ========================================================================== */
.empty {
  text-align: center; padding: var(--s7) var(--s4);
  color: var(--c-text-muted);
}
.empty .icon { width: 34px; height: 34px; margin: 0 auto var(--s4); color: var(--c-text-faint); }
.empty__title { font-weight: 700; color: var(--c-text); margin-bottom: var(--s2); font-size: 1rem; }
.empty__text { font-size: .89rem; line-height: 1.55; max-width: 34ch; margin: 0 auto; }

/* ==========================================================================
   20. DESKTOP
   ========================================================================== */
@media (min-width: 1024px) {
  .app { flex-direction: row; }

  .topbar { display: none; }
  .bottomnav { display: none; }

  .sidebar {
    display: flex; flex-direction: column;
    position: sticky; top: 0; align-self: flex-start;
    width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
    height: 100vh; height: 100dvh;
    padding: var(--s6) var(--s4);
    background: var(--c-surface);
    border-right: 1px solid var(--c-border);
  }
  .sidebar__brand { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s2) var(--s6); }
  .sidebar__logo {
    background-image: var(--logo-src); background-size: contain;
    background-repeat: no-repeat; background-position: center;
  }
  .sidebar__name { font-size: .82rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
  .sidebar__sub { font-size: .7rem; color: var(--c-text-muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

  .sidebar__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .sidebar__item {
    appearance: none; border: 0; background: none; cursor: pointer;
    display: flex; align-items: center; gap: var(--s3);
    min-height: 46px; padding: 0 var(--s3); border-radius: var(--r-md);
    font-size: .93rem; font-weight: 600; color: var(--c-text-2); text-align: left;
    transition: background .12s ease, color .12s ease;
  }
  .sidebar__item .icon { width: 19px; height: 19px; flex: 0 0 19px; }
  .sidebar__item:hover { background: var(--c-surface-2); color: var(--c-text); }
  .sidebar__item[aria-current="page"] { background: var(--c-accent-soft); color: var(--c-accent); }
  .sidebar__badge {
    margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent);
  }
  .sidebar__foot { font-size: .72rem; color: var(--c-text-faint); padding: var(--s4) var(--s3) 0; border-top: 1px solid var(--c-border); }

  .app-main {
    padding: var(--s8) var(--s7) var(--s9);
    max-width: calc(var(--content-max) + var(--s7) * 2);
  }

  .stat-grid { gap: var(--s4); }
  h1 { font-size: 2rem; }
  .page-title { font-size: 1.85rem; }

  .modal-backdrop { align-items: center; }
  .toast-area { bottom: var(--s6); }

  .swap__flow { flex-direction: row; align-items: stretch; }
  .swap__side { flex: 1; }
  .swap__arrow { align-items: center; padding: 0 var(--s1); }
  .swap__arrow .icon { transform: rotate(-90deg); }
}

@media (min-width: 1440px) {
  .app-main { padding-left: var(--s8); padding-right: var(--s8); }
}

/* Zwischenbreiten: zweispaltige Bereiche */
@media (min-width: 640px) {
  .stat-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .onboarding { padding-top: var(--s8); }
}

/* ==========================================================================
   21. LOGO-HIERARCHIE (v0.5)
   Eine Stelle für alle Logo-Größen. Immer transparent, nie auf einer
   fremden Kachel, immer die zum Theme passende Variante.
   ========================================================================== */
.logo {
  background-image: var(--logo-src);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex: 0 0 auto;
}
/* Willkommensscreen – der erste Eindruck darf gross sein */
.logo--xl { width: 96px; height: 96px; }
/* Onboarding Schritt 2–6 */
.logo--lg { width: 72px; height: 72px; }
/* Ergebnis / Startpunkt */
.logo--md { width: 84px; height: 84px; }
/* Kopfzeile und Seitenleiste im laufenden Betrieb */
.logo--sm { width: 40px; height: 40px; }

@media (min-width: 768px) {
  .logo--xl { width: 128px; height: 128px; }
  .logo--lg { width: 84px; height: 84px; }
  .logo--md { width: 96px; height: 96px; }
}
@media (min-width: 1024px) {
  /* Nur die Desktop-Sidebar zeigt .logo--sm ab hier - die mobile Topbar
     ist bei dieser Breite bereits ausgeblendet (siehe Abschnitt 20). */
  .logo--sm { width: 68px; height: 68px; }
}

/* ==========================================================================
   22. ZIELMODI – Auswahlkarten und Badge
   ========================================================================== */
.goal-list { display: flex; flex-direction: column; gap: var(--s3); }
.goal-list--compact { gap: var(--s2); margin-bottom: var(--s2); }

.goal-card { display: block; cursor: pointer; }
.goal-card input { position: absolute; opacity: 0; pointer-events: none; }
.goal-card__inner {
  display: flex; align-items: flex-start; gap: var(--s4);
  padding: var(--s5); min-height: var(--tap);
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  transition: border-color .15s ease, background .15s ease;
}
.goal-card:hover .goal-card__inner { border-color: var(--c-border-strong); }
.goal-card__icon {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: var(--r-md);
  background: var(--c-surface-2); color: var(--c-text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.goal-card__icon .icon { width: 21px; height: 21px; }
.goal-card__body { flex: 1; min-width: 0; }
.goal-card__title { display: block; font-weight: 700; font-size: 1rem; line-height: 1.3; }
.goal-card__desc {
  display: block; font-size: .86rem; color: var(--c-text-muted);
  margin-top: 3px; line-height: 1.45;
}
.goal-card__mark {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--c-border-strong); color: transparent;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
  transition: all .15s ease;
}
.goal-card__mark .icon { width: 14px; height: 14px; }
.goal-card input:checked ~ .goal-card__inner {
  border-color: var(--c-accent); background: var(--c-accent-soft);
}
.goal-card input:checked ~ .goal-card__inner .goal-card__icon {
  background: var(--c-accent); color: var(--c-on-accent);
}
.goal-card input:checked ~ .goal-card__inner .goal-card__mark {
  border-color: var(--c-accent); background: var(--c-accent); color: var(--c-on-accent);
}
.goal-card input:focus-visible ~ .goal-card__inner {
  outline: 3px solid var(--c-accent); outline-offset: 2px;
}

.goal-badge {
  display: inline-flex; align-items: center; gap: var(--s2);
  margin-top: var(--s4); padding: var(--s2) var(--s4);
  border-radius: var(--r-full);
  background: var(--c-surface-3); color: var(--c-text);
  font-size: .88rem; font-weight: 650; text-align: left;
}
.goal-badge .icon { width: 18px; height: 18px; color: var(--c-accent); }
.goal-badge em {
  display: block; font-style: normal; font-size: .66rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--c-text-muted);
}

/* ==========================================================================
   23. TABS (Clever tauschen)
   ========================================================================== */
.tabs {
  display: flex; gap: 3px; padding: 4px; margin-bottom: var(--s4);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__btn {
  appearance: none; border: 0; cursor: pointer; background: transparent;
  flex: 1 1 auto; white-space: nowrap;
  min-height: 40px; padding: 0 var(--s3);
  border-radius: var(--r-full);
  font-size: .84rem; font-weight: 650; color: var(--c-text-muted);
  transition: background .15s ease, color .15s ease;
}
.tabs__btn:hover { color: var(--c-text); }
.tabs__btn[aria-selected="true"] {
  background: var(--c-surface); color: var(--c-text); box-shadow: var(--shadow-1);
}

/* ==========================================================================
   24. WEITERE BAUSTEINE (v0.5)
   ========================================================================== */
.card--accent { border-color: var(--c-accent-line); }

.tracker-chips { display: flex; flex-wrap: wrap; gap: var(--s2); }

.link-quiet {
  appearance: none; background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap); padding: 0;
  font-size: .86rem; font-weight: 650; color: var(--c-accent);
}
.link-quiet .icon { width: 16px; height: 16px; }
.link-quiet:hover { text-decoration: underline; }

ol.steps { counter-reset: s; display: flex; flex-direction: column; gap: var(--s3); }
ol.steps li {
  counter-increment: s; position: relative; padding-left: 34px;
  font-size: .92rem; line-height: 1.5;
}
ol.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--c-accent); color: var(--c-on-accent);
  font-size: .76rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.menu-item__sub {
  display: block; font-size: .78rem; font-weight: 500;
  color: var(--c-text-muted); margin-top: 1px;
}
.menu-item { align-items: flex-start; padding-top: var(--s3); padding-bottom: var(--s3); }
.menu-item .icon { margin-top: 2px; }

.swap-grid { display: block; }

/* ==========================================================================
   25. TESTMODUS (nur bei ?test=1)
   ========================================================================== */
.test-banner {
  position: sticky; top: 0; z-index: 60;
  padding: 8px var(--s4);
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  background: var(--c-warn); color: #141518;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  text-align: center;
  display: flex; align-items: center; justify-content: center; gap: var(--s3);
  flex-wrap: wrap;
}
.test-banner__date { font-weight: 600; opacity: .85; }

.test-block .card--quiet { border: 1.5px dashed var(--c-warn); }

.test-days { display: flex; flex-wrap: wrap; gap: 6px; }
.test-day {
  appearance: none; cursor: pointer;
  min-width: 40px; min-height: 40px; padding: 0 var(--s2);
  border: 1px solid var(--c-border-strong); border-radius: var(--r-sm);
  background: var(--c-surface); color: var(--c-text);
  font-size: .82rem; font-weight: 650; font-variant-numeric: tabular-nums;
}
.test-day:hover { border-color: var(--c-accent); color: var(--c-accent); }

.test-scenarios { display: flex; flex-wrap: wrap; gap: 6px; }
.test-scenarios .btn { min-height: 38px; padding: 0 var(--s3); font-size: .8rem; }

/* ==========================================================================
   26. DESKTOP-FEINSCHLIFF (v0.5)
   ========================================================================== */
@media (min-width: 1024px) {
  .sidebar__spacer { flex: 1; min-height: var(--s5); }
  .sidebar__item--settings {
    border-top: 1px solid var(--c-border);
    margin-top: var(--s2); padding-top: var(--s3);
  }

  .goal-list { gap: var(--s4); }
}

/* Clever tauschen: ab grosser Breite zwei Karten nebeneinander */
@media (min-width: 1180px) {
  .swap-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: var(--s4); align-items: start;
  }
  .swap-grid .swap { margin-bottom: 0; }
}

/* Einstellungen dürfen auf grossen Monitoren etwas grosszügiger sein */
@media (min-width: 1280px) {
  .app-main--weit { max-width: 1040px; }
}
