/*
  BASE theme: type, space, radii, shadows and motion. The locked palette
  (frame, status, door colours and tints) lives in design-tokens.css, which
  this file loads first. Screens use the tokens. Generated PDFs read both
  files through base_site/theme.py.

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

@import url("design-tokens.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"); }
@font-face { font-family: "League Spartan"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/league-spartan/LeagueSpartan-ExtraBold.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-weight: 200 800; font-style: normal; font-display: swap; src: url("fonts/manrope/Manrope-Variable-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-weight: 200 800; font-style: normal; font-display: swap; src: url("fonts/manrope/Manrope-Variable-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* A deeper Navy for panels and button hover. The locked Navy is --navy in design-tokens.css. */
  --navy-panel: #1E345A;
  /* Light grey on Navy (9.0:1). Never on Medium Blue. */
  --on-navy-soft: #C7D0DC;
  --line: #E4E6E4;

  /* Item states */
  --state-outstanding: #525258;
  --state-submitted: #3A73C1;
  --state-returned: #B5442A;
  --state-received: #2E7D5B;
  /* Item card tints (guide version 4, 6 October 2026): each item card is tinted with its state colour.
     WCAG 2.1 AA: Ink on every tint 6.4:1 or better, Navy 11.7:1 or better. Medium Blue falls short (4.0:1),
     so links and small controls on tinted cards are Navy. */
  --tint-outstanding: #EAEAEB;
  --tint-submitted: #E7EEF8;
  --tint-returned: #F6E9E5;
  --tint-received: #E6EFEB;
  /* Not applicable: fine diagonal stripes of white and this grey, distinct from Outstanding. Ink 6.6:1. */
  --tint-not-applicable: #EFF0EF;

  /* Meaning colours (BASE Colour and Brand System, section 3, approved by Tim 11 October 2026): the same meaning in every
     door, as general names for the item state colours. Red is the only attention colour. */
  --attention: var(--state-returned);
  --attention-soft: var(--tint-returned);
  --done: var(--state-received);
  --in-progress: var(--state-submitted);
  --waiting: var(--state-outstanding);

  /* Door colours are in design-tokens.css (locked 16 October 2026). Identity only.
     In a module the door colour is the 6px stripe under the Navy header, the active tab underline, the icons and the
     chart accent. On the hub it is the card outline, the 7 percent tint, the icon and the spoke. Never a button, a
     status or a rank. Chip text is white on the door colour, except Advantage (Gold on Navy, 6.3:1). Gold on white is
     2.2:1, so Advantage wording is Navy. */
  /* Teal is reserved for a later door, chosen with Tim; no one improvises a new colour. */
  --door-reserved: #0D9488;
  --door-reserved-chip: #0F766E;
  --door-reserved-tint: #E7F4F3;
  /* The spine (the hub, staff, settings, and any page that belongs to no door): Navy, with Mist for its tint. */
  --door-spine: var(--navy);
  --door-spine-tint: var(--mist);
  /* The door icon in its circle (D-283): in the header chip, on the hub tile, on the door's heading band and on an empty
     list. The icon fills this share of its circle. */
  --door-icon-chip: 20px;
  --door-icon-tile: 32px;
  --door-icon-band: 56px;
  --door-icon-empty: 48px;
  --door-icon-glyph: 60%;
  /* Cyan celebrates (delivery beads, milestones, the live signal, the BASE line). It is not a button fill. */
  --rule-base-line: 4px;

  /* The hub (R36, Tim, 16 October 2026). The stage is a centred square, about 1000px at 1440px wide.
     Below --breakpoint-hub-list the orbit becomes a list. 860px is written as a number in base.css. */
  --width-hub: 1440px;
  --breakpoint-wide: 1280px;
  --breakpoint-hub-list: 860px;
  --size-wordmark: 32px;
  --size-wordmark-lockup: 56px;
  --size-lockup-name: 22px;
  --wordmark-letter-spacing: 0.1em;
  --size-hub-greeting: 32px;
  --size-hub-lead: 18px;
  --size-hub-figure: 24px;
  --size-hub-number: 40px;
  --hub-wordmark-letter-spacing: var(--wordmark-letter-spacing);
  --hub-card-outline: 1.5px;
  --hub-card-radius: 12px;
  --radius-hub-panel: 22px;
  --shadow-hub-panel: 0 12px 30px rgba(27, 43, 75, .06);
  /* A centred square. At 1440 the orbit ring is about 940px across. Corner lanes keep milestones off the cards. */
  --size-hub-stage: 1000px;
  --size-hub-corner: 190px;
  --size-hub-card: 180px;
  --size-hub-group: 16px;
  --size-hub-centre-mark: 72px;
  /* Phone ring: the centre column has to stay inside the navy disc. These are the floors. */
  --size-hub-centre-mark-narrow: 28px;
  --size-hub-wordmark-narrow: 16px;
  --size-hub-number-narrow: 22px;
  --size-hub-label-narrow: 11px;
  --size-hub-centre-width: 26%;
  --size-hub-centre-width-narrow: 38%;
  --hub-ring-phone-scale: 1.6;
  --letter-spacing-none: 0;
  --size-signin-mark: 160px;
  /* The Glow room (hub build notes 4.2 and 4.3; D24, approved by Tim on 19 October 2026). The sign-in page sits in it, with
     the neon Built Smart mark at the Kindling stage. Ember, flame and white-hot are the neon's gradient. The warm light is a
     soft radial glow behind the mark. White on the room is 17:1. These are the Glow's own values from click-through
     version 14; the hub's four stages add theirs beside them. */
  --glow-room: #0B1424;
  --glow-ember: #F97316;
  --glow-flame: #FBBF24;
  --glow-white-hot: #FDE68A;
  --glow-light-warm: rgba(251, 191, 36, .30);
  --glow-light-edge: rgba(249, 115, 22, .12);
  --glow-light-clear: rgba(11, 20, 36, 0);
  --glow-trust-band: rgba(27, 43, 75, .55);
  --glow-rule: rgba(255, 255, 255, .12);
  --motion-neon-flicker: 3.1s;
  /* The neon's layer strengths (ember, gold, door colours, lit windows) and the fire at each of its four stages (hub build
     notes 4.3(6); the GL table of click-through version 13): the room, its text, the light's size and strength and its three
     colours, the core's size, the disc and its ring, the rays, the sparks and the door lines. The red at Coal is ember, not a
     warning. Text is light on the dark stages and Navy on Neon sun. */
  --glow-coal-room: #0B1424;
  --glow-coal-ink: #E6EDF7;
  --glow-coal-light: 420px;
  --glow-coal-light-alpha: 0.9;
  --glow-coal-c1: rgba(194, 65, 12, .55);
  --glow-coal-c2: rgba(127, 29, 29, .28);
  --glow-coal-c3: rgba(127, 29, 29, .08);
  --glow-coal-core: 0.9;
  --glow-coal-disc: #140B08;
  --glow-coal-ring: #3A1A10;
  --glow-coal-ember: 1;
  --glow-coal-gold: 0;
  --glow-coal-colour: 0;
  --glow-coal-windows: .25;
  --glow-coal-rays: 0;
  --glow-coal-sparks: 0;
  --glow-coal-lines: .35;
  --glow-kindling-room: #14213A;
  --glow-kindling-ink: #F2F6FB;
  --glow-kindling-light: 760px;
  --glow-kindling-light-alpha: 0.95;
  --glow-kindling-c1: rgba(251, 191, 36, .6);
  --glow-kindling-c2: rgba(249, 115, 22, .3);
  --glow-kindling-c3: rgba(249, 115, 22, .08);
  --glow-kindling-core: 1;
  --glow-kindling-disc: #1B1410;
  --glow-kindling-ring: #7A3B12;
  --glow-kindling-ember: .5;
  --glow-kindling-gold: 1;
  --glow-kindling-colour: .25;
  --glow-kindling-windows: .7;
  --glow-kindling-rays: 0;
  --glow-kindling-sparks: .55;
  --glow-kindling-lines: .35;
  --glow-blaze-room: #2A3F66;
  --glow-blaze-ink: #FFFFFF;
  --glow-blaze-light: 1300px;
  --glow-blaze-light-alpha: 1;
  --glow-blaze-c1: rgba(255, 247, 214, .95);
  --glow-blaze-c2: rgba(251, 191, 36, .45);
  --glow-blaze-c3: rgba(0, 173, 239, .18);
  --glow-blaze-core: 1.1;
  --glow-blaze-disc: #1B2B4B;
  --glow-blaze-ring: #FBBF24;
  --glow-blaze-ember: 0;
  --glow-blaze-gold: .6;
  --glow-blaze-colour: .8;
  --glow-blaze-windows: 1;
  --glow-blaze-rays: .45;
  --glow-blaze-sparks: 1;
  --glow-blaze-lines: .35;
  --glow-neon-sun-room: #EEF4FB;
  --glow-neon-sun-ink: #1B2B4B;
  --glow-neon-sun-light: 2400px;
  --glow-neon-sun-light-alpha: 1;
  --glow-neon-sun-c1: rgba(255, 255, 255, 1);
  --glow-neon-sun-c2: rgba(255, 250, 230, .95);
  --glow-neon-sun-c3: rgba(127, 211, 245, .45);
  --glow-neon-sun-core: 1.25;
  --glow-neon-sun-disc: #FFFFFF;
  --glow-neon-sun-ring: #00ADEF;
  --glow-neon-sun-ember: 0;
  --glow-neon-sun-gold: .25;
  --glow-neon-sun-colour: 1;
  --glow-neon-sun-windows: 1;
  --glow-neon-sun-rays: 1;
  --glow-neon-sun-sparks: .7;
  --glow-neon-sun-lines: .5;
  /* The ember gradient, the door lines' bead ring and glows, the stream colours, and the motion. */
  --glow-ember-dark: #7F1D1D;
  --glow-ember-mid: #C2410C;
  --glow-ray-white: rgba(255, 255, 255, .95);
  --glow-ray-cyan: rgba(127, 211, 245, .45);
  --glow-ray-clear: rgba(0, 173, 239, 0);
  --glow-stream-in-start: rgba(82, 82, 88, .15);
  --glow-stream-in-end: rgba(251, 191, 36, .75);
  --glow-stream-out-start: rgba(0, 173, 239, .85);
  --glow-stream-out-end: rgba(0, 173, 239, .2);
  --glow-bead-in-glow: rgba(251, 191, 36, .6);
  --glow-bead-out-glow: rgba(0, 173, 239, .6);
  --glow-text-shadow-dark: 0 1px 8px rgba(0, 0, 0, .5);
  --glow-lines-dim: .12;
  --glow-doors-dim: .35;
  --glow-milestone-glow: rgba(251, 191, 36, .45);
  --glow-live-ring: rgba(0, 173, 239, .25);
  --glow-chip-edge: #DCE4F0;
  --glow-door-shadow: rgba(0, 0, 0, .25);
  --motion-glow-stage: 1.4s;
  --motion-glow-flicker: 3.1s;
  --motion-glow-rays: 120s;
  --motion-glow-bead: 3.2s;
  --motion-glow-door-bead: 4.5s;
  --motion-glow-flash: 1.4s;
  --motion-glow-rise: -170px;
  --motion-glow-door-lift: -6px;
  /* The sparks' own timings and drift are multiples of these (static/base.css, the Glow's motion block). */
  --motion-glow-spark: 1s;
  --motion-glow-spark-drift: 1px;
  --size-glow-stage-width: 1440px;
  --size-glow-stage-height: 814px;
  --size-glow-drawing-height: 900px;
  --size-glow-greeting: 44px;
  --size-glow-week: 20px;
  --size-glow-flow: 96px;
  --size-glow-flow-kick: 13px;
  --size-glow-flow-sub: 15px;
  --size-glow-door: 84px;
  --size-glow-door-icon: 38px;
  --size-glow-door-name: 18px;
  --width-glow-door: 150px;
  --width-glow-flow: 190px;
  --width-glow-bubble: 220px;
  --size-glow-bead: 14px;
  --size-glow-bead-flash: 20px;
  --size-glow-outdot: 18px;
  --size-glow-chip-kick: 12px;
  --size-glow-star: 28px;
  --size-glow-star-icon: 16px;
  --neon-flicker-1: .9;
  --neon-flicker-2: .97;
  --neon-flicker-3: .86;
  --neon-flicker-4: .93;
  /* The sign-in page sizes (version 14). The button is taller than --control-primary. */
  --size-signin-neon: 180px;
  --size-signin-neon-compact: 120px;
  --size-signin-wordmark: 60px;
  --size-signin-wordmark-compact: 48px;
  --size-signin-full-name: 24px;
  --size-signin-full-name-compact: 20px;
  --size-signin-heading: 38px;
  --size-signin-heading-compact: 34px;
  --size-signin-lead: 20px;
  --size-signin-lead-compact: 18px;
  --size-signin-button: 22px;
  --size-signin-button-compact: 19px;
  --size-signin-help: 18px;
  --size-signin-g: 46px;
  --size-signin-g-glyph: 24px;
  --control-signin: 64px;
  --width-signin-card: 560px;
  --radius-signin-card: 22px;
  --size-trust: 17px;
  --size-trust-dot: 10px;
  --width-trust: 1360px;
  --size-hub-tile: 160px;
  /* Spoke, week line, today tick and the today bar outline. Bar length is in the viewBox, not here. */
  --hub-dot-stroke: 1.5px;
  /* One mark travels each spoke. The halo breathes. Today's bar grows once when work arrives.
     Just now changes every 4s. A real event shortens the flow for a moment. */
  --motion-hub-flow: 3.6s;
  --motion-hub-flow-live: 0.9s;
  --motion-hub-halo: 3.6s;
  --motion-hub-stream: 4s;
  --motion-hub-arrive: 1.2s;

  /* Typography. --font-display and --font-body are in design-tokens.css.
     --font-brand follows the display face so the favicon and older callers keep League Spartan. */
  --font-brand: var(--font-display);
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;
  --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: 32px;
  --size-section-heading: 24px;
  --size-subsection: 20px;
  --size-card-title: 18px;
  /* Body text is at least 16px so a first-time reader can use it (Tim, 16 October 2026). */
  --size-body: 16px;
  --size-small: 16px;
  --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: 1680px; /* V75 (finalised mock-up, 19 October 2026): staff pages use the whole screen, up to 1680px. */
  --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;
  /* Gentle motion on staff screens (D-280, Tim's design idea 4, 11 October 2026). Used only inside
     @media (prefers-reduced-motion: no-preference), so nothing moves for anyone who has reduced motion set. The lift is
     how far a door tile rises on hover; the fade is the page's opacity on load. Never on client portal pages. */
  --motion-lift: 2px;
  --motion-fade-in: 200ms;
  /* The all clear moment on the hub (D-280, Tim's design idea 2): the circle-check tick, Cyan stroke beside Navy words.
     Decorative (the words carry the meaning), so the Cyan stroke is not relied on for contrast. */
  --size-all-clear-icon: 40px;

  /* 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;
  /* A primary button is at least this tall. Other tap targets stay at --touch-target. */
  --control-primary: 48px;
  --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;

  /* Endorsement stamps (Stamp brief revision 3, R4 and R5): fixed physical size whatever the sheet size, in a corner
     8mm inside the page edges. S1 no larger than 55mm by 22mm (155pt by 62pt); S2 no larger than 65mm by 30mm (184pt by
     85pt). League Spartan, Navy text, white box at 90 percent opacity, 1pt Cyan border. */
  --stamp-s1-width: 155pt;
  --stamp-s1-height: 62pt;
  --stamp-s2-width: 184pt;
  --stamp-s2-height: 85pt;
  --stamp-inset: 22.7pt;
  --stamp-gap: 4pt;
  --stamp-padding: 4pt;
  --stamp-border: 1pt;
  --stamp-fill-opacity: 0.9;
  /* Not-live watermark on a generated PDF (not-live switch, Tim, 15 October 2026). Screens do not fade text. */
  --not-live-mark-opacity: 0.18;
  --stamp-size-text: 5.5pt;
  --stamp-size-text-min: 4pt;

  /* 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;

  /* The hub ribbon and My work (version 14; hub build notes 4.4(0); V103 to V106). Q13 (EUI-033): the 44px wordmark.
     The page is as wide as the doors' pages (1680) with 16px gutters, two columns from 1100px. The dark band is the Glow
     room with a logo blue light at its left. Overdue and attention tints carry the status colours' meaning on My work's rows
     (never on the hub); the 44px wordmark and the two tints are the spine's (S02). The dark band uses the Glow room colour, set with the sign-in page's Glow tokens. */
  --size-ribbon-name: 20px;
  --width-ribbon-name: 210px;
  --width-mywork-band-sub: 260px;
  --size-ribbon-tab: 18px;
  --size-ribbon-tab-icon: 22px;
  --size-logo-tile: 52px;
  --size-logo-tile-mark: 38px;
  --ribbon-divider: rgba(255, 255, 255, .45);
  --width-avatar-panel: 300px;
  --shadow-avatar-panel: 0 12px 32px rgba(27, 43, 75, .22);
  --width-mywork: 1680px;
  --width-mywork-rail: 420px;
  --width-mywork-search: 620px;
  --size-mywork-title: 40px;
  --size-mywork-figure: 56px;
  --size-mywork-ring: 72px;
  --size-mywork-ring-icon: 34px;
  --size-mini-glow: 84px;
  --size-mywork-task: 18px;
  --size-mywork-chip-icon: 18px;
  --width-mywork-track: 220px;
  --size-mywork-bead: 12px;
  --on-glow: #E6EDF7;
  --on-glow-soft: #B9C6D8;
  --mywork-band-light: rgba(58, 115, 193, .55);
  --mywork-band-clear: rgba(58, 115, 193, 0);
  --mywork-figure-hover: rgba(255, 255, 255, .08);
  --mywork-track-start: rgba(230, 237, 247, .10);
  --mywork-track-end: rgba(230, 237, 247, .38);
  --mywork-tinted: #EEF3FA;
  --cyan-wash: rgba(0, 173, 239, .07);
  /* Spine screen patterns (S02; Q13 approved by Tim on 19 October 2026, EUI-033; N14). The module ribbon's 44px wordmark and
     30px module name; the two lighter Certification teals for inspection types (Navy text only, each type keeps its word
     label); the row tints rose (overdue) and warm yellow (due soon), Navy text on both. My work (#163) sets the wordmark size
     and the two row tints with the same values; whichever merges second keeps one copy. */
  --size-wordmark-ribbon: 44px;
  --size-module-name: 30px;
  --inspection-teal-1: #D3E9EB;
  --inspection-teal-2: #E2F0F1;
  --tint-overdue: #FBE3E3;
  --tint-attention: #FDF1D8;
  --size-spine-logo-tile: 52px;
  --size-spine-logo-mark: 38px;
  --size-spine-ribbon-link: 18px;
  --size-record-number: 28px;
  --size-record-address: 20px;
  --size-progress-dot: 20px;
  --size-progress-dot-current: 28px;
  --size-progress-line: 4px;
  --size-box-top: 10px;
  --size-box-count: 40px;
  --height-box: 170px;
}

[data-surface="portal"] {
  --size-eyebrow: 14px;
  --size-page-heading: 32px;
  --size-section-heading: 26px;
  --size-card-title: 18px;
  /* Client-facing text is 18px (Tim, 16 October 2026). */
  --size-body: 18px;
  --size-small: 16px;
  --size-stat: 40px;
}
