/* mapense design tokens
 * Single source of truth for colours, type, spacing and radii (design/DESIGN.md, rule 1).
 * Loaded before north.css and mapense-components.css on every page. The --north-* variables
 * of north.css and the Mapper's own variables (mapping/static/style.css) are aliases of these.
 *
 * The design's own copy is design/mapense-tokens.css. This one differs in two ways:
 *  - no Google Fonts import: Manrope and JetBrains Mono are self-hosted (the @font-face rules in north.css);
 *  - the tokens under "Additions", for values the screens use that the design's file has no name for.
 */

:root {
  /* Surfaces */
  --mp-bg:            #F4F1EA; /* app background, "kartpapper" */
  --mp-surface:       #FBFAF6; /* panels, top bar, rails */
  --mp-surface-raised:#FFFFFF; /* cards, buttons, inputs */
  --mp-surface-sunken:#E9E5DB; /* segmented-control track, map backdrop */

  /* Lines */
  --mp-border:        #E4DFD2; /* panel dividers, card borders */
  --mp-border-strong: #C9C3B4; /* inputs, secondary buttons */

  /* Text */
  --mp-text:          #1B1F1A; /* primary */
  --mp-text-2:        #3A4037; /* body on light surfaces */
  --mp-text-muted:    #5A6156; /* labels, meta, breadcrumbs (passes 4.5:1 on --mp-surface) */

  /* Brand */
  --mp-accent:        #93507F; /* plum: primary actions, selection */
  --mp-accent-text:   #FFFFFF;
  --mp-forest:        #4F6B55; /* secondary brand, links, success */
  --mp-forest-tint:   #E3EBE4; /* success / version chip background */
  --mp-forest-ink:    #3A5240; /* text on --mp-forest-tint */
  --mp-heath:         #8B6B4E; /* tertiary brand accent */

  /* Orienteering overprint (ISOM/ISSprOM purple) — map objects only, never UI chrome */
  --mp-overprint:     #B0127F;
  --mp-overprint-tint:#F1E3EC; /* highlighted row for the active leg/control */

  /* Course colours (course list swatches, route lines) */
  --mp-course-1: #93507F;
  --mp-course-2: #2F6FB5;
  --mp-course-3: #E08A1E;
  --mp-course-4: #3E9A55;

  /* Type */
  --mp-font:      "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mp-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --mp-fs-xs: 12px;
  --mp-fs-sm: 13px;
  --mp-fs-md: 14px;
  --mp-fs-lg: 15px;
  --mp-fs-xl: 20px;

  /* Spacing (4px grid) */
  --mp-space-1: 4px;
  --mp-space-2: 8px;
  --mp-space-3: 12px;
  --mp-space-4: 16px;
  --mp-space-5: 24px;

  /* Radii */
  --mp-radius-sm:   9px;   /* buttons inside a segmented track */
  --mp-radius-md:   10px;  /* icon buttons */
  --mp-radius-lg:   12px;  /* cards, tool buttons, tracks */
  --mp-radius-pill: 999px; /* chips, text buttons */

  /* Layout */
  --mp-topbar-h:    56px;
  --mp-rail-w:      60px;
  --mp-sidepanel-w: 312px;
  --mp-touch:       44px;  /* minimum hit target */

  /* ---- Additions (values the screens in design/screens/ use) ---- */
  --mp-text-faint:    #7B8277; /* placeholder-level text only: below 4.5:1, never for something that must be read */
  --mp-border-soft:   #F0ECE3; /* the line between two rows of a list */
  --mp-accent-strong: #7A3F68; /* hover of a primary button */
  --mp-accent-tint:   #F1E3EC; /* plum tag ("Tävling"), a selected row */
  --mp-accent-ink:    #6E2F5A; /* text on --mp-accent-tint */
  --mp-neutral-tint:  #EEEAE1; /* grey tag ("Utkast") */
  --mp-neutral-ink:   #4A4F47;
  --mp-amber-tint:    #FBF1E2; /* amber note ("main är låst") */
  --mp-amber-tag:     #F6E3C7; /* amber tag ("Träning" as a version status) */
  --mp-amber-border:  #EBD2AC;
  --mp-amber-ink:     #7A4A12;
  --mp-success:       #3A5240;
  --mp-danger:        #8A2B2B;
  --mp-inverse:       #1B1F1A; /* dark fill: the pressed tool, the chosen filter chip, the error pill */
  --mp-inverse-text:  #FFFFFF;
  --mp-scrim:         rgba(27, 31, 26, .38);   /* behind a dialog */
  --mp-glass:         rgba(251, 250, 246, .94); /* floating controls over the map */
  --mp-shadow-float:  0 1px 2px rgba(27, 31, 26, .08);
  --mp-shadow-dialog: 0 16px 48px rgba(27, 31, 26, .28);
  --mp-shadow-toast:  0 6px 20px rgba(27, 31, 26, .3);
  --mp-radius-float:  14px;  /* floating controls over the map */
  --mp-radius-xl:     20px;  /* page cards, dialogs */
  --mp-nav-w:         248px; /* the main menu at the left */
}
