/* The tokens of the design system of restaroo (ADR 0015; docs/research/design-system.md, the
   colours from section 3.3, the type scale from 4.5, spacing, radii and layers from section 5,
   targets and density from 2.3). Every colour of a page comes from here: no CSS or Razor file
   outside this one holds a hex value (ColorValuesOutsideTokensTests), and components use only the
   roles below, never a step of the neutral scale, which the comments name. Each colour is hex,
   with its OKLCH in the comment. The light view holds in :root. The dark view has two scopes
   with the same values (DarkViewTests): the Backoffice shows the light view first, also on a
   device set to dark, and the dark view once the switch in its top bar has set data-theme="dark"
   on the element html (theme.js); the website of the platform, whose element html carries
   data-theme="device", shows the dark view after the setting of the device (decisions of the
   human of 2026-11-23, comments in #375; ADR 0015). pruefliste.md next to this file is the
   checklist for every new page. */

:root {
  color-scheme: light;

  /* Surfaces. Papier is the ground, Röstbraun the surface of the brand (decision E2). */
  --rr-surface-page: #FBF7EE; /* Papier, step 50, oklch(97.7% 0.013 87) */
  --rr-surface-raised: #FDFBF6; /* step 25, oklch(98.8% 0.007 89) */
  --rr-surface-sunken: #F2EEE5; /* step 100, oklch(95.0% 0.013 87) */
  --rr-surface-selected: #F2E3BC; /* Rahm, oklch(91.8% 0.054 89) */
  --rr-surface-brand: #2A1F1A; /* Röstbraun, step 900, oklch(25.1% 0.020 46) */
  --rr-surface-brand-hover: #342923; /* step 850, oklch(29.1% 0.020 50) */

  /* Text and lines */
  --rr-text: #2A1F1A; /* Röstbraun, step 900, oklch(25.1% 0.020 46) */
  --rr-text-muted: #60564F; /* step 700, oklch(46.1% 0.017 57) */
  --rr-heading: #2A1F1A; /* Röstbraun, step 900, oklch(25.1% 0.020 46) */
  --rr-text-on-brand: #F2E3BC; /* Rahm, oklch(91.8% 0.054 89) */
  --rr-text-disabled: #9F978F; /* step 400, oklch(68.1% 0.015 68) */
  --rr-border: #877E77; /* step 500, oklch(59.9% 0.015 60) */
  --rr-border-subtle: #DFDAD1; /* step 200, oklch(89.0% 0.013 82) */

  /* Accent: Kürbis only as accent, never as surface */
  --rr-accent: #9A5320; /* Kürbis tief, oklch(51.8% 0.113 52) */
  --rr-accent-hover: #7C4621; /* Kürbis tief with 25 % Röstbraun, oklch(45.2% 0.090 53) */
  --rr-accent-on-brand: #DF903D; /* Kürbis, oklch(72.0% 0.136 64) */
  --rr-on-accent: #FBF7EE; /* Papier, step 50, oklch(97.7% 0.013 87) */

  /* Semantic colours, of the same lightness, always with icon and text (section 3.5) */
  --rr-success: #29612D; /* oklch(44.1% 0.101 145) */
  --rr-warning: #694E00; /* oklch(44.1% 0.090 86) */
  --rr-error: #94221F; /* oklch(44.0% 0.150 27) */
  --rr-info: #28577C; /* oklch(44.2% 0.080 245) */
  --rr-on-semantic: #FBF7EE; /* Papier, step 50, oklch(97.7% 0.013 87) */

  /* Layers (section 5.4): one shadow, only on floating layers and only in the light view */
  /* Röstbraun at 16 % opacity, oklch(25.1% 0.020 46 / 16%) */
  --rr-shadow: 0 4px 12px #2A1F1A29;
  /* Röstbraun at 40 % opacity, oklch(25.1% 0.020 46 / 40%), behind a modal dialog */
  --rr-scrim: #2A1F1A66;

  /* Type (section 4.5): the font shorthand of each step, and the line height of controls */
  --rr-font-family-text:
    "Atkinson Hyperlegible Next", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --rr-font-family-heading: Vollkorn, Georgia, serif;
  --rr-font-text-sm: 400 0.875rem/1.4 var(--rr-font-family-text);
  --rr-font-text-md: 400 1rem/1.5 var(--rr-font-family-text);
  --rr-font-text-md-strong: 600 1rem/1.5 var(--rr-font-family-text);
  --rr-font-text-lg: 400 1.125rem/1.45 var(--rr-font-family-text);
  --rr-font-heading-sm: 600 1.25rem/1.3 var(--rr-font-family-text);
  --rr-font-heading-md: 600 1.5rem/1.25 var(--rr-font-family-text);
  --rr-font-heading-lg: 600 1.875rem/1.2 var(--rr-font-family-heading);
  --rr-font-display: 700 2.5rem/1.1 var(--rr-font-family-heading);
  --rr-line-height-control: 1.25;

  /* Spacing on a grid of 4 px, in rem, so that it grows with the text (section 5.1) */
  --rr-space-1: 0.25rem;
  --rr-space-2: 0.5rem;
  --rr-space-3: 0.75rem;
  --rr-space-4: 1rem;
  --rr-space-5: 1.5rem;
  --rr-space-6: 2rem;
  --rr-space-7: 3rem;
  --rr-space-8: 4rem;

  /* Radii (section 5.3) */
  --rr-radius-control: 4px;
  --rr-radius-surface: 8px;
  --rr-radius-round: 50%;

  /* Targets and density for a fine pointer, a mouse (decision E11): targets at least 32 px high,
     rows of tables 36 px. A control with a line of 20 px and 1 px border is 36 px high. */
  --rr-target-size: 32px;
  --rr-target-gap: 4px;
  --rr-row-height: 36px;
  --rr-control-padding-block: 8px;
}

