:root{
  /* Colour — six values, each with exactly one job */
  --ink:       #0E1A2B;  /* warm navy-black. Dark bands, headings, primary button */
  --ink-soft:  #1B2C42;  /* raised panels sitting on dark bands */
  --paper:     #FBFAF7;  /* page background — off-white exam paper, never grey */
  --chalk:     #FFFFFF;  /* cards */
  --marker:    #FFB53D;  /* highlighter amber — THE accent */
  --grade:     #0F7A63;  /* grade green — verified outcomes ONLY */
  --rule:      #E5E0D6;  /* warm hairline. Never a cold grey border */
  --slate:     #56616F;  /* secondary text */
  --slate-dim: #8A93A0;  /* metadata only. Never body copy — fails contrast */

  /* Type */
  --display: 'Bricolage Grotesque', Georgia, serif;
  --body:    'Public Sans', system-ui, -apple-system, sans-serif;
  --hand:    'Caveat', cursive; /* margin annotations only — the odd handwritten aside, never body copy */

  --t-hero: clamp(2.6rem, 5.2vw, 4.35rem);
  --t-h2:   clamp(1.85rem, 3.4vw, 2.9rem);
  --t-h3:   clamp(1.15rem, 1.6vw, 1.4rem);
  --t-lead: clamp(1.05rem, 1.3vw, 1.2rem);
  --t-body: 1.0125rem;
  --t-base: 1.0625rem; /* long-form prose (.article-entry), a notch above body */
  --t-sm:   0.9rem;
  --t-xs:   0.8125rem;

  /* Space */
  --s1:.25rem; --s2:.5rem;  --s3:.75rem; --s4:1rem;  --s5:1.5rem;
  --s6:2rem;   --s7:3rem;   --s8:4rem;   --s9:6rem;  --s10:8rem;

  /* Radius — three tiers, assigned by importance */
  --r-chip:  999px;
  --r-card:  14px;
  --r-frame: 22px;

  --shadow-card: 0 1px 2px rgba(14,26,43,.05), 0 8px 28px -12px rgba(14,26,43,.18);
  --shadow-lift: 0 2px 4px rgba(14,26,43,.06), 0 22px 50px -18px rgba(14,26,43,.28);

  /* Soft skeuomorphism — a dual light/dark shadow so a surface reads as
     gently raised off the paper rather than just "a card with a shadow".
     Light side uses --paper-hi, dark side the same --ink tint every other
     shadow uses. Only for the stage cards. */
  --shadow-soft:       -7px -7px 16px rgba(255,253,248,.8), 9px 10px 22px rgba(14,26,43,.12);
  --shadow-soft-hover: -8px -8px 18px rgba(255,253,248,.85), 11px 13px 27px rgba(14,26,43,.16);

  --wrap: 1220px;

  --z-header: 80;
  --z-mobile-nav: 200;

  /* --- Tier 2: derived surfaces. Every one is a shade of a tier-1 colour.
     Nothing outside these two tiers may appear as a raw hex in the CSS. --- */

  /* Text and surfaces sitting ON --ink */
  --on-ink-hi:     #FFFFFF;              /* headings and emphasis on any dark fill */
  --on-ink:        #EEF1F5;              /* primary text on dark bands */
  --on-ink-2:      #C3CEDB;              /* secondary text on dark bands */
  --on-ink-3:      #93A1B2;              /* metadata on dark bands */
  --on-ink-line:   rgba(255,255,255,.12);
  --on-ink-line-2: rgba(255,255,255,.22);
  --on-ink-fill:   rgba(255,255,255,.06);

  /* Warm neutral surfaces in the paper family */
  --paper-2:    #EDEAE3;   /* inert surfaces, image placeholders */
  --paper-3:    #F7F5F0;   /* recessed strips, card footers */
  --paper-hi:   #FFFDF8;   /* hover tint on paper */
  --rule-hard:  #D3CCBE;   /* emphasised hairline, card hover border */

  /* Marker family */
  --marker-deep: #C8801B;  /* the 3px offset shadow under amber buttons */
  --marker-wash: #FFF6E6;  /* board chip and icon tile fills */
  --marker-line: #D6CEBD;
  --marker-text: #7A5610;  /* legible amber-family text */

  /* Grade family — verified outcomes only */
  --grade-wash: #EAF7F3;
  --grade-line: #BDE0D6;

  /* Info family — safeguarding and DBS signals only */
  --info-wash: #EEF4FB;
  --info-line: #C9D8E8;
  --info-text: #1D4A7A;

  /* Danger family — form/validation errors only. New: nothing on the site
     used an error colour before this (the grade predictor borrowed marker
     for its one error message); this is the one new hue in this file. */
  --danger:      #B42318;
  --danger-wash: #FDECEA;

  /* Filled type-scale + line-height gaps (named, previously ad hoc) */
  --t-2xs:    .75rem;
  --lh-tight: 1.15;
  --lh-snug:  1.35;
  --lh-body:  1.6;

  /* Accessible form-control border — --rule is decorative-hairline
     contrast only; inputs need the higher bar. Not yet wired into any
     input — see the design-system merge notes. */
  --rule-input: #8C8270;

  /* Shared shadows pulled out of one-off page/section declarations */
  --shadow-inset-soft: inset 1px 1px 3px rgba(14, 26, 43, .05);
  --shadow-float:      0 6px 14px rgba(14, 26, 43, .25), 0 24px 48px -16px rgba(14, 26, 43, .4);
  --shadow-ring-grade: 0 0 0 4px rgba(15, 122, 99, .15);
  --shadow-hover-soft: 0 6px 20px rgba(14, 26, 43, .06);
  --shadow-glow-marker:0 4px 20px rgba(255, 181, 61, .12);
  --shadow-frame:      0 8px 24px rgba(27, 44, 66, .06);
  --shadow-panel:      0 4px 16px rgba(27, 44, 66, .04);

  /* ============================================================
     --tc-* BRIDGE — tutorconnect-design-system.css vocabulary,
     aliased onto the tokens above. Visual language is unchanged:
     every --tc-card-* stop below is flat (no gradient), and the
     amber hi/lo pair collapses to the one --marker the site uses.
     Write NEW code against --tc-* names if you like; nothing here
     is a duplicate value, only a second name for an existing one.
     ============================================================ */
  --tc-font:        var(--body);
  --tc-font-script: var(--hand);

  --tc-fs-xs:   var(--t-2xs);
  --tc-fs-sm:   var(--t-xs);
  --tc-fs-md:   var(--t-sm);
  --tc-fs-base: var(--t-body);
  --tc-fs-lg:   var(--t-lead);
  --tc-fs-xl:   var(--t-h3);
  --tc-fs-h3:   var(--t-h3);
  --tc-fs-h2:   var(--t-h2);
  --tc-fs-h1:   var(--t-hero);
  --tc-lh-tight: var(--lh-tight);
  --tc-lh-snug:  var(--lh-snug);
  --tc-lh-body:  var(--lh-body);

  --tc-page:    var(--paper);
  --tc-surface: var(--chalk);
  --tc-cream:   var(--paper-3);
  --tc-cream-2: var(--paper-2);
  --tc-line:    var(--rule);
  --tc-line-2:  var(--rule-hard);
  --tc-line-in: var(--rule-input);

  /* Flat by design — the source file's card gradient stops all
     collapse to one solid surface. */
  --tc-card-hi:  var(--chalk);
  --tc-card-mid: var(--chalk);
  --tc-card-lo:  var(--chalk);

  --tc-ink:   var(--ink);
  --tc-body:  var(--slate);
  --tc-quiet: var(--slate-dim);

  --tc-amber:      var(--marker);
  --tc-amber-hi:   var(--marker);
  --tc-amber-lo:   var(--marker);
  --tc-amber-deep: var(--marker-text);
  --tc-amber-press:var(--marker-deep);
  --tc-amber-ink:  var(--ink);
  --tc-amber-tint: var(--marker-wash);

  --tc-danger:      var(--danger);
  --tc-danger-tint: var(--danger-wash);
  --tc-success:      var(--grade);
  --tc-success-tint: var(--grade-wash);

  --tc-accent: var(--tc-amber-deep);
  --tc-tint:   var(--tc-cream-2);

  --tc-1:var(--s1); --tc-2:var(--s2); --tc-3:var(--s3); --tc-4:var(--s4); --tc-5:var(--s5);
  --tc-6:var(--s6); --tc-8:var(--s8); --tc-10:var(--s9); --tc-12:var(--s9); --tc-16:var(--s10);
  --tc-section: clamp(48px, 6vw, 88px);
  --tc-gutter:  1.15rem;
  --tc-max:     var(--wrap);

  --tc-r-sm:   10px;
  --tc-r-md:   var(--r-card);
  --tc-r-lg:   var(--r-card);
  --tc-r-xl:   var(--r-frame);
  --tc-r-pill: var(--r-chip);

  /* Depth — flattened. The source file's multi-layer emboss/press
     stack is deliberately not reproduced; these map to the site's
     existing two-tier shadow system instead. */
  --tc-emboss:  none;
  --tc-lift-1:  var(--shadow-card);
  --tc-lift-2:  var(--shadow-lift);
  --tc-lift-3:  var(--shadow-float);
  --tc-press:   var(--shadow-inset-soft);
  --tc-sunken:  var(--shadow-inset-soft);

  --tc-ease: cubic-bezier(.2, .7, .3, 1);
  --tc-fast: 90ms; --tc-base: 180ms; --tc-slow: 260ms;

  --tc-focus: var(--marker);
}

/* Phone reading sizes.
   The scale above was set for desktop: 1.0125rem body and 0.9rem small text
   read fine at arm's length on a laptop but are tight on a phone held closer,
   and most of this site is dense explanatory copy rather than headlines.
   Everything downstream is expressed in these tokens, so raising them here
   lifts body copy, card text, chips, notes and form labels together — about
   7% — without touching a single component. Headings already scale with the
   viewport through clamp(), so they are left alone. */
@media (max-width: 640px) {
  :root {
    --t-body: 1.0875rem;
    --t-base: 1.1375rem;
    --t-sm:   0.9625rem;
    --t-xs:   0.875rem;
    --t-2xs:  0.8125rem;
    --t-lead: clamp(1.125rem, 4vw, 1.2rem);
    --t-h3:   clamp(1.225rem, 4.4vw, 1.4rem);
  }
}
