/* Mivena: the shared look of every customer screen (the app at /app/, the customer portal at
   /portal/ and the scanner at /wms/), served at /ui/mivena.css. The same tokens as mivena.se
   (apps/site/static/site.css), at app density: deep blue-black, hairlines, Mona Sans with Geist
   Mono for numbers and ids.
   Colour carries meaning, as on the site: ion (ice blue) is the system's own colour (focus,
   selection, information); copper is what needs a person, a draft or work in progress (and the dot
   in the mark); green is done. Dark is the default; a person can choose light (theme.js sets
   data-theme on <html> before the first paint). Both themes are checked for WCAG AA contrast.
   Class names in the apps are not defined here: each app's own stylesheet styles them with these
   tokens, so nothing here clashes with an app's names. */

@font-face { font-family: "Mona Sans"; src: url("fonts/mona-sans-latin.woff2") format("woff2"); font-weight: 200 900; font-stretch: 75% 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Mona Sans"; src: url("fonts/mona-sans-latin-ext.woff2") format("woff2"); font-weight: 200 900; font-stretch: 75% 125%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* Dark: the default. */
:root {
  /* The site's palette */
  --bg: oklch(0.145 0.012 262);
  --bg-deep: oklch(0.12 0.011 262);
  --surface: oklch(0.175 0.013 262);
  --surface-2: oklch(0.205 0.014 262);
  --surface-3: oklch(0.235 0.015 262);
  --text: oklch(0.97 0.004 250);
  --text-2: oklch(0.81 0.012 255);
  --text-3: oklch(0.67 0.014 258);
  --text-4: oklch(0.57 0.014 258);
  --line: oklch(1 0 0 / 0.07);
  --line-2: oklch(1 0 0 / 0.12);
  --line-3: oklch(1 0 0 / 0.2);
  --ion: oklch(0.8 0.105 228);
  --ion-ink: oklch(0.88 0.06 228);
  --copper: oklch(0.73 0.155 50);
  --copper-ink: oklch(0.86 0.08 55);
  --green: oklch(0.82 0.13 163);
  --red: oklch(0.72 0.16 25);
  --red-ink: oklch(0.8 0.11 25);
  --tint: oklch(1 0 0 / 0.04);
  --tint-2: oklch(1 0 0 / 0.07);

  /* What the apps' stylesheets use */
  --border: var(--line-2);
  --primary: var(--ion);
  --primary-hover: var(--ion-ink);
  --on-primary: oklch(0.17 0.012 262);
  --info: var(--ion-ink);
  --info-bg: oklch(0.8 0.105 228 / 0.13);
  --attention: var(--copper);
  --attention-ink: var(--copper-ink);
  --attention-bg: oklch(0.73 0.155 50 / 0.13);
  --success: var(--green);
  --success-bg: oklch(0.82 0.13 163 / 0.12);
  --danger: var(--red);
  --danger-ink: var(--red-ink);
  --danger-bg: oklch(0.72 0.16 25 / 0.14);
  /* The site's white button; in light it turns to ink. */
  --cta: oklch(0.97 0.004 250);
  --cta-hover: oklch(1 0 0);
  --on-cta: oklch(0.17 0.012 262);
  --scrim: oklch(0.08 0.01 262 / 0.6);
  --selection: oklch(0.8 0.105 228 / 0.3);
  /* Text fields sit a step below the surface, like the site's sign-up field. */
  --field: oklch(0.12 0.011 262 / 0.7);
  --field-focus: inset 0 0 0 1.5px oklch(0.8 0.105 228 / 0.85), 0 0 0 4px oklch(0.8 0.105 228 / 0.12);

  /* Depth: an inset hairline with a top highlight; a three-layer lift for what floats. */
  --edge: inset 0 0 0 1px var(--line-2), inset 0 1px 0 oklch(1 0 0 / 0.06);
  --shadow: inset 0 1px 0 oklch(1 0 0 / 0.045), 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 1px 2px oklch(0 0 0 / 0.35), 0 16px 36px -10px oklch(0 0 0 / 0.5), 0 48px 96px -24px oklch(0 0 0 / 0.6);
  --glass: linear-gradient(180deg, oklch(1 0 0 / 0.035), oklch(1 0 0 / 0.008) 60%);
  --glow-ion: 0 0 10px oklch(0.8 0.105 228 / 0.7);

  --font-sans: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --mono: var(--font-mono);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --r-xs: 6px;
  --r-sm: 9px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  color-scheme: dark;
  scrollbar-color: oklch(1 0 0 / 0.18) transparent;
}

/* Light: the same meaning, darker inks so every text colour keeps AA on white and on the page. */
:root[data-theme='light'] {
  --bg: oklch(0.972 0.004 255);
  --bg-deep: oklch(0.955 0.006 255);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.962 0.005 255);
  --surface-3: oklch(0.93 0.007 255);
  --text: oklch(0.2 0.015 262);
  --text-2: oklch(0.37 0.016 262);
  --text-3: oklch(0.47 0.016 262);
  --text-4: oklch(0.58 0.014 262);
  --line: oklch(0.25 0.02 262 / 0.08);
  --line-2: oklch(0.25 0.02 262 / 0.13);
  --line-3: oklch(0.25 0.02 262 / 0.22);
  --ion: oklch(0.5 0.12 240);
  --ion-ink: oklch(0.45 0.11 240);
  --copper: oklch(0.68 0.16 50);
  --copper-ink: oklch(0.52 0.14 48);
  --green: oklch(0.5 0.11 163);
  --red: oklch(0.53 0.19 27);
  --red-ink: oklch(0.5 0.19 27);
  --tint: oklch(0.25 0.02 262 / 0.035);
  --tint-2: oklch(0.25 0.02 262 / 0.06);

  --on-primary: oklch(1 0 0);
  --info: var(--ion-ink);
  --info-bg: oklch(0.7 0.11 235 / 0.15);
  --attention: var(--copper-ink);
  --attention-ink: var(--copper-ink);
  --attention-bg: oklch(0.73 0.155 50 / 0.16);
  --success-bg: oklch(0.7 0.13 163 / 0.16);
  --danger-bg: oklch(0.65 0.19 25 / 0.13);
  --cta: oklch(0.22 0.015 262);
  --cta-hover: oklch(0.3 0.018 262);
  --on-cta: oklch(1 0 0);
  --scrim: oklch(0.2 0.02 262 / 0.35);
  --selection: oklch(0.5 0.12 240 / 0.2);
  --field: oklch(1 0 0);
  --field-focus: inset 0 0 0 1.5px oklch(0.5 0.12 240 / 0.9), 0 0 0 4px oklch(0.5 0.12 240 / 0.14);

  --edge: inset 0 0 0 1px var(--line-2);
  --shadow: 0 1px 2px oklch(0.2 0.02 262 / 0.06), 0 1px 1px oklch(0.2 0.02 262 / 0.04);
  --shadow-lg: 0 1px 2px oklch(0.2 0.02 262 / 0.08), 0 16px 36px -10px oklch(0.2 0.02 262 / 0.18), 0 40px 80px -24px oklch(0.2 0.02 262 / 0.18);
  --glass: linear-gradient(180deg, oklch(1 0 0 / 0), oklch(1 0 0 / 0));
  --glow-ion: none;
  color-scheme: light;
  scrollbar-color: oklch(0.25 0.02 262 / 0.25) transparent;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; background: var(--bg); }
body { font-family: var(--font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; caret-color: var(--ion); font-variant-numeric: tabular-nums; }
::selection { background: var(--selection); color: var(--text); }
code, kbd, samp, pre, .mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: 0; }

/* The mark: a ring with its copper electron. Inline it as
   <svg class="mv-mark" viewBox="0 0 32 32"><circle class="mv-ring" cx="16" cy="16" r="10.5"/><circle class="mv-electron" cx="23.42" cy="8.58" r="3.7"/></svg> */
.mv-mark { width: 24px; height: 24px; flex: none; overflow: visible; }
.mv-ring { fill: none; stroke: currentColor; stroke-width: 3.4; }
.mv-electron { fill: var(--copper); }
/* The wordmark: lowercase, wide and tight like the site's. */
.mv-word { font-weight: 640; font-stretch: 108%; letter-spacing: -0.035em; }

/* theme.js sets this for the frame the theme changes in. */
[data-theme-switching] *, [data-theme-switching] *::before, [data-theme-switching] *::after { transition: none !important; }

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