/* Factory International brand tokens (from "01 Guidelines_3rd party 2 1.pdf").
   Gräbenbach is only used once the client confirms a web licence: the app adds
   class "brand-fonts" to <html> when BRAND_FONTS=on. Until then: Arial, the
   guideline's approved system font. */

@font-face { font-family: "Graebenbach Mono"; src: url("/fonts/GraebenbachMono-Bold.woff2") format("woff2"), url("/fonts/GraebenbachMono-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Graebenbach Mono"; src: url("/fonts/GraebenbachMono-Regular.woff2") format("woff2"), url("/fonts/GraebenbachMono-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Graebenbach"; src: url("/fonts/Graebenbach-Regular.woff2") format("woff2"), url("/fonts/Graebenbach-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Graebenbach"; src: url("/fonts/Graebenbach-Bold.woff2") format("woff2"), url("/fonts/Graebenbach-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Graebenbach"; src: url("/fonts/Graebenbach-RegularItalic.woff2") format("woff2"), url("/fonts/Graebenbach-RegularItalic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  /* Colour: black and white, plus two brand colours.
     Machine Green = actions, selection, progress, "correct". #FFE500 = bees only. */
  --black: #000000;
  --white: #FFFFFF;
  --off-white: #F5F5F3;
  --paper: #F8F6EF;     /* warm off-white for reading: quiz panel and answers */
  --rule: #D4D4D0;       /* hairlines on white */
  --grey: #595959;       /* 7:1 on white */
  --green: #00CF9E;      /* Machine Green: fills behind black text, never as text on white */
  --green-25: #BFF3E7;
  --green-5: #F2FCFA;
  --honey: #FFE500;      /* bees only */
  --honey-25: #FFF8BF;
  --honeycomb-background: var(--honey-25) url("/img/honeycomb.svg") repeat 0 0 / 576px 332.554px;
  --coral: #FF6954;      /* Column Coral: game actions and highlights */
  --coral-25: #FFD9D4;
  --coral-5: #FFF8F6;
  --black-25: #BFBFBF;
  --black-5: #F2F2F2;
  --line: #000000;

  /* 8px spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  /* Type scale (1.25) */
  --t-xs: .8125rem; --t-s: .9375rem; --t-m: 1.0625rem; --t-l: 1.25rem; --t-xl: 1.5625rem; --t-2xl: 2rem; --t-3xl: clamp(2rem, 3.6vw, 2.75rem);

  --font-head: Arial, Helvetica, sans-serif;  /* fallback: Arial Bold caps */
  --font-mono: Arial, Helvetica, sans-serif;
  --font-body: Arial, Helvetica, sans-serif;
  --head-track: -0.02em;
}
html.brand-fonts {
  --font-head: "Graebenbach Mono", Arial, sans-serif;  /* Mono Bold caps on web */
  --font-mono: "Graebenbach Mono", Arial, sans-serif;
  --font-body: "Graebenbach", Arial, sans-serif;
  --head-track: -0.03em;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--black); font-family: var(--font-body); font-size: var(--t-m); line-height: 1.45; text-align: left; }

/* Headings: Mono caps, tight tracking, 25 characters a line at most */
h1, h2, h3, .head {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  letter-spacing: var(--head-track); line-height: 1; margin: 0; max-width: 25ch; text-wrap: balance;
}
.mono, .cta, .label { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .02em; }
p { margin: 0 0 var(--s4); line-height: 1.45; max-width: 62ch; }

a { color: var(--black); text-underline-offset: 3px; }

/* Buttons: Mono caps calls to action. Primary is black; it turns Column Coral on hover. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: 0 var(--s5); border: 2px solid var(--black); border-radius: 0;
  background: var(--white); color: var(--black); font: 400 var(--t-s)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .04em;
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--off-white); }
.btn.primary { background: var(--black); color: var(--white); }
.btn.primary:hover { background: var(--coral); color: var(--black); }
.btn.dark { background: var(--black); color: var(--white); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; box-shadow: 0 0 0 6px var(--coral); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--black); color: var(--white); padding: 10px 14px; z-index: 100; }
.skip:focus { top: 8px; }

/* Partner logo: the Factory International "Third Party Use" version (public/img). Its SVG already
   includes the exclusion zone (1/5 of the logo width on every side), so the slot adds no margin.
   Shown at least 98px wide, which keeps the logo itself at its 70px minimum. Never over busy graphics. */
.logo-slot { display: block; width: var(--logo-w, 120px); min-width: 98px; flex: none; }
.logo-slot img { display: block; width: 100%; height: auto; }
.logo-slot:not(:has(img)) { display: none; }

/* Reduced motion (OS setting):
   switch animations off rather than pausing them, so nothing is left frozen on its first,
   invisible frame. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
