/* OpenUPI design tokens (ADR-079): the one place a colour, radius or shadow is set.
   Every page of the PSP and the back office links this file; backoffice/admin/web/tokens.css
   is a copy that a test keeps identical.

   The names follow the Astryx theme (ADR-084); the values follow the public landing page
   (site/styles.css): a near-black canvas with hairline borders and one signal colour, mint, in
   dark, and a near-white canvas with a deeper green in light. Geist for text and Geist Mono for
   labels and numbers, served from this site.
   The long names are Astryx's; the short names are what the pages' own styles read, and what a
   shop's branding overrides on checkout and invoices. --accent-2 has no Astryx name. */
@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(/fonts/figtree.woff2) format("woff2");
  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: Geist;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/geist.woff2) format("woff2");
  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: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/fonts/geist-mono.woff2) format("woff2");
  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;
}
:root {
  --color-background-body: #f6f7f8;
  --color-background-surface: #fff;
  --color-background-muted: #f1f3f5;
  --color-text-primary: #0b0d10;
  --color-text-secondary: #5b616b;
  --color-border: rgba(10, 12, 16, .09);
  --color-border-emphasized: rgba(10, 12, 16, .16);
  --color-accent: #13824a;
  --color-on-accent: #fff;
  --color-accent-muted: #e3f4ea;
  --color-neutral: rgba(10, 12, 16, .05);
  --color-text-success: #13824a;
  --color-success-muted: #e3f4ea;
  --color-text-error: #0b0d10;
  --color-error-muted: #e6e8eb;
  --color-text-warning: #5b616b;
  --color-warning-muted: #f1f3f5;
  --color-text-info: #5b616b;
  --color-info-muted: #f1f3f5;
  --color-glow-primary: rgba(19, 130, 74, .08);
  --color-glow-secondary: rgba(3, 153, 77, .05);
  --radius-container: 16px;
  --radius-element: 12px;
  --shadow-low: 0 1px 2px rgba(10, 12, 16, .04), 0 1px 3px rgba(10, 12, 16, .04);
  --shadow-med: 0 1px 2px rgba(10, 12, 16, .05), 0 12px 32px -12px rgba(10, 12, 16, .16);
  --accent-2: #0e6b3c;
  --font-body: Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: var(--color-background-body);
  --card: var(--color-background-surface);
  --raised: var(--color-background-muted);
  --ink: var(--color-text-primary);
  --muted: var(--color-text-secondary);
  --line: var(--color-border);
  --accent: var(--color-accent);
  --accent-ink: var(--color-on-accent);
  --accent-soft: var(--color-accent-muted);
  --ok: var(--color-text-success);
  --ok-bg: var(--color-success-muted);
  --bad: var(--color-text-error);
  --bad-bg: var(--color-error-muted);
  --wait: var(--color-text-warning);
  --wait-bg: var(--color-warning-muted);
  --info: var(--color-text-info);
  --info-bg: var(--color-info-muted);
  --radius: var(--radius-container);
  --radius-sm: var(--radius-element);
  --shadow: var(--shadow-med);
  --glow: var(--color-glow-primary);
  --glow-2: var(--color-glow-secondary);
}
/* Dark: the system's choice unless a person picked light, or a person's own choice of dark.
   The two blocks must stay the same. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --color-background-body: #08090b;
    --color-background-surface: #111317;
    --color-background-muted: #16191e;
    --color-text-primary: #eceef1;
    --color-text-secondary: #9aa0a9;
    --color-border: rgba(255, 255, 255, .08);
    --color-border-emphasized: rgba(255, 255, 255, .14);
    --color-accent: #5eea9d;
    --color-on-accent: #04170c;
    --color-accent-muted: rgba(94, 234, 157, .12);
    --color-neutral: rgba(255, 255, 255, .06);
    --color-text-success: #5eea9d;
    --color-success-muted: rgba(94, 234, 157, .12);
    --color-text-error: #ffffff;
    --color-error-muted: rgba(255, 255, 255, .12);
    --color-text-warning: #9aa0a9;
    --color-warning-muted: rgba(255, 255, 255, .06);
    --color-text-info: #9aa0a9;
    --color-info-muted: rgba(255, 255, 255, .06);
    --color-glow-primary: rgba(47, 191, 113, .14);
    --color-glow-secondary: rgba(3, 153, 77, .08);
    --shadow-low: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-med: 0 0 0 1px rgba(0, 0, 0, .5), 0 24px 60px -28px rgba(0, 0, 0, .9);
    --accent-2: #2fbf71;
    color-scheme: dark;
  }
}
:root[data-theme=dark] {
  --color-background-body: #08090b;
  --color-background-surface: #111317;
  --color-background-muted: #16191e;
  --color-text-primary: #eceef1;
  --color-text-secondary: #9aa0a9;
  --color-border: rgba(255, 255, 255, .08);
  --color-border-emphasized: rgba(255, 255, 255, .14);
  --color-accent: #5eea9d;
  --color-on-accent: #04170c;
  --color-accent-muted: rgba(94, 234, 157, .12);
  --color-neutral: rgba(255, 255, 255, .06);
  --color-text-success: #5eea9d;
  --color-success-muted: rgba(94, 234, 157, .12);
  --color-text-error: #ffffff;
  --color-error-muted: rgba(255, 255, 255, .12);
  --color-text-warning: #9aa0a9;
  --color-warning-muted: rgba(255, 255, 255, .06);
  --color-text-info: #9aa0a9;
  --color-info-muted: rgba(255, 255, 255, .06);
  --color-glow-primary: rgba(47, 191, 113, .14);
  --color-glow-secondary: rgba(3, 153, 77, .08);
  --shadow-low: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-med: 0 0 0 1px rgba(0, 0, 0, .5), 0 24px 60px -28px rgba(0, 0, 0, .9);
  --accent-2: #2fbf71;
  color-scheme: dark;
}
:root[data-theme=light] { color-scheme: light; }

/* Rules every page gets, so a new page cannot forget them. A page's own rules come later and win. */
:where(a, button, summary, [tabindex="0"]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.skip:focus { top: 8px; }
main:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Phones: inputs at 16px, or iOS zooms the page in on every tap into a field. */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }
}
