/* Tour stage and HUD. Palette and font tokens come from ../styles/tokens.css: a pale header bar above the scene,
   the LHCb-blue control bar below it, white cards on the scene. */
:root{
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top,0px);
  padding-bottom:env(safe-area-inset-bottom,0px);
}
html{height:100%;scroll-padding-top:env(safe-area-inset-top,0px)}
*,*::before,*::after{box-sizing:inherit}
body{margin:0;height:100%;background:var(--stage-edge) var(--stage-bg) fixed;color:var(--text);font-family:var(--font);overflow:hidden;-webkit-font-smoothing:antialiased}
button{font:inherit;color:inherit}
button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}

/* the stage fills the window from the first paint (ui/hud.js layout() letterboxes it on very wide screens); the scene
   shows once its first frame is drawn (main.js sets html[data-scene=ready]), never a canvas still empty or half built */
#stage{position:absolute;left:50%;top:50%;width:100vw;height:100vh;transform:translate(-50%,-50%);overflow:hidden;background:var(--stage-bg)}
#gl{display:block;width:100%;height:100%;touch-action:none;transition:opacity .6s ease}
html:not([data-scene="ready"]) #gl{opacity:0}
/* and the header, the control bar and the HUD with it (the intro or the loading screen stands in for them) */
html[data-scene="loading"] #topbar,html[data-scene="loading"] #ctl,html[data-scene="loading"] #next,html[data-scene="loading"] #hud{visibility:hidden}
#hud{position:absolute;inset:0;pointer-events:none}
#leaders{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
/* leader lines from a card to the scene (ui/leader.js): the note cards', and explore's place card's a little bolder */
.lead-line{fill:none;stroke:var(--pale);stroke-width:1}
.lead-dot{fill:var(--pale)}
.lead-halo{fill:none;stroke:var(--pale);stroke-width:1}
.xleader .lead-line{stroke-width:1.2}

/* the header bar: the LHCb logo, on the tour the chapter and the time, and the link to the sources and credits */
#topbar{position:fixed;z-index:5;left:0;right:0;top:0;height:calc(var(--hdr) + var(--safe-top));padding:var(--safe-top) 18px 0;
  display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--pale);color:var(--ink);pointer-events:none}
#brand{display:flex;align-items:center;gap:10px;min-width:0;white-space:nowrap}
#brand .logo{height:calc(var(--hdr) - 14px);flex:none}
#brand small{font-size:15px;color:var(--dim);overflow:hidden;text-overflow:ellipsis}
/* the strip above everything on every copy but production, and on production while the site is a preview
   (ui/instance.js fills it: what this copy is, its version, on staging a link to the main site; tokens.css --devh
   gives it room, and what is fixed to the top starts below it);
   none in embed mode or in print. It lets taps through, but for its link. */
#devStrip{position:fixed;z-index:100;left:0;right:0;top:0;height:var(--safe-top);box-sizing:border-box;padding:env(safe-area-inset-top,0px) 12px 0;
  display:none;align-items:center;justify-content:center;gap:10px;background:var(--red);color:#fff;font-size:11px;font-weight:600;letter-spacing:.03em;
  line-height:1;white-space:nowrap;pointer-events:none}
