/* Shared base for the Tab and TV screens: "broadcast graphics" on a lit stage.
   Three depth layers on every screen:
     1. atmosphere  (.backdrop: blue field, speed lines, backlit glow, slow light sweep)
     2. mid-ground  (.bg-slabs: angled slabs that slide to a new place for each screen)
     3. foreground  (slanted panels with elevation and an edge light)
   Colours and fonts come from tokens.css (the client's charter). No logos anywhere.
   Sizes are in rem: each page sets 1rem = 10 px of its reference layout, so everything scales with the screen.
   Motion uses transform and opacity only. */
@import url('/shared/tokens.css');

:root {
  --sk: -14deg;                 /* the one angle used everywhere */
  --tan: .2493;                 /* tan(14deg): how far a slanted edge moves sideways per unit of height */
  --r: .6rem;                   /* radius of upright (not slanted) surfaces */
  --edge: inset 0 1px 0 rgba(255, 255, 255, .32);                 /* edge light along the top of a panel */
  --elev: 0 2.6rem 4.2rem -2rem rgba(0, 4, 26, .95);              /* real elevation */
  --glow-blue: 0 0 6rem rgba(25, 83, 255, .55);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
/* Layout units. Screens are drawn on a fixed design canvas (Tab 1280 x 800 or 800 x 1280, TV 1920 x 1080) where 1rem = 10 px,
   and the whole canvas is scaled as one piece to fit the window, so the composition is identical at every window size.
   --vw / --vh are 1% of the canvas (not of the window). Backgrounds are oversized so they fill any space around the canvas. */
html { font-size: 10px; }
/* the canvas is larger than a small window before it is scaled: the page must never scroll to it (focusing a field would otherwise shift the screen) */
html:has(.canvas), html:has(.canvas) body { overflow: hidden; overflow: clip; }
:root { --vw: 1vw; --vh: 1vh; --vmax: 1vmax; }
.canvas { position: absolute; left: 50%; top: 50%; width: var(--cw); height: var(--ch); margin: calc(var(--ch) / -2) 0 0 calc(var(--cw) / -2);
  transform: scale(var(--s, 1)); transform-origin: 50% 50%;
  --vw: calc(var(--cw) / 100); --vh: calc(var(--ch) / 100); --vmax: calc(max(var(--cw), var(--ch)) / 100); }
/* full-width bars carry on past the canvas edge, sideways and (.down / .up) below or above */
.bleed { isolation: isolate; }
.bleed::before { content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; left: -300rem; right: -300rem; background: inherit; pointer-events: none; }
.bleed.down::after, .bleed.up::after { content: ''; position: absolute; z-index: -1; left: -300rem; right: -300rem; height: 200rem; pointer-events: none; }
.bleed.down::after { top: 100%; background: var(--space-blue); }
.bleed.up::after { bottom: 100%; background: #06185f; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1.8rem; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow: hidden; -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.num, .tnum { font-variant-numeric: tabular-nums lining-nums; font-feature-settings: 'tnum' 1, 'lnum' 1; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =====================================================================
   Layer 1 + 2: backdrop
   ===================================================================== */
.backdrop { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  --gx: calc(0 * var(--vw)); --wx: calc(0 * var(--vw)); --glx: calc(30 * var(--vw)); --gly: calc(40 * var(--vh)); }
.backdrop > * { position: absolute; }
.backdrop .bg-field { inset: -100%; background: linear-gradient(100deg, var(--space-blue) 0%, var(--michelin-blue) 40%, var(--indigo-blue) 100%); }
.backdrop .photo { inset: -3%; background-size: cover; background-position: center; opacity: 0; transition: opacity var(--d-5) var(--ease-out); }
.backdrop .photo.on { opacity: .5; }
/* speed lines: a field of slanted hairlines that drifts slowly */
.backdrop .bg-speed { left: calc(-20 * var(--vw)); top: -100%; width: calc(70 * var(--vw)); height: 300%; transform: skewX(var(--sk));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 60%, transparent); mask-image: linear-gradient(90deg, transparent, #000 25%, #000 60%, transparent); }
.backdrop .bg-speed::before { content: ''; position: absolute; inset: 0 -4.8rem 0 0; background: repeating-linear-gradient(90deg, rgba(181, 210, 244, .13) 0 .5rem, transparent .5rem 2.4rem); animation: speed 2.6s linear infinite; }
@keyframes speed { to { transform: translate3d(-2.4rem, 0, 0); } }
/* backlit glow: one soft Electric Blue light that sits behind the focal element of each screen and breathes */
.backdrop .bg-glow { left: 0; top: 0; width: calc(90 * var(--vmax)); height: calc(90 * var(--vmax)); margin: calc(-45 * var(--vmax)) 0 0 calc(-45 * var(--vmax)); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(25, 83, 255, .62), rgba(25, 83, 255, .22) 45%, rgba(25, 83, 255, 0) 72%);
  transform: translate3d(var(--glx), var(--gly), 0); transition: transform 900ms var(--ease-out); }
.backdrop .bg-glow::after { content: ''; position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(181, 210, 244, .3), transparent 70%); animation: breathe 5s var(--ease-in-out) infinite alternate; }
@keyframes breathe { from { opacity: .35; transform: scale(.9); } to { opacity: 1; transform: scale(1.08); } }
/* angled slabs */
.backdrop .sl { top: -100%; height: 300%; transform: translate3d(var(--gx), 0, 0) skewX(var(--sk)); transition: transform 760ms var(--ease-out), opacity 600ms var(--ease-out); will-change: transform; }
.backdrop .sl.s  { left: calc(45 * var(--vw)); width: calc(16 * var(--vw)); background: var(--space-blue); opacity: .72; }
.backdrop .sl.e2 { left: calc(59 * var(--vw)); width: calc(90 * var(--vw)); background: linear-gradient(100deg, var(--indigo-blue), #0a2cb8 40%, var(--michelin-blue)); box-shadow: -3rem 0 7rem rgba(0, 6, 40, .6); }
.backdrop .sl.e  { left: calc(50.5 * var(--vw)); width: calc(9 * var(--vw)); background: linear-gradient(180deg, var(--electric-blue), #0b36c9); box-shadow: -3rem 0 7rem rgba(0, 6, 40, .55), 0 0 7rem rgba(25, 83, 255, .5); }
.backdrop .sl.ln { left: calc(56.4 * var(--vw)); width: .3rem; background: #fff; opacity: .85; }
.backdrop .sl.y  { left: calc(57.5 * var(--vw)); width: .7rem; background: var(--cta); box-shadow: 0 0 2.4rem rgba(255, 255, 26, .55); }   /* yellow: a thin line only, on blue (charter p.26) */
.backdrop .sl.w  { left: calc(59 * var(--vw)); width: calc(90 * var(--vw)); background: linear-gradient(180deg, #0b2ea8 0%, #0a2796 36%, var(--michelin-blue) 52%, #020b3c 66%, var(--space-blue) 100%);   /* the navy stage the prize cut-outs stand on (the slab is 3x the screen height: the middle third shows) */
  box-shadow: -4rem 0 9rem rgba(0, 6, 40, .65), 0 0 12rem rgba(25, 83, 255, .55); transform: translate3d(var(--wx), 0, 0) skewX(var(--sk)); }
/* light sweep: a soft band of light crossing the whole stage now and then */
.backdrop .bg-sweep { top: -100%; left: calc(-40 * var(--vw)); width: calc(30 * var(--vw)); height: 300%; transform: translate3d(calc(-10 * var(--vw)), 0, 0) skewX(var(--sk)); opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1) 45%, rgba(255, 255, 255, .16) 50%, rgba(255, 255, 255, .1) 55%, transparent); mix-blend-mode: screen;
  animation: sweep 9s var(--ease-in-out) infinite; }
@keyframes sweep { 0% { transform: translate3d(calc(-10 * var(--vw)), 0, 0) skewX(var(--sk)); opacity: 0; } 8% { opacity: 1; } 38% { opacity: 1; } 46%, 100% { transform: translate3d(calc(190 * var(--vw)), 0, 0) skewX(var(--sk)); opacity: 0; } }
.backdrop .shade { inset: -100%; background: radial-gradient(calc(120 * var(--vw)) calc(100 * var(--vh)) at 50% 48.3%, transparent 55%, rgba(0, 6, 30, .6) 100%); }

/* portrait: the slabs become slanted bands across the screen */
@media (orientation: portrait) {
  :root { --sk: -8deg; --tan: .1405; }
  .backdrop { --gy: calc(0 * var(--vh)); --wy: calc(0 * var(--vh)); }
  .backdrop .sl.s, .backdrop .sl.e2, .backdrop .sl.e, .backdrop .sl.ln, .backdrop .sl.y, .backdrop .sl.w { left: -100%; width: 300%; transform: translate3d(0, var(--gy), 0) skewY(-7deg); }
  .backdrop .sl.s  { top: calc(46 * var(--vh)); height: calc(16 * var(--vh)); }
  .backdrop .sl.e2 { top: calc(59 * var(--vh)); height: calc(90 * var(--vh)); }
  .backdrop .sl.e  { top: calc(52 * var(--vh)); height: calc(5 * var(--vh)); }
  .backdrop .sl.ln { top: calc(56.4 * var(--vh)); height: .3rem; }
  .backdrop .sl.y  { top: calc(57.3 * var(--vh)); height: .7rem; }
  .backdrop .sl.w  { top: calc(59 * var(--vh)); height: calc(90 * var(--vh)); transform: translate3d(0, var(--wy), 0) skewY(-7deg); }
  .backdrop .bg-speed { width: calc(120 * var(--vw)); }
}

/* =====================================================================
   Layer 3: slanted panels (the frame is slanted, the content stays upright)
   ===================================================================== */
.pan { position: relative; display: block; transform: skewX(var(--sk)); }
.pan > .in { display: flex; align-items: center; height: 100%; transform: skewX(calc(var(--sk) * -1)); }
.pan.navy  { background: linear-gradient(180deg, #06185f, var(--space-blue)); box-shadow: var(--edge), var(--elev); }
.pan.white { background: linear-gradient(180deg, #fff, var(--off-white)); color: var(--michelin-blue); box-shadow: var(--elev), 0 0 3rem rgba(181, 210, 244, .35); }
.pan.elec  { background: linear-gradient(90deg, #1247ee, var(--electric-blue)); box-shadow: var(--edge), var(--elev), 0 0 3rem rgba(25, 83, 255, .5); }
.pan.glass { background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05)), rgba(0, 14, 56, .55);   /* navy under the glass keeps text at AA on any slab */ box-shadow: inset 0 0 0 1px rgba(181, 210, 244, .24), var(--edge), var(--elev); }
.pan.gold  { background: linear-gradient(90deg, #f1c35c, var(--gold) 50%, var(--gold-deep)); color: var(--space-blue); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), var(--elev), 0 0 5rem rgba(227, 171, 54, .45); }
.chip { display: inline-block; height: 4.2rem; padding: 0 2.2rem; }
.chip > .in { white-space: nowrap; }

/* eyebrow: small uppercase label in Noto Sans (never Bib in capitals) */
.eyebrow, .cap { font-family: var(--font-body); font-weight: 700; letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.eyebrow { color: var(--accent); }
.cap { color: var(--text-3); }
.pan.white .cap, .pan.white .eyebrow { color: var(--michelin-blue); }
.pts { color: var(--accent); }

/* icons (inline SVG, stroke = currentColor) */
.ic { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* live dot: a small yellow light */
.live-dot { position: relative; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--cta); flex: none; display: inline-block; box-shadow: 0 0 1.6rem rgba(255, 255, 26, .8); }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--cta); animation: live 2s var(--ease-out) infinite; }
.live-dot.off { background: var(--text-3); box-shadow: none; }
.live-dot.off::after { display: none; }
@keyframes live { from { transform: scale(1); opacity: .7; } to { transform: scale(3.4); opacity: 0; } }

/* buttons: a white slanted slab with a thin yellow line beside it (yellow stays on blue) */
.btn {
  appearance: none; border: 0; cursor: pointer; user-select: none; position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 1.6rem;
  min-height: 7.6rem; padding: 0 3.6rem;
  font-family: var(--font-display); font-weight: 700; font-size: 2.6rem;
  color: var(--michelin-blue); background: linear-gradient(180deg, #fff, var(--off-white));
  box-shadow: var(--elev), 0 0 4.5rem rgba(181, 210, 244, .5);
  transform: skewX(var(--sk)); transition: transform var(--d-1) var(--ease-out), opacity var(--d-2) var(--ease-out);
}
.btn > * { transform: skewX(calc(var(--sk) * -1)); }
.btn::before { content: ''; position: absolute; left: -1.5rem; top: 0; bottom: 0; width: .6rem; background: var(--cta); box-shadow: 0 0 1.8rem rgba(255, 255, 26, .6); }
.btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 30%, rgba(25, 83, 255, .18) 50%, transparent 70%); opacity: 0; transform: translate3d(-60%, 0, 0); }
.btn:hover { transform: skewX(var(--sk)) translate3d(0, -.2rem, 0); }
.btn:active { transform: skewX(var(--sk)) scale(.975); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .ic { font-size: 1.1em; stroke-width: 2.5; }
.btn.ghost { background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05)); color: var(--text); box-shadow: inset 0 0 0 1px rgba(181, 210, 244, .3), var(--edge); }
.btn.ghost::before { display: none; }
:focus-visible { outline: 3px solid var(--cta); outline-offset: 3px; }

/* =====================================================================
   Prize stage: product cut-outs on the navy stage, each with a glow behind it and a soft floor shadow.
   An image with transparency is shown as a cut-out; any other image is shown in a white card (common.js checks).
   ===================================================================== */
.pstage { position: absolute; inset: 0; color: #fff; pointer-events: none; }
/* each prize is a box placed by the page: product, floor shadow, then the label (place badge + name plate). They never share space. */
.pz { position: absolute; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; opacity: 0; transform: translate3d(0, 2rem, 0) scale(.96); }
.pz::before { content: ''; position: absolute; z-index: 0; left: -12%; right: -12%; top: -4%; bottom: 8%; background: radial-gradient(closest-side, rgba(86, 134, 255, .46), rgba(25, 83, 255, .17) 58%, transparent); pointer-events: none; }
.pz > * { position: relative; z-index: 1; }
.pz.p4, .pz.p5, .pz.p6, .pz.p7, .pz.p8, .pz.p9, .pz.p10 { display: none; }
.ready .pz, .pstage.ready .pz { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out) calc(150ms + var(--i, 0) * 160ms), transform 900ms var(--ease-out) calc(150ms + var(--i, 0) * 160ms); }
.pz-pic { position: relative; z-index: 2; flex: 1 1 0; min-height: 0; width: 100%; animation: floaty 6s var(--ease-in-out) infinite alternate; animation-delay: calc(var(--i, 0) * -1.7s); }
.pz-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 0 1.2rem rgba(120, 165, 255, .32)); transform: scale(var(--z, 1)); transform-origin: 50% 100%; opacity: 0; transition: opacity 400ms var(--ease-out); }
.pz.seen .pz-pic img { opacity: 1; }
/* an image without transparency: an identical white card for every such prize */
.pz.card::before { display: none; }
.pz.card .pz-pic { flex: none; width: var(--card, 20rem); height: var(--card, 20rem); max-width: 100%; margin-bottom: 1rem; background: #fff; border-radius: 1.6rem; box-shadow: var(--elev); animation: none; }
.pz.card .pz-pic img { inset: 9%; width: 82%; height: 82%; object-position: 50% 50%; filter: none; transform: none; animation: none !important; }
.pz.card .pz-floor { display: none; }
@keyframes floaty { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -.9rem, 0); } }
/* soft floor shadow under each product */
.pz-floor { position: relative; z-index: 1; flex: none; width: 78%; height: 3rem; margin-top: -1.5rem; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 3, 20, .9), rgba(0, 3, 20, .4) 55%, transparent); animation: floor 6s var(--ease-in-out) infinite alternate; animation-delay: calc(var(--i, 0) * -1.7s); }
@keyframes floor { from { transform: scale(1); opacity: 1; } to { transform: scale(.86); opacity: .7; } }
/* label: place badge, then the prize name on its own navy plate. One line always (common.js shrinks the text if a name is very long). */
.pz-tag { flex: none; align-self: center; display: flex; flex-direction: column; align-items: center; gap: .6rem; margin: 1rem 0 0; }
.pz-chip { display: inline-block; height: 3.8rem; padding: 0 1.6rem; transform: skewX(var(--sk)); background: linear-gradient(180deg, #fff, var(--off-white)); color: var(--michelin-blue); box-shadow: 0 1.2rem 2rem -1rem rgba(0, 4, 26, .7); }
.pz-chip b { display: flex; align-items: center; height: 100%; transform: skewX(calc(var(--sk) * -1)); font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; }
.pz.p1 .pz-chip { height: 5rem; padding: 0 2.2rem; background: linear-gradient(90deg, #f1c35c, var(--gold) 50%, var(--gold-deep)); color: var(--space-blue); box-shadow: 0 1.2rem 2rem -1rem rgba(0, 4, 26, .7), 0 0 3rem rgba(227, 171, 54, .5); }
.pz.p1 .pz-chip b { font-size: 3rem; }
.pz-name { display: block; flex: none; height: var(--plate-h, 3.2rem); padding: 0 1.4rem; transform: skewX(var(--sk)); background: linear-gradient(180deg, #0a2283, var(--space-blue)); color: #fff; box-shadow: inset 0 0 0 1px rgba(181, 210, 244, .5), 0 1rem 1.8rem -1rem rgba(0, 4, 26, .65); }
.pz-name b { display: block; height: 100%; transform: skewX(calc(var(--sk) * -1)); font-family: var(--font-body); font-weight: 700; font-size: var(--plate-fs, 1.5rem); line-height: var(--plate-h, 3.2rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (prefers-reduced-motion: reduce) {
  .backdrop .bg-speed::before, .backdrop .bg-glow::after, .backdrop .bg-sweep, .live-dot::after, .pz-pic, .pz-floor { animation: none; }
  .backdrop .bg-sweep { opacity: 0; }
  .backdrop .sl, .backdrop .bg-glow { transition: none; }
  .pz { opacity: 1; transform: none; transition: none; }
}

/* Reduced motion (device setting): nothing moves. Animations jump to their end state and only fades are left. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-property: opacity, visibility, color, background-color !important; }
  .backdrop .bg-sweep, .sheen, .ov-sweep, .auto-bar { display: none !important; }
}

/* "Reduce effects for slower devices" (Admin > Settings > Display): html.lite is set live from the config.
   Off: speed lines, light sweeps, floating prizes, blur, sliding slabs. Kept: fades and answer feedback. */
html.lite .backdrop .bg-speed, html.lite .backdrop .bg-sweep, html.lite .sheen, html.lite .ov-sweep { display: none !important; }
html.lite .backdrop .bg-glow::after, html.lite .live-dot::after, html.lite .pz-pic, html.lite .pz-floor, html.lite .pz-pic img { animation: none !important; }
html.lite .backdrop .sl, html.lite .backdrop .bg-glow { transition: none; will-change: auto; }
html.lite .pz-pic img { filter: none; }
html.lite .pz { transform: none; transition: opacity 500ms var(--ease-out); }
html.lite *, html.lite *::before, html.lite *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

/* ---------- Michelin logo (brand guidelines, July 2026, p.6-10) ----------
   - version: the white logo, "Alternative use: on dark backgrounds" (p.7); artwork unmodified, never recoloured, stretched or cropped (p.10)
   - background: its own flat Michelin Blue plate in the top right corner, so no stripe, pattern, photo or confetti is ever behind it (p.10 "Avoid busy backgrounds")
   - clear zone (p.9): the "M" of the wordmark on every side. The M is 20.5 % of the logo width = 38.5 % of its height; the plate keeps 40 % of the height (--cz) free on all four sides
   - minimum size (p.9): 50 px wide; the smallest use here is 56 px (phone quiz bar)
   --lh is the logo height, --mr the extra distance from the screen edge. The left edge leans at the angle used everywhere, outside the clear zone. */
.logo-plate { --lh: 7rem; --mr: 2.4rem; --cz: calc(var(--lh) * .4); position: absolute; z-index: 6; right: 0; top: 0; pointer-events: none;
  padding: var(--cz) calc(var(--cz) + var(--mr)) var(--cz) calc(var(--cz) + (var(--lh) + 2 * var(--cz)) * .25); }
.logo-plate::before { content: ''; position: absolute; left: 0; bottom: 0; right: -300rem; top: -300rem; background: var(--michelin-blue); transform-origin: 0 100%; transform: skewX(var(--sk)); }
.logo-plate img { position: relative; display: block; height: var(--lh); width: auto; max-width: calc(var(--lh) * 3.2); object-fit: contain; }

/* ---------- prize footnote: "* Prizes are subject to stock availability ..." (text from Admin, Settings, Prizes) ---------- */
.disc { margin: 0; font-family: var(--font-body); font-weight: 400; font-size: 2rem; line-height: 1.35; color: #fff; }
.disc[hidden] { display: none; }
