/* SecureBasis design system 1.1.0: TOKENS (colour, type, spacing, radius, elevation, motion).
   One file for the product UI and the website. Plain CSS custom properties, no build step.

   Layers of meaning, bottom to top:
     1. Fiori roles: the public SAP Fiori "Quartz Light" / "Quartz Dark" colour roles (shell, background,
        text, semantic positive / critical / negative / information / neutral), read from SAP's own
        Apache-2.0 theming-base-content (sources in design/README.md). Values are tuned only where a
        WCAG 2.2 AA pair needed it.
     2. Brand: the founder's client-approved SAP-tone palette (SAP blue #0A6ED1, SAP gold #F0AB00,
        chip #E8F1FB, badge gradient #F4F9FF -> #DCE9F8, border #C9DDF4, shadow #0A2E5C at 30%).
     3. Component tokens: buttons, badges, shell, focus ring.

   Theme switching: light is the default; dark follows the OS (prefers-color-scheme) unless the page
   pins a theme with <html data-theme="light|dark">. The two dark blocks below MUST stay identical;
   design/tools/contrast.py fails the build if they differ or if any text/background pair misses
   WCAG 2.2 AA. Never add a colour token without adding its pair to that script.

   Layer order (also declared in components.css, so the order holds whichever file loads first):
   legacy < bp.tokens < bp.base < bp.components. Put any older CSS in `legacy` (README "Using it"). */

@layer legacy, bp.tokens, bp.base, bp.components;