:root[data-instance]:not([data-instance="production"]):not(.embed) #devStrip,:root[data-instance][data-preview]:not(.embed) #devStrip{display:flex}
#devStrip .ds-text{min-width:0;overflow:hidden;text-overflow:ellipsis}
#devStrip .ds-ver{flex:none;opacity:.85;font-weight:500;font-variant-numeric:tabular-nums}
#devStrip .ds-main{flex:none;color:inherit;text-decoration:underline;text-underline-offset:2px;pointer-events:auto}
#devStrip .ds-main:focus-visible{outline:2px solid #fff;outline-offset:1px}
@media (max-width:560px){#devStrip{justify-content:flex-start;gap:8px} #devStrip .ds-date{display:none}}
@media print{#devStrip{display:none!important}}
/* the DEV badge beside the logo on every copy but production (ui/instance.js), as on the DEV icons: a red pill */
.dev-badge{display:inline-block;flex:none;padding:3px 6px 2px;border-radius:5px;background:var(--red);color:var(--pale);
  font-family:var(--font);font-size:12px;font-weight:700;font-style:normal;letter-spacing:.08em;line-height:1;text-transform:none}
/* the header's end: the credits and the language (on the pale bar: blue outline, ink text) */
.top-end{display:flex;align-items:center;gap:14px;flex:none;min-width:0}
#topbar .lang-btn{pointer-events:auto;height:36px;border-color:var(--blue);color:var(--ink)}
#topbar .lang-btn:hover{background:var(--card)}
#topbar .lang-btn:focus-visible{outline-color:var(--focus)}
#meta{display:flex;align-items:baseline;gap:12px;min-width:0;text-align:end}
#chap{font-weight:600;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#tc{font-size:13.5px;color:var(--dim);font-variant-numeric:tabular-nums;white-space:nowrap}
[dir="rtl"] #tc{direction:ltr;text-align:left}
#meta{margin-inline-start:auto}
#credits{flex:none;max-width:45vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:var(--dim);
  text-underline-offset:2px;pointer-events:auto}
#credits:hover,#credits:focus-visible{color:var(--ink)}

/* note cards */
#hud .card{position:absolute;left:0;top:0;width:max-content;max-width:min(340px,44vw);padding:16px 18px 18px;
  background:var(--card);color:var(--text);border-radius:var(--r-card);box-shadow:var(--shadow);display:none;overflow-wrap:break-word}
#hud .card .min{position:absolute;top:10px;inset-inline-end:10px;width:32px;height:32px;border:1.5px solid var(--blue);border-radius:50%;background:transparent;color:var(--ink);
  font-size:18px;line-height:1;cursor:pointer;pointer-events:auto;display:grid;place-items:center}
#hud .card .min:hover{background:var(--pale)}
#hud .card h3{padding-inline-end:34px}
body.notes-min #hud .card{padding:8px 12px 9px 14px}
body.notes-min #hud .card p,body.notes-min #hud .card .stats{display:none}
body.notes-min #hud .card h3{margin:0;font-size:17px;padding-inline-end:34px}
body.notes-min #hud .card .min{top:4px;inset-inline-end:4px}
#hud .card h3{margin:0 0 6px;font-family:var(--font-display);font-style:italic;font-weight:600;font-synthesis:none;font-size:24px;line-height:1.12;color:var(--ink)}
#hud .card p{margin:0;font-size:15px;line-height:1.45;color:var(--text-long);max-width:36ch}
.stats{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:12px;padding:9px 12px;background:var(--pale);border-radius:var(--r-strip)}
.stat b{display:block;font-weight:600;font-size:22px;line-height:1.1;font-variant-numeric:tabular-nums;color:var(--ink)}
.stat span{display:block;font-size:12.5px;color:var(--dim)}
#hud .card.wide{max-width:min(560px,86vw)}
#hud .card.wide .stats{gap:6px 28px}
#hud .card.wide .stat b{font-size:30px}

#caption{position:absolute;inset-inline-start:18px;bottom:14px;font-size:13px;color:var(--on-blue-dim);display:none}
#caption i{display:inline-block;width:18px;height:2px;margin:0 0 3px;margin-inline-end:6px;vertical-align:middle;background:linear-gradient(90deg,#7fe0ff,#ffb347,#ff7a98)} /* the collision's track colours, from the event data (assets/), not the interface palette */

/* the tour's opening title over the scene: the logo, set like the intro's */
#title{position:absolute;inset-inline-start:6%;bottom:13%;max-width:88%;color:var(--on-blue)}
#title h1{position:relative;margin:0 0 .3em;font-family:var(--font-display);font-style:italic;font-weight:600;font-synthesis:none;font-size:clamp(72px,14vw,190px);line-height:1;letter-spacing:-.02em;color:var(--pale);width:max-content}
#title p{margin:0;margin-inline-start:.06em;font-size:clamp(16px,1.9vw,23px);line-height:1.35;max-width:30ch;color:#e6f5fc}
#title p.hook{margin-top:10px;font-size:clamp(14px,1.45vw,18px);max-width:40ch;color:var(--on-blue-dim)}
#depth{position:absolute;inset-inline-start:6%;bottom:calc(var(--ctlo,0px) + 13%);display:none;font-weight:300;font-size:clamp(34px,6vw,84px);line-height:1;letter-spacing:-.02em;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--on-blue);text-shadow:0 2px 12px rgba(5,20,50,.5)}
/* the LHCb logo (ui/logo.js) in place of the word: sized by its height, in em of the wordmark's font size */
.logo{display:block;width:auto;height:1em}
.wordmark .logo{height:1.15em}

