/*
  BASE theme: the only place colours, fonts, sizes, spacing, radii, shadows
  and motion are defined. Values follow the BASE Brand and Interface Guide,
  version 3, 3 October 2026. Screens use these tokens directly; generated
  PDFs read them from this file (see base_site/theme.py).

  Media query breakpoints (640px, 940px) cannot use custom properties in
  CSS; they are recorded here as tokens and written as numbers only in the
  @media lines of base.css.
*/

@font-face { font-family: "League Spartan"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/league-spartan/LeagueSpartan-Regular.ttf") format("truetype"); }
@font-face { font-family: "League Spartan"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/league-spartan/LeagueSpartan-Medium.ttf") format("truetype"); }
@font-face { font-family: "League Spartan"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/league-spartan/LeagueSpartan-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "League Spartan"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/league-spartan/LeagueSpartan-Bold.ttf") format("truetype"); }

:root {
  /* Brand colours (guide section 2) */
  --navy: #1B2B4B;
  --navy-panel: #1E345A;
  --cyan: #00ADEF;
  --medium-blue: #3A73C1;
  /* --gold belongs to Built Smart Advantage and is deliberately not defined in BASE. */

  /* Neutrals */
  --ink: #525258;
  --ink-soft: #8D9094;
  --mist: #E8EDF5;
  --white: #FFFFFF;
  --paper: #F7F8F7;
  --line: #E4E6E4;

  /* Item states */
  --state-outstanding: #525258;
  --state-submitted: #3A73C1;
  --state-returned: #B5442A;
  --state-received: #2E7D5B;

  /* Typography (guide section 3) */
  --font-brand: "League Spartan", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --line-height-body: 1.6;
  --line-height-heading: 1.2;
  --eyebrow-letter-spacing: 0.04em;

  /* Type scale: staff screens (the portal scale overrides these below) */
  --size-eyebrow: 13px;
  --size-page-heading: 26px;
  --size-section-heading: 20px;
  --size-card-title: 16px;
  --size-body: 15px;
  --size-small: 13px;
  --size-stat: 36px;

  /* Spacing scale (guide section 4): all margins, padding and gaps */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Layout and detail (guide section 4) */
  --shadow-card: 0 8px 24px rgba(27, 43, 75, .08);
  --radius-card: 14px;
  --radius-pill: 999px;
  --radius-input: 10px;
  --width-staff: 1180px;
  --width-portal: 820px;
  --logo-header-height: 52px;
  --logo-header-height-phone: 40px;
  --logo-signin-width: 200px;
  --width-signin: 440px;
  --breakpoint-phone: 640px;
  --breakpoint-tablet: 940px;
  --motion-quick: 150ms;
  --motion-panel: 250ms;

  /* Lines, bars and outlines (guide section 5) */
  --hairline: 1px;
  --rule-header: 4px;
  --rule-section: 2px;
  --bar-accent: 5px;
  --outline: 2px;
  --focus-ring: 3px;
  --touch-target: 44px;
  --button-padding-y: 14px;
  --button-padding-x: 28px;

  /* Document style for generated PDFs (guide section 9): the BSS report
     style, printed on the letterhead. */
  --doc-callout-fill: #E7F4FD;
  --doc-size-eyebrow: 11pt;
  --doc-eyebrow-letter-spacing: 0.12em;
  --doc-size-title: 12pt;
  --doc-size-body: 10pt;
  --doc-line-height: 1.4;
  --doc-size-table: 9pt;
  --doc-size-section: 10pt;
  --doc-size-footer: 8pt;
  --doc-size-watermark: 54pt;
  --doc-rule: 1.5pt;
  --doc-callout-bar: 4pt;
  --doc-row-line: 1pt;
  --doc-cell-padding: 6pt;
  --doc-reason-column: 0.30;
  /* Certificates (Construction Certificate brief, section 5.2): label column about 35 percent of the table; signature
     image about 40mm wide (40mm = 113pt). */
  --doc-label-column: 0.35;
  --doc-signature-width: 113pt;

  /* Print margins: keep content clear of the letterhead artwork. */
  --pdf-margin-side: 42pt;
  --pdf-margin-top-first: 150pt;
  --pdf-margin-top: 60pt;
  --pdf-margin-bottom: 64pt;
}

[data-surface="portal"] {
  --size-eyebrow: 14px;
  --size-page-heading: 32px;
  --size-section-heading: 26px;
  --size-card-title: 18px;
  --size-body: 17px;
  --size-small: 14px;
  --size-stat: 40px;
}