@font-face{font-family:"IBM Plex Sans";src:url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"IBM Plex Sans";src:url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"IBM Plex Sans";src:url("fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"JetBrains Mono";src:url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"JetBrains Mono";src:url("fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}

@layer bp.tokens{

/* ============================================================ LIGHT (default) */
:root{
  color-scheme:light;

  /* ---- brand primitives: the founder's client-approved palette (do not retune) */
  --bp-brand-blue:#0A6ED1;          /* glyphs, accents, primary; = Fiori Quartz sapBrandColor */
  --bp-brand-blue-hi:#1A7FE0;       /* primary button, top stop */
  --bp-brand-blue-lo:#085CAF;       /* primary button, bottom stop */
  --bp-brand-gold:#F0AB00;          /* structural accents and focus; never text on light surfaces */
  --bp-brand-chip:#E8F1FB;          /* flat chip tint */
  --bp-brand-badge-top:#F4F9FF;     /* 3D badge gradient, top */
  --bp-brand-badge-bottom:#DCE9F8;  /* 3D badge gradient, bottom */
  --bp-brand-border:#C9DDF4;        /* badge and chip border */
  --bp-brand-navy:#0A2E5C;          /* shadow ink */
  --bp-brand-shadow:rgba(10,46,92,.30);

  /* ---- surfaces */
  --bp-bg:#F3F6FA;                  /* page */
  --bp-surface:#FFFFFF;             /* cards, guide card, popovers */
  --bp-surface-2:#F7FAFD;           /* quiet panels inside cards */
  --bp-surface-sunken:#EBF0F6;      /* wells: code, tracks, skeletons */
  --bp-surface-tint:#E8F1FB;        /* brand-tinted panels (= chip) */
  --bp-border:#D8E1EB;              /* hairlines between regions (decorative) */
  --bp-border-brand:#C9DDF4;        /* brand-tinted outlines (decorative) */
  --bp-border-control:#5B7088;      /* input outlines: 3:1 against every surface (WCAG 1.4.11) */
  --bp-overlay:rgba(16,28,44,.48);  /* scrim behind dialogs */

  /* ---- text */
  --bp-text:#15263A;                /* body and headings */
  --bp-text-muted:#4F6379;          /* secondary lines, labels */
  --bp-text-on-accent:#FFFFFF;      /* on primary / danger buttons */
  --bp-accent:#0A6ED1;              /* glyphs, rules, progress, selected outlines (non-text, 3:1) */
  --bp-accent-text:#0B62BD;         /* links, eyebrows, info text (4.5:1 on every light surface) */
  --bp-accent-text-hover:#084C93;

  /* ---- semantic (Fiori value states). One colour per tone serves text AND icon. */
  --bp-positive:#107E3E;  --bp-positive-bg:#EEF8F1;  --bp-positive-border:#AFD9BD;
  --bp-critical:#A04B00;  --bp-critical-bg:#FFF4E8;  --bp-critical-border:#F1C9A0;
  --bp-negative:#BB0000;  --bp-negative-bg:#FFF0F0;  --bp-negative-border:#F1C1C1;
  --bp-info:#0B62BD;      --bp-info-bg:#EDF5FE;      --bp-info-border:#B9D5F4;
  --bp-neutral:#56677A;   --bp-neutral-bg:#F0F3F7;   --bp-neutral-border:#D0D9E3;
  --bp-attested:#5B3FA8;  --bp-attested-bg:#F4F0FC;  --bp-attested-border:#D3C6F1; /* self-attested: a person's mark, never "verified" */

  /* ---- shell bar (Fiori Quartz shell #354A5F, gold structural rule) */
  --bp-shell-bg:#354A5F;
  --bp-shell-bg-hover:#283848;      /* = Quartz sapShell_Hover_Background */
  --bp-shell-text:#FFFFFF;
  --bp-shell-text-muted:#C9DBED;
  --bp-shell-rule:#F0AB00;
  --bp-shell-control-border:rgba(255,255,255,.30);
  --bp-shell-tag:#FFD27A;           /* environment tag ("Demo licence") */

  /* ---- 3D buttons */
  --bp-btn-primary-top:#1A7FE0;  --bp-btn-primary-mid:#0A6ED1;  --bp-btn-primary-bottom:#085CAF;
  --bp-btn-primary-border:#0960BB; --bp-btn-primary-edge:#064A8E; --bp-btn-primary-text:#FFFFFF;
  --bp-btn-secondary-top:#F4F9FF; --bp-btn-secondary-bottom:#DCE9F8;
  --bp-btn-secondary-border:#B4CDEA; --bp-btn-secondary-edge:#B9CDE6; --bp-btn-secondary-text:#085CAF;
  --bp-btn-danger-top:#D23131;   --bp-btn-danger-mid:#BB0000;   --bp-btn-danger-bottom:#990000;
  --bp-btn-danger-border:#A30000; --bp-btn-danger-edge:#6E0000;  --bp-btn-danger-text:#FFFFFF;
  --bp-btn-disabled-bg:#E5EAF0;  --bp-btn-disabled-border:#D2DAE3; --bp-btn-disabled-text:#5F7185;
  --bp-btn-drop:rgba(10,46,92,.30);  /* #0A2E5C at 30% */

  /* ---- 3D floating badge (founder geometry: radius 23% of side, vertical gradient, 1.5px border,
         drop shadow dy 5 / blur 7 at a 104px side, scaled with the badge) */
  --bp-badge-top:#F4F9FF;  --bp-badge-bottom:#DCE9F8;  --bp-badge-border:#C9DDF4;
  --bp-badge-glyph:#0A6ED1; --bp-badge-shadow:rgba(10,46,92,.30); --bp-badge-highlight:rgba(255,255,255,.95);
  --bp-badge-positive-top:#F2FBF5; --bp-badge-positive-bottom:#D5EEDD; --bp-badge-positive-border:#AFD9BD; --bp-badge-positive-glyph:#107E3E;
  --bp-badge-critical-top:#FFF8F0; --bp-badge-critical-bottom:#FBE2C7; --bp-badge-critical-border:#F1C9A0; --bp-badge-critical-glyph:#A04B00;
  --bp-badge-negative-top:#FFF6F6; --bp-badge-negative-bottom:#F9DADA; --bp-badge-negative-border:#F1C1C1; --bp-badge-negative-glyph:#BB0000;
  --bp-badge-neutral-top:#F8FAFC;  --bp-badge-neutral-bottom:#E3E9EF; --bp-badge-neutral-border:#D0D9E3; --bp-badge-neutral-glyph:#56677A;
  --bp-badge-attested-top:#F8F5FE; --bp-badge-attested-bottom:#E6DDF8; --bp-badge-attested-border:#D3C6F1; --bp-badge-attested-glyph:#5B3FA8;

  /* ---- focus: gold ring with a navy edge, so one layer reaches 3:1 on any surface */
  --bp-focus:#F0AB00;
  --bp-focus-edge:#0A2E5C;
  --bp-focus-gap:#FFFFFF;

  /* ---- toast (inverted surface) */
  --bp-toast-bg:#15263A; --bp-toast-text:#FFFFFF; --bp-toast-muted:#C3D3E4; --bp-toast-link:#9DCCFF;

  /* ---- elevation (navy-tinted, never pure black on light) */
  --bp-elev-1:0 1px 2px rgba(10,46,92,.08);
  --bp-elev-2:0 1px 2px rgba(10,46,92,.06),0 3px 8px rgba(10,46,92,.08);
  --bp-elev-3:0 2px 6px rgba(10,46,92,.06),0 10px 28px rgba(10,46,92,.12);
  --bp-elev-4:0 4px 12px rgba(10,46,92,.08),0 22px 56px rgba(10,46,92,.20);
  --bp-tile-edge:#D2DFEC;           /* keycap edge under square tiles */

  /* ---- type */
  --bp-font-sans:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans",sans-serif;
  --bp-font-mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --bp-text-xs:12px;   /* metadata only, never the only carrier of meaning */
  --bp-text-sm:13px;
  --bp-text-md:14px;
  --bp-text-base:16px;
  --bp-text-lg:18px;
  --bp-text-xl:20px;
  --bp-text-2xl:24px;
  --bp-text-3xl:30px;
  --bp-text-4xl:38px;
  --bp-text-5xl:48px;
  --bp-leading-tight:1.2;
  --bp-leading-snug:1.35;
  --bp-leading-normal:1.55;
  --bp-weight-regular:400;
  --bp-weight-semibold:600;
  --bp-weight-bold:700;
  --bp-tracking-caps:.08em;
  --bp-tracking-brand:.12em;

  /* ---- spacing (4px grid) */
  --bp-space-1:4px;  --bp-space-2:8px;  --bp-space-3:12px; --bp-space-4:16px;
  --bp-space-5:20px; --bp-space-6:24px; --bp-space-7:32px; --bp-space-8:40px;
  --bp-space-9:48px; --bp-space-10:64px; --bp-space-11:80px; --bp-space-12:96px;
  --bp-gutter:16px;                  /* page side gutter on phones; 24px from 720px */

  /* ---- radius */
  --bp-radius-xs:4px;
  --bp-radius-sm:6px;
  --bp-radius-md:10px;               /* buttons, fields, chips */
  --bp-radius-lg:14px;               /* cards, popovers */
  --bp-radius-xl:18px;               /* square tiles */
  --bp-radius-2xl:24px;              /* guide card */
  --bp-radius-badge:23%;             /* 3D badge: 23% of its side (founder geometry) */
  --bp-radius-pill:999px;

  /* ---- sizes */
  --bp-control-h:48px;               /* default button / field height (>= 44px target) */
  --bp-control-h-lg:56px;            /* guide card actions */
  --bp-control-h-sm:40px;
  --bp-tile-size:168px;
  --bp-shell-h:56px;
  --bp-measure:68ch;

  /* ---- motion */
  --bp-dur-press:90ms;
  --bp-dur-fast:140ms;
  --bp-dur-base:200ms;
  --bp-dur-slow:320ms;
  --bp-ease-standard:cubic-bezier(.2,0,0,1);
  --bp-ease-out:cubic-bezier(0,0,.2,1);
  --bp-ease-lift:cubic-bezier(.3,1.4,.6,1);  /* a small overshoot for the 3D lift */
  --bp-lift:-2px;                    /* hover: the keycap rises 2px */
  --bp-press:3px;                    /* active: the keycap goes down 3px */

  /* ---- layers */
  --bp-z-shell:30;
  --bp-z-popover:40;
  --bp-z-toast:50;
}

/* ============================================================ DARK: follows the OS unless pinned light */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    color-scheme:dark;
    --bp-bg:#10161D; --bp-surface:#19212B; --bp-surface-2:#1E2833; --bp-surface-sunken:#0C1117; --bp-surface-tint:#152C46;
    --bp-border:#2B3746; --bp-border-brand:#34506F; --bp-border-control:#7D91A6; --bp-overlay:rgba(0,0,0,.62);
    --bp-text:#EEF3F8; --bp-text-muted:#A9B8C8; --bp-text-on-accent:#FFFFFF;
    --bp-accent:#4FA3F2; --bp-accent-text:#80BEF8; --bp-accent-text-hover:#B3D8FB;
    --bp-positive:#83D49E;  --bp-positive-bg:#12301F;  --bp-positive-border:#2C5E3E;
    --bp-critical:#F6BC69;  --bp-critical-bg:#2D2009;  --bp-critical-border:#6A4A16;
    --bp-negative:#FF9393;  --bp-negative-bg:#3A1519;  --bp-negative-border:#7A2E35;
    --bp-info:#8CC6FA;      --bp-info-bg:#0F2A46;      --bp-info-border:#285382;
    --bp-neutral:#B5C1CE;   --bp-neutral-bg:#222C37;   --bp-neutral-border:#3A4757;
    --bp-attested:#C3B0FF;  --bp-attested-bg:#251E3E;  --bp-attested-border:#4D3F7E;
    --bp-shell-bg:#0B1118; --bp-shell-bg-hover:#18222D; --bp-shell-text:#FFFFFF; --bp-shell-text-muted:#AFC3D8;
    --bp-shell-rule:#F0AB00; --bp-shell-control-border:rgba(255,255,255,.24); --bp-shell-tag:#FFD27A;
    --bp-btn-primary-edge:#043A70; --bp-btn-primary-border:#0A64C2;
    --bp-btn-secondary-top:#2E425A; --bp-btn-secondary-bottom:#22344A;
    --bp-btn-secondary-border:#466485; --bp-btn-secondary-edge:#0F1822; --bp-btn-secondary-text:#DCEBFB;
    --bp-btn-danger-edge:#4D0000;
    --bp-btn-disabled-bg:#232D38; --bp-btn-disabled-border:#303C4A; --bp-btn-disabled-text:#8A99A9;
    --bp-btn-drop:rgba(0,0,0,.55);
    --bp-badge-top:#2E425A; --bp-badge-bottom:#1F3045; --bp-badge-border:#466485;
    --bp-badge-glyph:#8CC8FF; --bp-badge-shadow:rgba(0,0,0,.55); --bp-badge-highlight:rgba(255,255,255,.14);
    --bp-badge-positive-top:#1D3D2A; --bp-badge-positive-bottom:#14301F; --bp-badge-positive-border:#2F6844; --bp-badge-positive-glyph:#83D49E;
    --bp-badge-critical-top:#3D2C10; --bp-badge-critical-bottom:#2E200A; --bp-badge-critical-border:#74521A; --bp-badge-critical-glyph:#F6BC69;
    --bp-badge-negative-top:#45202A; --bp-badge-negative-bottom:#35161D; --bp-badge-negative-border:#82353D; --bp-badge-negative-glyph:#FF9393;
    --bp-badge-neutral-top:#2A3542;  --bp-badge-neutral-bottom:#202A35; --bp-badge-neutral-border:#435163; --bp-badge-neutral-glyph:#B5C1CE;
    --bp-badge-attested-top:#30284F; --bp-badge-attested-bottom:#251E3E; --bp-badge-attested-border:#56478A; --bp-badge-attested-glyph:#C3B0FF;
    --bp-focus:#F0AB00; --bp-focus-edge:#0B1118; --bp-focus-gap:#19212B;
    --bp-toast-bg:#E9EFF6; --bp-toast-text:#15263A; --bp-toast-muted:#43566C; --bp-toast-link:#0B62BD;
    --bp-elev-1:0 1px 2px rgba(0,0,0,.40);
    --bp-elev-2:0 1px 2px rgba(0,0,0,.35),0 3px 8px rgba(0,0,0,.30);
    --bp-elev-3:0 2px 6px rgba(0,0,0,.35),0 10px 28px rgba(0,0,0,.40);
    --bp-elev-4:0 4px 12px rgba(0,0,0,.40),0 22px 56px rgba(0,0,0,.55);
    --bp-tile-edge:#0E141B;
  }
}
:root[data-theme="dark"]{
    color-scheme:dark;
    --bp-bg:#10161D; --bp-surface:#19212B; --bp-surface-2:#1E2833; --bp-surface-sunken:#0C1117; --bp-surface-tint:#152C46;
    --bp-border:#2B3746; --bp-border-brand:#34506F; --bp-border-control:#7D91A6; --bp-overlay:rgba(0,0,0,.62);
    --bp-text:#EEF3F8; --bp-text-muted:#A9B8C8; --bp-text-on-accent:#FFFFFF;
    --bp-accent:#4FA3F2; --bp-accent-text:#80BEF8; --bp-accent-text-hover:#B3D8FB;
    --bp-positive:#83D49E;  --bp-positive-bg:#12301F;  --bp-positive-border:#2C5E3E;
    --bp-critical:#F6BC69;  --bp-critical-bg:#2D2009;  --bp-critical-border:#6A4A16;
    --bp-negative:#FF9393;  --bp-negative-bg:#3A1519;  --bp-negative-border:#7A2E35;
    --bp-info:#8CC6FA;      --bp-info-bg:#0F2A46;      --bp-info-border:#285382;
    --bp-neutral:#B5C1CE;   --bp-neutral-bg:#222C37;   --bp-neutral-border:#3A4757;
    --bp-attested:#C3B0FF;  --bp-attested-bg:#251E3E;  --bp-attested-border:#4D3F7E;
    --bp-shell-bg:#0B1118; --bp-shell-bg-hover:#18222D; --bp-shell-text:#FFFFFF; --bp-shell-text-muted:#AFC3D8;
    --bp-shell-rule:#F0AB00; --bp-shell-control-border:rgba(255,255,255,.24); --bp-shell-tag:#FFD27A;
    --bp-btn-primary-edge:#043A70; --bp-btn-primary-border:#0A64C2;
    --bp-btn-secondary-top:#2E425A; --bp-btn-secondary-bottom:#22344A;
    --bp-btn-secondary-border:#466485; --bp-btn-secondary-edge:#0F1822; --bp-btn-secondary-text:#DCEBFB;
    --bp-btn-danger-edge:#4D0000;
    --bp-btn-disabled-bg:#232D38; --bp-btn-disabled-border:#303C4A; --bp-btn-disabled-text:#8A99A9;
    --bp-btn-drop:rgba(0,0,0,.55);
    --bp-badge-top:#2E425A; --bp-badge-bottom:#1F3045; --bp-badge-border:#466485;
    --bp-badge-glyph:#8CC8FF; --bp-badge-shadow:rgba(0,0,0,.55); --bp-badge-highlight:rgba(255,255,255,.14);
    --bp-badge-positive-top:#1D3D2A; --bp-badge-positive-bottom:#14301F; --bp-badge-positive-border:#2F6844; --bp-badge-positive-glyph:#83D49E;
    --bp-badge-critical-top:#3D2C10; --bp-badge-critical-bottom:#2E200A; --bp-badge-critical-border:#74521A; --bp-badge-critical-glyph:#F6BC69;
    --bp-badge-negative-top:#45202A; --bp-badge-negative-bottom:#35161D; --bp-badge-negative-border:#82353D; --bp-badge-negative-glyph:#FF9393;
    --bp-badge-neutral-top:#2A3542;  --bp-badge-neutral-bottom:#202A35; --bp-badge-neutral-border:#435163; --bp-badge-neutral-glyph:#B5C1CE;
    --bp-badge-attested-top:#30284F; --bp-badge-attested-bottom:#251E3E; --bp-badge-attested-border:#56478A; --bp-badge-attested-glyph:#C3B0FF;
    --bp-focus:#F0AB00; --bp-focus-edge:#0B1118; --bp-focus-gap:#19212B;
    --bp-toast-bg:#E9EFF6; --bp-toast-text:#15263A; --bp-toast-muted:#43566C; --bp-toast-link:#0B62BD;
    --bp-elev-1:0 1px 2px rgba(0,0,0,.40);
    --bp-elev-2:0 1px 2px rgba(0,0,0,.35),0 3px 8px rgba(0,0,0,.30);
    --bp-elev-3:0 2px 6px rgba(0,0,0,.35),0 10px 28px rgba(0,0,0,.40);
    --bp-elev-4:0 4px 12px rgba(0,0,0,.40),0 22px 56px rgba(0,0,0,.55);
    --bp-tile-edge:#0E141B;
}

@media (min-width:720px){ :root{ --bp-gutter:24px; } }

/* Reduced motion: no lift, no press travel, near-instant transitions. Components also stop
   shimmer, slide and spin animations under the same query (components.css). */
@media (prefers-reduced-motion:reduce){
  :root{ --bp-lift:0px; --bp-press:0px; --bp-dur-press:1ms; --bp-dur-fast:1ms; --bp-dur-base:1ms; --bp-dur-slow:1ms; }
}
}
