/* AplyOne design system: tokens.
   The TIA / Insight One brand tokens, verbatim, plus the scales the audit asked for
   (one type scale with a 12px floor, one spacing scale, text-safe inks).
   Light theme only, by brand decision.

   Everything in site/ds sits in the cascade layer "ao". Layered rules lose to a page's own
   unlayered styles, so a page can link these files before it is fully ported: its legacy
   rules keep winning until they are deleted, then the system takes over. Several legacy
   pages define tokens with the same names and different values (app.html sets --bg to
   #f5f6fa), which is why this matters. */
@layer ao {
  :root{
    /* ---- TIA brand, verbatim ---- */
    --navy:#000064; --navy-soft:#1a1a7a; --navy-deep:#00003a; --navy-700:#2a2a86;
    --lightblue:#e6f2f7; --tint:#f0f1f8; --line:#e8e8f0;
    --ink:#14142b; --muted:#6b6b85; --faint:#9a9ab0;
    --success:#1f8f5c; --success-bg:#e7f5ee; --warning:#c97a00; --warning-bg:#fbf0db;
    --info:#1f66d9; --info-soft:#e6effb; --red:#ff0000; --red-soft:#ff2d2d;
    --cta:#0224ff; --cta-soft:#1f3cff; --quest:#4a4ab8; --bg:#ffffff; --alt:#f5f6fa;
    --font:'Raleway','Helvetica Neue',Arial,sans-serif;
    --display:'Poppins','Helvetica Neue',Arial,sans-serif;
    --mono:'IBM Plex Mono',ui-monospace,Menlo,monospace;
    --maxw:1440px; --r-card:16px; --r-thumb:14px; --r-btn:10px;
    --shadow:0 14px 36px rgba(0,0,70,0.09), 0 3px 10px rgba(0,0,70,0.05);
    --shadow-sm:0 6px 18px rgba(0,0,70,0.07);
    --shadow-navy:0 20px 48px rgba(0,0,80,0.30);
    --dur:240ms; --ease:cubic-bezier(0.2,0,0,1);

    /* ---- text-safe inks (phase 1 audit) ----
       --faint is 2.75:1 on white: borders, icons and disabled marks only, never text.
       Small red, green and amber text uses these instead of the bright accents. */
    --red-ink:#d00000;      /* 5.7:1 on white, 4.9:1 on --danger-bg. --red stays the accent and the red button. */
    --success-ink:#146c45;  /* 6.4:1 on white, 5.7:1 on --success-bg */
    --warning-ink:#8a5400;  /* 6.3:1 on white, 5.5:1 on --warning-bg */
    --danger-bg:#fde8e8;

    /* ---- navy surfaces: the hero tile and the home-page stage ---- */
    --hero:radial-gradient(120% 140% at 100% 0%, #16166e 0%, var(--navy) 42%, var(--navy-deep) 100%);
    --stage:radial-gradient(90% 70% at 50% 0%, #0b0b5a 0%, var(--navy-deep) 70%);
    --on-navy:#ffffff;
    --on-navy-2:rgba(255,255,255,0.80);  /* body copy on navy */
    --on-navy-3:rgba(255,255,255,0.62);  /* eyebrows and captions on navy, 6:1 or better */
    --on-navy-line:rgba(255,255,255,0.22);
    --on-navy-fill:rgba(255,255,255,0.10);
    --missed:#ff8f8f;                     /* closed / missed, readable on navy */

    /* ---- type scale: ten sizes, 12px floor ---- */
    --fs-12:12px;   /* eyebrows, stamps, captions. The floor. */
    --fs-14:14px;   /* secondary copy, labels */
    --fs-btn:14.5px;/* the brand button size, verbatim */
    --fs-16:16px;   /* body */
    --fs-18:18px;   /* lede, card titles */
    --fs-20:20px;   /* figures in cards */
    --fs-24:24px;   /* section headings on phones */
    --fs-30:30px;   /* big figures */
    --fs-h2:clamp(26px, 2vw + 20px, 38px);                 /* page and section headings */
    --fs-hero:clamp(36px, 2vw + 28px, 52px);               /* the brand hero header, verbatim */
    --fs-stage:clamp(44px, min(13vw, 14.5svh), 132px);     /* home-page scenes only */
    --lh-tight:1.04; --lh-snug:1.25; --lh-body:1.55;
    --track-tight:-0.03em; --track-snug:-0.01em; --track-caps:0.16em;

    /* ---- spacing scale: 4px steps ---- */
    --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:20px; --s-6:24px;
    --s-8:32px; --s-10:40px; --s-12:48px; --s-16:64px; --s-24:96px;

    /* ---- layout ---- */
    --wrap:1200px;          /* reading width; --maxw is the outer page limit */
    --gut:20px;             /* side gutter, widened by the safe area on notched phones */
    --tap:44px;             /* smallest tap target */
    --r-pill:999px;         /* fourth and last radius: status pills, avatars */
    --bar-h:56px;           /* app bar */
    --tabbar-h:60px;        /* phone tab bar, before the safe area */

    /* ---- motion ---- */
    --dur-slow:420ms;       /* entrances. Everything else is --dur. */
    --z-nav:50; --z-sheet:100; --z-toast:200;

    color-scheme:light;
  }
}
