/* VEON 3Q26, responsive (packs/veon-lite): the page around VEON's stage. VEON's app.css (served at /veon/app.css)
   styles the stage itself and loads first; this file lays out the screen, the question bar and the voice picker
   from a phone up to a big screen. fit() in app.js scales the stage and sets body.portrait / body.caps-under. */

html, body { background: var(--frame); }
.app { height: 100vh; height: 100dvh; }

/* ---------- the screen: stage + (on small screens) its captions and source underneath ---------- */
.screen { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; background: var(--frame); }
.stage-wrap { background: var(--frame); }

/* captions over the foot of the stage (big screens): fit() sets left, width, bottom and font size from the stage's scale */
.caps { position: absolute; transform: translateX(-50%); z-index: 5; pointer-events: none; text-align: center;
  font: 400 30px/1.3 var(--sans); letter-spacing: .005em; color: var(--white); transition: opacity .6s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 12px rgba(0,0,0,.5); }
.caps span { opacity: .32; transition: opacity .15s; }
.caps span.said { opacity: 1; }
.caps.done, .no-captions .caps { opacity: 0; }
.src-under { display: none; }

/* small screens: captions and source under the stage, at a size you can read (the stage's own source line steps aside) */
.caps-under .caps { position: static; transform: none; white-space: nowrap; overflow: hidden; text-overflow: clip;
  font: 400 clamp(15px, 4.2vw, 19px)/1.4 var(--sans); padding: 6px 16px 12px; min-height: calc(1.4em + 18px); text-shadow: none; }