/* the LHC ring schematic */
#ring{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none;
  background:radial-gradient(ellipse at center,rgba(22,64,138,.94) 0%,rgba(13,42,92,.97) 70%)}
#ring svg{width:min(78%,640px);height:auto;max-height:86%;overflow:visible}
#ring text{font-family:var(--font);fill:var(--pale)}

/* labels in the scene: pale and white on the scene blue */
.tag{position:absolute;left:0;top:0;display:none;font-size:14.5px;font-weight:500;white-space:nowrap;color:var(--white);text-shadow:0 1px 6px rgba(5,20,50,.9)}
.tag i{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--white);margin-right:7px;vertical-align:1px}
/* tags sit to the right of their point in every language; <bdi> keeps each label's own direction */
[dir="rtl"] .tag{direction:ltr}
.tag.reg{font-weight:400;font-size:15px;letter-spacing:.02em;color:var(--white)}.tag.reg i{background:transparent;border:1px solid var(--white);width:6px;height:6px}
.tag.util{font-size:13px;color:var(--pale)}.tag.util i{background:var(--pale);width:6px;height:6px}
.tag.minor{font-size:13.5px;color:var(--pale)}.tag.minor i{background:var(--pale);width:6px;height:6px}
.tag.us{color:var(--white);font-weight:600;font-size:17px}.tag.us i{background:var(--white);width:9px;height:9px;box-shadow:0 0 0 3px rgba(214,242,252,.35)}

/* the end of the tour: carry on in explore mode, or replay */
#tourEnd{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(var(--ctlh,70px) + 14px);display:none;flex-direction:column;align-items:center;gap:8px;
  pointer-events:auto;width:max-content;max-width:calc(100vw - 24px)}
#tourEnd p{margin:0;padding:4px 12px;border-radius:14px;background:var(--scrim);font-size:12.5px;font-weight:600;letter-spacing:.16em;text-transform:uppercase;color:var(--pale)}
#tourEnd>div{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
#endExplore,#replay{min-height:44px;border-radius:22px;padding:0 20px;font-size:16px;font-weight:600;cursor:pointer;box-shadow:var(--shadow-s)}
#endExplore{background:var(--blue);color:var(--on-blue);border:0}
#endExplore:hover{background:var(--ink)}
#replay{background:var(--card);color:var(--ink);border:0}
#replay:hover{background:var(--pale)}
#endExplore:focus-visible,#replay:focus-visible{outline-color:var(--white)}

#next{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(var(--ctlh,70px) + 14px);display:none;align-items:center;gap:10px;
  min-height:44px;background:var(--blue);color:var(--on-blue);border:0;border-radius:22px;padding:0 18px 0 20px;font-size:16px;font-weight:600;cursor:pointer;
  box-shadow:0 0 0 4px rgba(214,242,252,.35),var(--shadow-s)}
#next:hover{background:var(--ink)}
#next:focus-visible{outline-color:var(--white)}
#next kbd{font:inherit;font-size:12px;font-weight:500;border:1px solid rgba(242,251,255,.5);border-radius:3px;padding:1px 5px}
#next svg{width:12px;height:12px;fill:currentColor}
#hint{position:absolute;left:50%;top:calc(var(--hdro,0px) + 14px);transform:translateX(-50%);max-width:calc(100% - 24px);width:max-content;text-align:center;
  padding:6px 14px;border-radius:16px;background:var(--scrim);font-size:14px;color:#e6f5fc;display:none}

/* the control bar: LHCb blue, outlined pills, the current choice filled pale */
#ctl{position:fixed;left:0;right:0;bottom:0;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));
  display:grid;grid-template-columns:auto 1fr auto;gap:8px 14px;align-items:center;background:var(--blue);color:var(--on-blue)}