/* The dark view of the Backoffice, which the switch in the top bar chooses (theme.js). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --rr-surface-page: #2A1F1A; /* Röstbraun, step 900, oklch(25.1% 0.020 46) */
  --rr-surface-raised: #342923; /* step 850, oklch(29.1% 0.020 50) */
  --rr-surface-sunken: #231813; /* step 950, oklch(22.1% 0.020 46) */
  --rr-surface-selected: #402D20; /* 14 % Kürbis in Röstbraun, oklch(31.6% 0.036 55) */
  --rr-surface-brand: #231813; /* step 950, oklch(22.1% 0.020 46) */
  --rr-surface-brand-hover: #342923; /* step 850, oklch(29.1% 0.020 50) */

  --rr-text: #F2EEE5; /* step 100, oklch(95.0% 0.013 87) */
  --rr-text-muted: #C3BDB4; /* step 300, oklch(80.1% 0.014 78) */
  --rr-heading: #F2E3BC; /* Rahm, oklch(91.8% 0.054 89) */
  --rr-text-on-brand: #F2E3BC; /* Rahm, oklch(91.8% 0.054 89) */
  --rr-text-disabled: #716760; /* step 600, oklch(52.1% 0.017 57) */
  --rr-border: #877E77; /* step 500, oklch(59.9% 0.015 60) */
  --rr-border-subtle: #453B35; /* step 800, oklch(36.1% 0.017 53) */

  --rr-accent: #DF903D; /* Kürbis, oklch(72.0% 0.136 64) */
  --rr-accent-hover: #E6A967; /* Kürbis with 30 % Rahm, oklch(77.9% 0.110 67) */
  --rr-accent-on-brand: #DF903D; /* Kürbis, oklch(72.0% 0.136 64) */
  --rr-on-accent: #2A1F1A; /* Röstbraun, step 900, oklch(25.1% 0.020 46) */

  --rr-success: #8FC990; /* oklch(78.1% 0.100 145) */
  --rr-warning: #D5B36A; /* oklch(78.1% 0.100 85) */
  --rr-error: #FF968A; /* oklch(78.0% 0.128 27) */
  --rr-info: #8CBDE8; /* oklch(77.9% 0.081 246) */
  --rr-on-semantic: #2A1F1A; /* Röstbraun, step 900, oklch(25.1% 0.020 46) */

  /* No shadow in the dark view, where the lighter surface separates (section 5.4) */
  --rr-shadow: none;
  --rr-scrim: #00000099; /* black at 60 % opacity, oklch(0% 0 0 / 60%) */
}

/* The dark view of the website of the platform, after the setting of the device. */
@media (prefers-color-scheme: dark) {
  :root[data-theme="device"] {
    color-scheme: dark;
    --rr-surface-page: #2A1F1A; /* Röstbraun, step 900, oklch(25.1% 0.020 46) */
    --rr-surface-raised: #342923; /* step 850, oklch(29.1% 0.020 50) */
    --rr-surface-sunken: #231813; /* step 950, oklch(22.1% 0.020 46) */
    --rr-surface-selected: #402D20; /* 14 % Kürbis in Röstbraun, oklch(31.6% 0.036 55) */
    --rr-surface-brand: #231813; /* step 950, oklch(22.1% 0.020 46) */
    --rr-surface-brand-hover: #342923; /* step 850, oklch(29.1% 0.020 50) */

    --rr-text: #F2EEE5; /* step 100, oklch(95.0% 0.013 87) */
    --rr-text-muted: #C3BDB4; /* step 300, oklch(80.1% 0.014 78) */
    --rr-heading: #F2E3BC; /* Rahm, oklch(91.8% 0.054 89) */
    --rr-text-on-brand: #F2E3BC; /* Rahm, oklch(91.8% 0.054 89) */
    --rr-text-disabled: #716760; /* step 600, oklch(52.1% 0.017 57) */
    --rr-border: #877E77; /* step 500, oklch(59.9% 0.015 60) */
    --rr-border-subtle: #453B35; /* step 800, oklch(36.1% 0.017 53) */

    --rr-accent: #DF903D; /* Kürbis, oklch(72.0% 0.136 64) */
    --rr-accent-hover: #E6A967; /* Kürbis with 30 % Rahm, oklch(77.9% 0.110 67) */
    --rr-accent-on-brand: #DF903D; /* Kürbis, oklch(72.0% 0.136 64) */
    --rr-on-accent: #2A1F1A; /* Röstbraun, step 900, oklch(25.1% 0.020 46) */

    --rr-success: #8FC990; /* oklch(78.1% 0.100 145) */
    --rr-warning: #D5B36A; /* oklch(78.1% 0.100 85) */
    --rr-error: #FF968A; /* oklch(78.0% 0.128 27) */
    --rr-info: #8CBDE8; /* oklch(77.9% 0.081 246) */
    --rr-on-semantic: #2A1F1A; /* Röstbraun, step 900, oklch(25.1% 0.020 46) */

    /* No shadow in the dark view, where the lighter surface separates (section 5.4) */
    --rr-shadow: none;
    --rr-scrim: #00000099; /* black at 60 % opacity, oklch(0% 0 0 / 60%) */
  }
}

/* Targets and density for a coarse pointer, a finger (decision E11): targets and rows at least
   44 px high, 8 px apart (section 2.3). */
@media (pointer: coarse) {
  :root {
    --rr-target-size: 44px;
    --rr-target-gap: 8px;
    --rr-row-height: 44px;
    --rr-control-padding-block: 12px;
  }
}
