/* Gestaltungs-Token „Concours“ (hg-spec/branding/concours-tokens.json, Plan design 4.1).
   Werte stehen wörtlich in der JSON; apps/core/design.py liefert die Sollwerte für den Test.
   Hell ist Standard; Dunkel folgt dem System, außer data-theme="light" ist gesetzt (theme.js);
   data-theme="dark" erzwingt Dunkel. .hg-fixed-light behält immer den hellen Block (QR-Code, Unterschrift). */
:root, .hg-fixed-light {
  color-scheme: light;
  --paper: #F7F4ED;
  --surface: #FFFDF8;
  --tint: #F3EEE3;
  --photo-placeholder: #E6DFD1;
  --line: #DDD6C8;
  --line-soft: #ECE6DA;
  --control-border: #8F8674;
  --ink: #1B1B18;
  --muted: #5F5A50;
  --accent: #1F4D36;
  --accent-strong: #133222;
  --on-accent: #FFFDF8;
  --focus: #1F4D36;
  --danger: #9E2F28;
  --warning: #835511;
  --danger-tint: #F6E4E1;
  --warning-tint: #F5EBD8;
  /* Schmuckfarben (nur Flächen und Linien, nie Text; Quelle: apps/core/design.py BRAND_TOKENS) */
  --brand-1: #2E5E8C;
  --brand-2: #8C5A2E;
  --brand-3: #6B7F3A;
  --brand-4: #7A3E5C;
  --brand-5: #3E7A7A;
  --brand-6: #A68A3C;
}

:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --tap-target: 44px;

  --radius-none: 0px;
  --radius-sm: 2px;
  --radius-pill: 22px;

  /* Layoutmaße (Plan erscheinungsbild 7.3, Schritt 3): Grundwerte = bisherige feste Werte; Quelle der Bereiche ist
     apps/appearance/catalog.py. Seitenleiste, Symbolleiste, Inhaltsbreite, Kopfzeile, Logohöhen, Zellabstände,
     Kachelbreite. */
  --sidebar-width: 15rem;
  --rail-width: 4rem;
  --content-max-width: 1240px;
  --header-height: 60px;
  --logo-height-sm: 34px;
  --logo-height-lg: 40px;
  --table-cell-pad-y: 16px;
  --table-cell-pad-x: 16px;
  --tile-min-width: 7rem;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;

  --display-xl-size: 52px;
  --display-xl-line-height: 54px;
  --display-xl-weight: 600;
  --heading-1-size: 44px;
  --heading-1-line-height: 46px;
  --heading-1-weight: 600;
  --heading-2-size: 32px;
  --heading-2-line-height: 36px;
  --heading-2-weight: 600;
  --heading-3-size: 26px;
  --heading-3-line-height: 30px;
  --heading-3-weight: 600;
  --title-row-size: 21px;
  --title-row-line-height: 26px;
  --title-row-weight: 600;
  --body-lg-size: 16px;
  --body-lg-line-height: 27px;
  --body-lg-weight: 400;
  --body-size: 15px;
  --body-line-height: 22px;
  --body-weight: 400;
  --body-strong-size: 15px;
  --body-strong-line-height: 22px;
  --body-strong-weight: 500;
  --small-size: 13px;
  --small-line-height: 18px;
  --small-weight: 400;
  --label-size: 12px;
  --label-line-height: 16px;
  --label-weight: 500;
  --label-letter-spacing: 0.14em;
  --label-text-transform: uppercase;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #15140F;
    --surface: #1F1D18;
    --tint: #2A271F;
    --photo-placeholder: #2E2B24;
    --line: #3A372F;
    --line-soft: #2B2923;
    --control-border: #7A7363;
    --ink: #F2EEE4;
    --muted: #B4AC9C;
    --accent: #6FAE8A;
    --accent-strong: #8FC6A6;
    --on-accent: #10140F;
    --focus: #8FC6A6;
    --danger: #E58A80;
    --warning: #DDAA55;
    --danger-tint: #3A2320;
    --warning-tint: #372C19;
    --brand-1: #7FA6CC;
    --brand-2: #C99A6B;
    --brand-3: #A3B873;
    --brand-4: #C68AA6;
    --brand-5: #7FC4C4;
    --brand-6: #D9C06E;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #15140F;
  --surface: #1F1D18;
  --tint: #2A271F;
  --photo-placeholder: #2E2B24;
  --line: #3A372F;
  --line-soft: #2B2923;
  --control-border: #7A7363;
  --ink: #F2EEE4;
  --muted: #B4AC9C;
  --accent: #6FAE8A;
  --accent-strong: #8FC6A6;
  --on-accent: #10140F;
  --focus: #8FC6A6;
  --danger: #E58A80;
  --warning: #DDAA55;
  --danger-tint: #3A2320;
  --warning-tint: #372C19;
  --brand-1: #7FA6CC;
  --brand-2: #C99A6B;
  --brand-3: #A3B873;
  --brand-4: #C68AA6;
  --brand-5: #7FC4C4;
  --brand-6: #D9C06E;
}

.hg-type-display-xl { font-family: var(--font-display); font-size: var(--display-xl-size);
  line-height: var(--display-xl-line-height); font-weight: var(--display-xl-weight); }
.hg-type-heading-1 { font-family: var(--font-display); font-size: var(--heading-1-size);
  line-height: var(--heading-1-line-height); font-weight: var(--heading-1-weight); }
.hg-type-heading-2 { font-family: var(--font-display); font-size: var(--heading-2-size);
  line-height: var(--heading-2-line-height); font-weight: var(--heading-2-weight); }
.hg-type-heading-3 { font-family: var(--font-display); font-size: var(--heading-3-size);
  line-height: var(--heading-3-line-height); font-weight: var(--heading-3-weight); }
.hg-type-title-row { font-family: var(--font-display); font-size: var(--title-row-size);
  line-height: var(--title-row-line-height); font-weight: var(--title-row-weight); }
.hg-type-body-lg { font-family: var(--font-sans); font-size: var(--body-lg-size);
  line-height: var(--body-lg-line-height); font-weight: var(--body-lg-weight); }
.hg-type-body { font-family: var(--font-sans); font-size: var(--body-size);
  line-height: var(--body-line-height); font-weight: var(--body-weight); }
.hg-type-body-strong { font-family: var(--font-sans); font-size: var(--body-strong-size);
  line-height: var(--body-strong-line-height); font-weight: var(--body-strong-weight); }
.hg-type-small { font-family: var(--font-sans); font-size: var(--small-size);
  line-height: var(--small-line-height); font-weight: var(--small-weight); }
.hg-type-label { font-family: var(--font-sans); font-size: var(--label-size);
  line-height: var(--label-line-height); font-weight: var(--label-weight);
  letter-spacing: var(--label-letter-spacing); text-transform: var(--label-text-transform); }