.caps-under .src-under { display: block; padding: 10px 16px 0; min-height: calc(1.4em + 10px);
  font: 400 11px/1.4 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; color: rgba(217,184,240,.6);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-under b { font-weight: 400; color: rgba(217,184,240,.85); }
.caps-under .stage .source { opacity: 0; }

/* portrait and square-ish screens: no page scroll; the screen takes the top ~60% (the stage, then its captions and
   source), the question bar, questions and chapters the rest; the questions scroll inside it when they don't fit */
body.portrait { overflow: hidden; }                                   /* (VEON's app.css scrolls the page in portrait) */
body.portrait .app { height: 100vh; height: 100dvh; min-height: 0; }
body.portrait .stage-wrap { flex: 1; min-height: 0; background: radial-gradient(60% 90% at 50% 45%, #1c1245, #0d0a26 70%, var(--frame)); } /* a square stage on a wider screen fades into its margins */
body.portrait .screen { flex: 0 0 60%; border-bottom: 1px solid rgba(255,255,255,.08); }
body.portrait .dock { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: 12px; }
body.portrait .dock .chips { flex: 0 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: none; padding-top: 10px; margin-top: 2px;
  padding-bottom: 2px; }
body.portrait .dock .chips::-webkit-scrollbar { display: none; }
body.portrait .story { flex: none; margin-top: 4px; }

/* ---------- the tall stage (portrait): 1080 wide, height set by fit() ---------- */
.stage.tall { width: 1080px; }
/* Chart Lab charts are composed at the tall stage's shape (app.js window.VeonChartsSize) and fill it as they are.
   The fallback charts (holo3d, the SVG ones) keep their 1920×1080 composition: a full-width band across the middle.
   `scale` (not transform) so the player's exit animation, which sets transform, composes with it */
.stage.tall .scene:has(> svg, > .holo-canvas):not(.veon-cover) { inset: auto; left: 0; top: var(--band-top); width: 1920px; height: 1080px;
  scale: .5625; transform-origin: 0 0;
  /* the band brings its own ground: feather its top and bottom into the tall stage */
  -webkit-mask-image: linear-gradient(transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(transparent, #000 9%, #000 91%, transparent); }
/* the chrome, re-set for 1080 wide */
.stage.tall .eyebrow { top: 128px; padding: 0 80px; font-size: 34px; white-space: normal; text-wrap: balance; line-height: 1.35; }
.stage.tall .logo { right: auto; left: 50%; translate: -50% 0; top: 66px; height: 24px; }
.stage.tall .fx .c { width: 54px; height: 54px; }
.stage.tall .light .l1 { right: -500px; }
.stage.tall .light .l2 { left: 80px; top: 34%; }
.stage.tall .source { left: 80px; right: 80px; }
/* type scenes, laid out tall */
.stage.tall .s-words, .stage.tall .s-quote { left: 80px; right: 80px; top: 52%; transform: translateY(-50%); }
.stage.tall .s-words .p { font-size: 112px; line-height: 1.06; }
.stage.tall .s-quote .mark { font-size: 230px; height: 115px; }
.stage.tall .s-quote .p { font-size: 74px; max-width: none; }
.stage.tall .s-quote .cite { font-size: 28px; }
.stage.tall .s-number { left: 80px; right: 80px; top: 52%; transform: translateY(-50%); }
.stage.tall .s-big { font-size: 190px !important; }   /* the inline size is for 1920 wide */
.stage.tall .s-label { font-size: 42px; }
.stage.tall .s-figures { left: 80px; right: 80px; top: 52%; transform: translateY(-50%); grid-template-columns: repeat(2, 1fr) !important; gap: 60px 50px !important; }
.stage.tall .s-figures .v { font-size: 110px !important; }
.stage.tall .s-figures-cap { left: 80px; right: 80px; top: 230px; }
.stage.tall .s-seq { left: 80px; right: 80px; top: 52%; transform: translateY(-50%); grid-template-columns: 1fr !important; gap: 38px; }
.stage.tall .s-seq > div { display: grid; grid-template-columns: 110px 1fr; column-gap: 28px; align-items: baseline; }
.stage.tall .s-seq .n { grid-row: 1 / 3; font-size: 96px; }
.stage.tall .s-seq .r { display: none; }
.stage.tall .s-seq .t { font-size: 42px; }
.stage.tall .s-seq .l { font-size: 28px; margin-top: 6px; }
.stage.tall .thinking { left: 80px; right: 80px; }
.stage.tall .thinking .q { font-size: 84px; line-height: 1.08; }
.stage.tall .thinking .status { font-size: 30px; }
/* the cover: wordmark and title in the upper middle, the IR pills stacked at the foot */
.stage.tall .veon-cover .wordmark { left: 80px; top: 36%; height: 72px; }
.stage.tall .veon-cover .sub { left: 80px; top: calc(36% + 104px); font-size: 64px; }
.stage.tall .veon-cover .pills { left: 80px; top: auto; bottom: 110px; flex-direction: column; align-items: flex-start; gap: 22px; }

/* ---------- the question bar ---------- */
.dock { padding-top: 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.dock.hidden { margin-bottom: -420px; }
.bar { display: flex; gap: 10px; align-items: stretch; }
.bar .ask { flex: 1; min-width: 0; max-width: none; margin: 0; }
.bar .pause, .bar .voice { position: static; transform: none; opacity: 1; flex: none; border-radius: 0; backdrop-filter: none;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.85); cursor: pointer;
  transition: border-color .2s, color .2s, background .2s, opacity .2s; }
.bar .pause { width: 60px; height: auto; display: grid; place-items: center; }
.bar .pause svg { width: 22px; height: 22px; }
.bar .pause:hover, .bar .voice:hover:not(:disabled) { border-color: var(--accent); color: var(--white); background: rgba(255,255,255,.07); }
.bar .pause.paused { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bar .voice { display: flex; align-items: center; gap: 10px; padding: 0 16px; text-align: left; font-family: var(--sans); }
.bar .voice svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.bar .voice:disabled { opacity: .4; cursor: default; }
.v-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.v-txt small { font: 600 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.v-txt b { font: 600 15px/1.1 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 14ch; }

.dock .chips { max-width: none; margin: 12px 0 0; min-height: 40px; }

/* "The story": the tour's stops as a row of chapters (scrolls sideways when it doesn't fit) */
.story { display: flex; align-items: center; gap: 14px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.story::-webkit-scrollbar { display: none; }
.story:has(.chapters:empty) { display: none; }
.story .story-label { flex: none; margin: 0; font: 600 11px/1 var(--sans); letter-spacing: .14em; color: rgba(255,255,255,.45); }
.story .chapters { flex-direction: row; gap: 6px; flex: none; }
.story .chapters button { width: auto; white-space: nowrap; border-left: 0; border-bottom: 2px solid rgba(255,255,255,.12);
  font: 400 14px/1.2 var(--sans); padding: 8px 10px; gap: 8px; }
.story .chapters .reached button { border-bottom-color: rgba(255,200,54,.55); }
.story .chapters .current button { border-bottom-color: var(--accent); }

@media (max-width: 700px) {
  .dock { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .bar { gap: 8px; }
  .bar .pause { width: 46px; }
  .ask .mic { width: 46px; }
  .ask button:not(.mic) { width: 50px; }
  .ask input { font-size: 16px; padding: 13px 12px; } /* 16px keeps iOS from zooming in on focus */
  .bar .voice { padding: 0 10px; gap: 6px; }
  .v-txt small { display: none; }
  .v-txt b { font-size: 13px; max-width: 9ch; }
  .dock .chips { gap: 8px; }
  .dock .chips button { font-size: 14px; padding: 10px 12px; text-align: left; line-height: 1.3; }
}
@media (max-width: 380px) {
  .bar .voice .v-txt { display: none; } /* just the voice icon on the narrowest phones */
}
/* a phone on its side (body.side-dock, set by fit()): the question bar becomes a column beside the stage */
body.side-dock .app { flex-direction: row; }
body.side-dock .dock { flex: none; width: clamp(260px, 38vw, 380px); overflow-y: auto; border-top: 0; border-left: 1px solid rgba(255,255,255,.08);
  padding: calc(10px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) 12px; }
body.side-dock .dock.hidden { margin-bottom: 0; }
body.side-dock .bar { flex-wrap: wrap; gap: 8px; }
body.side-dock .bar .ask { flex-basis: 100%; order: -1; }
body.side-dock .ask input { font-size: 16px; padding: 12px 10px; }
body.side-dock .ask .mic { width: 44px; }
body.side-dock .ask button:not(.mic) { width: 46px; }
body.side-dock .bar .pause { flex: 1; height: 40px; width: auto; }
body.side-dock .bar .voice { flex: 3; height: 40px; }
body.side-dock .bar .voice .v-txt { display: flex; }
body.side-dock .v-txt b { max-width: none; }
body.side-dock .dock .chips { gap: 6px; margin-top: 10px; min-height: 0; }
body.side-dock .dock .chips button { font-size: 13px; padding: 8px 10px; }
body.side-dock .caps-under .caps, body.side-dock.caps-under .caps { font-size: 15px; padding-top: 6px; }

/* ---------- the voice picker (VEON's picker, voices instead of faces) ---------- */
@media (min-width: 1001px) { .picker-in { grid-template-columns: minmax(280px, 0.8fr) 1.4fr; } }
@media (max-width: 1000px) { .p-intro { justify-content: flex-start; } .picker-in { gap: 28px; } }
.p-brand { width: auto; align-self: flex-start; }
.voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: clamp(8px, 1vw, 16px); }
.vcard { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 12px; background: rgba(20, 12, 50, .45);
  border: 1px solid rgba(217,184,240,.16); backdrop-filter: blur(10px); transition: transform .25s, border-color .25s; }
.vcard:hover { transform: translateY(-3px); border-color: rgba(255,200,54,.7); }
.vcard.last { border-color: rgba(255,200,54,.45); }
.vcard .mono { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 30% 25%, #8a6ad0, #3a2275 70%); border: 1px solid rgba(217,184,240,.35);
  font: 600 18px/1 var(--sans); letter-spacing: .04em; color: #fff; }
.vcard.playing .mono { box-shadow: 0 0 0 3px var(--sky); }
.vcard .meta { min-width: 0; }
.vcard .nm { font: 600 clamp(17px, 1.3vw, 20px)/1.15 var(--sans); }
.vcard .rl { font: 400 13px/1.35 var(--sans); opacity: .7; margin-top: 5px; }
.vcard .acts { display: flex; gap: 8px; margin-top: auto; }
.vcard button { height: 36px; border-radius: 18px; font: 500 14px var(--sans); cursor: pointer; padding: 0 14px; }
.vcard .hear { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff; }
.vcard .hear svg { width: 14px; height: 14px; }
.vcard.playing .hear { border-color: var(--sky); color: var(--sky); }
.vcard .pick { background: var(--accent); border: 0; color: var(--on-accent); font-weight: 600; }
@media (max-width: 560px) {
  .voices { grid-template-columns: 1fr; gap: 8px; }
  .vcard { flex-direction: row; align-items: center; gap: 12px; padding: 12px; }
  .vcard .mono { width: 42px; height: 42px; font-size: 15px; }
  .vcard .meta { flex: 1; }
  .vcard .acts { margin-top: 0; }
  .vcard .hear span { display: none; }
  .vcard .hear { padding: 0 11px; }
}

/* /?demo on the local preview: the saved answers as chips, in a short strip that scrolls */
.dock .chips.demo { max-height: 128px; overflow-y: auto; scrollbar-width: thin; padding-top: 10px; }
body.portrait .dock .chips.demo { max-height: none; }

/* ---------- the screen's look: no corner marks, scanlines edge to edge ----------
   The stage's own corner brackets go (the charts keep theirs: Chart Lab draws its own HUD). Its scanlines move off
   the stage onto the whole screen area, so they run to the edges, over the margins and down behind the captions;
   fit() sets --scan so they keep the stage's spacing (3 stage px) at any size. */
.stage .fx .c, .stage .fx .scan { display: none; }
.screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 4;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 var(--scan-line, 1px), transparent var(--scan-line, 1px) var(--scan, 3px)); }
.caps .tap-hint { opacity: .6; letter-spacing: .04em; animation: pulse 2.4s ease-in-out infinite; }

/* a tall stage that's wider than square (.short, sh < 1000: a short screen area above the questions) */
.stage.tall.short .veon-cover .wordmark { top: 22%; height: 64px; }
.stage.tall.short .veon-cover .sub { top: calc(22% + 92px); font-size: 56px; }
.stage.tall.short .veon-cover .pills { bottom: 64px; flex-direction: row; flex-wrap: wrap; }
.stage.tall.short .s-seq { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) !important; gap: 34px; }
.stage.tall.short .s-seq > div { display: block; }
.stage.tall.short .s-seq .n { font-size: 80px; }
.stage.tall.short .s-seq .r { display: block; margin: 16px 0 18px; }
.stage.tall.short .s-seq .t { font-size: 34px; }
.stage.tall.short .s-seq .l { font-size: 24px; }
.stage.tall.short .s-words .p { font-size: 96px; }
.stage.tall.short .s-quote .p { font-size: 62px; }

/* the disclaimer under the questions: the smallest type that still reads (10px desktop, 9px phones), muted but
   above WCAG's 4.5:1 on the frame colour; it never scrolls away (the questions scroll above it) */
.disclaimer { flex: none; margin: 10px 0 0; font: 400 10px/1.35 var(--sans); color: rgba(255,255,255,.66); letter-spacing: .01em; }
.disclaimer a { color: rgba(255,255,255,.82); text-decoration: underline; text-underline-offset: 2px; }
.disclaimer a:hover { color: var(--accent); }
@media (max-width: 700px) { .disclaimer { font-size: 9px; margin-top: 8px; } }
body.side-dock .disclaimer { font-size: 9px; }
.disclaimer .disc-open { background: none; border: 0; padding: 0; font: inherit; color: rgba(255,255,255,.82); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.disclaimer .disc-open:hover { color: var(--accent); }

/* the full disclosures: a dialog over everything, readable type, (x) top right */
.disc { width: min(640px, calc(100vw - 32px)); max-height: min(80vh, 720px); padding: 0; overflow: hidden; border: 1px solid rgba(217,184,240,.25);
  border-radius: 12px; background: #120e2c; color: rgba(255,255,255,.86); box-shadow: 0 24px 80px rgba(0,0,0,.6); }
.disc::backdrop { background: rgba(4,3,16,.72); backdrop-filter: blur(3px); }
.disc-in { position: relative; padding: 28px 28px 24px; max-height: min(80vh, 720px); overflow-y: auto; }
.disc h2 { margin: 0 40px 14px 0; font: 600 13px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--lilac); }
.disc p { margin: 0 0 14px; font: 400 14px/1.6 var(--sans); }
.disc p + p { padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.disc p:last-child { margin-bottom: 0; }
.disc h3 { margin: 6px 0 10px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); font: 600 12px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--lilac); }
.disc h3 + p { padding-top: 0; border-top: 0; }
.disc-x { position: absolute; z-index: 1; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: #221b4a; border: 1px solid rgba(255,255,255,.25); color: #fff; cursor: pointer; box-shadow: 0 0 0 6px #120e2c; }
.disc-x:hover { border-color: var(--accent); color: var(--accent); }
.disc-x svg { width: 18px; height: 18px; }
@media (max-width: 700px) { .disc-in { padding: 22px 18px 18px; } .disc p { font-size: 13px; } }

/* phones: the three questions tight enough to sit above the fold with the disclaimer */
@media (max-width: 700px) {
  .dock { padding-top: 10px; }
  .dock .chips { gap: 6px; }
  .dock .chips button { padding: 7px 10px; font-size: 14px; line-height: 1.25; border-radius: 4px; }
  .dock .chips .kind { font-size: 10px; padding: 2px 5px; margin-right: 6px; }
  .disclaimer { margin-top: 6px; }
}
body.portrait .dock .chips { padding-top: 8px; margin-top: 0; }
/* shorter phones (iPhone SE and the like, or a tall browser bar): a little less screen, so the questions fit */
@media (max-height: 740px) { body.portrait .screen { flex-basis: 57%; } }
