/* =============================================================
   RBC APT, Sophia's v1 medium fidelity: tokens (2026-11-20)
   Values come from the RIG variables in Sophia's RBC Items Figma file
   (Case Study page, "Sophia Draft Medium Fidelity" section). Where a
   screen used a raw colour instead of a variable, it was sampled from
   that screen. Used by remakes/rbc-builder-v1.html.
   ============================================================= */

:root {
  /* ---------- Colour: RBC core and RIG roles ---------- */
  --rbc-dark-blue: #002750;         /* big headings: Financial Templates, Reorganize */
  --rbc-dark-blue-tint-1: #003168;  /* dashboard band, module headings, selected page */
  --rbc-blue: #0051a5;              /* selected template outline, button hover */
  --rbc-warm-yellow: #ffc72c;       /* heading rules, the Templates card's top edge */

  --interactive-1: #006ac3;         /* buttons, links, tabs, radios: 5.5:1 on white */
  --interactive-1-hover: #0051a5;
  --interactive-1-text: #ffffff;

  --text-default: #1f1f1f;
  --text-low-emphasis: #6f6f6f;     /* 5.0:1 on white, 4.8:1 on --background-2 */

  --border-1: #6f6f6f;              /* inputs, checkboxes, radios */
  --border-2: #dbdbdb;              /* side rail, segmented control */
  --border-3: #b3b3b3;              /* cards, pages, the fixed footer bar */
  --border-4: #e0e0e0;              /* dividers, table rows */
  --border-accordion: #e4e4e4;      /* the picker's topic lists */

  --background-1: #ffffff;
  --background-2: #fafafa;          /* page behind cards */
  --background-3: #f3f3f3;          /* template picker, right half */
  --background-pages: #e2e2e2;      /* the editor's page list */
  --component-bg-2: #edf7fc;        /* selected segment, a row you just saved */
  --component-bg-3: #f7fcff;        /* an open accordion */

  --success: #097b24;
  --done-mark: #585858;             /* the Successfully Saved check */
  --variable-highlight: rgb(98 184 67 / 0.5);  /* fields that change per client */

  --tag-draft: #456b86;             /* white text, 5.7:1 */
  --tag-personal: #567675;          /* white text, 4.95:1 */
  --tag-system: #8faebd;            /* ink text, 7.0:1 */
  --tag-team: #b5a977;              /* ink text, 7.0:1 */

  --icon-portfolio: #6595a9;        /* the briefcase in Document History: 3.3:1, an icon beside its label */
  --glyph-chart: #5aa7d6;           /* section card glyphs, by type */
  --glyph-table: #b48fd3;
  --glyph-text: #adba3c;
  --glyph-cell: #e8e8e8;
  --shadow-menu: 0 8px 24px rgb(0 0 0 / 0.12);

  --scrim: rgb(116 116 116 / 0.5);  /* behind the template picker */
  --hint: rgb(0 106 195 / 0.6);     /* prototype only: where you can click */

  /* Report palette, from the report pages in the picker */
  --report-navy: #0c2a4f;
  --report-taupe: #4f4a3d;
  --report-rust: #8b3a26;
  --report-olive: #6b6f2f;
  --report-sand: #9b937b;
  --report-gold: #d4c43c;
  --report-umber: #4c4430;
  --report-cobalt: #1f3fae;

  /* ---------- Type ---------- */
  /* RBC Display is RBC's own face. It's asked for by name, so it shows where
     it's installed; elsewhere Fira Sans stands in. Roboto is RIG's text face. */
  --font-text: Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "RBC Display", "RBC MS Display", "Fira Sans", Roboto, sans-serif;
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;

  --type-2xs: 11px;  --leading-2xs: 12px;   /* report fine print */
  --type-xs: 12px;   --leading-xs: 16px;    /* tags, Type: Chart */
  --type-sm: 14px;   --leading-sm: 20px;    /* UI text, small buttons, table cells */
  --type-md: 16px;   --leading-md: 24px;    /* inputs, buttons, page headers */
  --type-heading-2xs: 18px; --leading-heading-2xs: 28px;  /* Table of Contents */
  --type-heading-xs: 20px;  --leading-heading-xs: 28px;   /* card titles */
  --type-heading-s: 22px;   --leading-heading-s: 28px;    /* picker groups, Successfully Saved note */
  --type-heading-m: 28px;   --leading-heading-m: 36px;    /* Reorganize, Add Sections */
  --type-heading-l: 30px;   --leading-heading-l: 36px;    /* Successfully Saved */
  --type-heading-2xl: 40px; --leading-heading-2xl: 48px;  /* APT Dashboard, Financial Templates */
  --tracking-heading-2xl: -0.65px;

  /* ---------- Space: RIG's scale ---------- */
  --space-5xs: 2px;
  --space-4xs: 4px;
  --space-3xs: 8px;
  --space-2xs: 12px;
  --space-xs: 16px;
  --space-s: 20px;
  --space-b: 24px;
  --space-m: 32px;
  --space-l: 40px;
  --space-xl: 48px;
  --space-2xl: 64px;

  /* ---------- Sizes ---------- */
  --rail-w: 64px;
  --header-h: 72px;
  --toolbar-h: 60px;
  --control-h: 48px;
  --control-h-sm: 36px;
  --target-touch: 44px;
  --icon-xs: 12px;        /* chevrons, the View All arrow, the grip */
  --icon-sm: 16px;
  --icon-md: 20px;
  --icon-toolbar: 23px;   /* hamburger, undo, redo in the editor toolbar */
  --icon-lg: 24px;
  --icon-done: 64px;      /* the Successfully Saved check */
  --logo-shield-h: 47px;
  --logo-type-h: 29px;
  --cover-logo-w: 206px;
  --cover-rule-w: 328px;
  --btn-min: 120px;
  --btn-wide: 160px;      /* Search, the picker's Save */
  --btn-dropdown: 180px;  /* General Editing */
  --seg-w: 200px;         /* Template Set Up | Client Batching */
  --card-head-h: 60px;
  --card-head-tall: 80px; /* the Templates card */
  --tab-h: 52px;
  --fixed-bar-h: 88px;
  --hero-h: 420px;        /* the dark blue band on the dashboard, header included */
  --hero-h-compact: 260px;
  --col-type: 241px;      /* Document History columns */
  --col-status: 120px;
  --col-date: 140px;
  --col-action: 74px;
  --textarea-h: 92px;
  --editable-min-h: 120px;
  --menu-max-h: 264px;
  --doc-w: 900px;         /* a page and its header row */
  --pie-w: 140px;         /* a pie chart in half a page row */
  --pages-w: 216px;       /* editor page list */
  --panel-w: 324px;       /* editor menu panel */
  --page-w: 852px;        /* a landscape report page at full size */
  --page-w-portrait: 640px;
  --form-w: 420px;        /* one form column */
  --picker-w: 1295px;
  --picker-left: 525px;
  --thumb-w: 289px;
  --rule-w: 63px;         /* the short yellow rule under big headings */
  --rule-w-md: 44px;      /* under Reorganize and Add Sections */
  --rule-w-sm: 32px;
  /* Breakpoints (media queries can't read tokens, so these are written out
     in the page): 1240px toolbar tightens and the page list folds away,
     900px panels stack, 640px phone. */

  /* ---------- Shape ---------- */
  --radius-0: 0;
  --radius-pill: 999px;
  --line: 1px;
  --line-strong: 2px;
  --line-select: 4px;
  --shadow-dialog: 0 24px 64px rgb(0 0 0 / 0.2);

  /* ---------- Motion ---------- */
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-flash: 900ms;  /* a block you just moved or added fades from light blue */
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root { --duration-base: 120ms; }
}