#ctl :focus-visible{outline-color:var(--on-blue)}
#ctl .btns,#ctl .tog{display:flex;gap:8px;align-items:center}
#ctl .tog{flex-wrap:wrap}
.ib{width:40px;height:40px;border-radius:50%;border:1.5px solid var(--edge);background:transparent;color:var(--on-blue);display:grid;place-items:center;cursor:pointer;flex:none}
.ib:hover{background:rgba(214,242,252,.14)}
.ib svg{width:15px;height:15px;fill:currentColor}
#play{border:0;background:var(--pale);color:var(--ink)}
#play:hover{background:var(--white)}
.tg{display:inline-flex;align-items:center;gap:6px;height:40px;border:1.5px solid var(--edge);background:transparent;border-radius:20px;padding:0 14px;font-size:14.5px;cursor:pointer;color:var(--on-blue)}
.tg:hover{background:rgba(214,242,252,.14)}
.tg[aria-pressed="true"]{border-color:var(--pale);background:var(--pale);color:var(--ink);font-weight:600}
#tStep[aria-pressed="true"]::before{content:"";width:9px;height:5px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg) translateY(-2px)}
#track{display:flex;gap:4px;height:28px;align-items:center;min-width:0}
.seg{position:relative;height:28px;flex:1 1 0;cursor:pointer;background:none;border:0;padding:0}
.seg::before{content:"";position:absolute;left:0;right:0;top:11px;height:6px;background:rgba(214,242,252,.3);border-radius:3px}
.seg i{position:absolute;inset-inline-start:0;top:11px;height:6px;background:var(--white);border-radius:3px;width:0}
.seg:hover::before{background:rgba(214,242,252,.5)}
.seg span{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);font-size:13px;white-space:nowrap;color:var(--text);opacity:0;pointer-events:none;
  background:var(--card);padding:4px 9px;border-radius:8px;box-shadow:var(--shadow-s)}
.seg:hover span,.seg:focus-visible span{opacity:1}
@media (pointer:coarse){.ib{width:44px;height:44px}.tg{height:44px;border-radius:22px}}

@media (max-width:640px){
  #topbar{padding-inline:16px}
  #ctl{grid-template-columns:auto 1fr;padding:10px 10px calc(8px + env(safe-area-inset-bottom,0px));gap:8px}
  #ctl .tog{grid-column:1/-1;justify-content:flex-start}
  .ib{width:44px;height:44px}
  .tg{height:44px;border-radius:22px;padding:0 12px}
  #hud .card{max-width:min(270px,66vw);padding:12px 13px 13px}
  #hud .card .min{width:30px;height:30px;top:6px;inset-inline-end:6px}
  #hud .card h3{font-size:19px;padding-inline-end:30px}#hud .card p{font-size:13.5px}
  .stats{padding:7px 10px;gap:4px 14px}
  .stat b{font-size:18px}
  #meta{gap:8px}#chap{max-width:42vw}
  /* the chapter and the time fill the header on the tour: the credits stay in the intro and explore */
  body.mode-tour #credits,body.mode-tour #brand small{display:none}
  #caption{inset-inline-start:auto;inset-inline-end:18px;bottom:auto;top:calc(var(--hdro,0px) + 8px)}
  /* the paused hint moves off the top, to where Continue shows at a note */
  #hint{top:auto;bottom:calc(var(--ctlh,70px) + 14px)}
  #hint.over-title{visibility:hidden}
}
@media (max-width:380px){#brand small{display:none}}
/* scripts with no capitals to space out, or whose letters join (<html data-untracked>, i18n/langs.js `track`) */
:root[data-untracked] :is(.xc-eyebrow,.xc-seen,.xc-sect,.xc-sites h3,.toast-t small,.in-eyebrow,.in-load,#tourEnd p){letter-spacing:0}
/* languages other than English: break long compound words in note cards */
:root:not([lang="en"]) #hud .card,:root:not([lang="en"]) .xcard{hyphens:auto;-webkit-hyphens:auto;hyphenate-limit-chars:10 4 4;-webkit-hyphenate-limit-before:4;-webkit-hyphenate-limit-after:4}
/* acronyms and names with inner capitals (ATLAS, RICH1, SciFi) are never split */
.nohy{hyphens:manual;-webkit-hyphens:manual}

