/* Virgin Australia, Journey Tracker: the study's kit, the styles every
   section shares: Virgin's tokens, the resets scoped to .vjm (the wrapper the
   frame puts the middle in), type, layout, the coded iPhone, the app frame,
   the solo Live Activity card, the switches and the island pills. Class
   prefix vj-. The study hub owns this file; a section chat that needs a new
   shared part asks the hub.

   Split out of middle.css on 13 Oct 2026 (chat CASE STUDY FRAME). The frame
   loads it after la-card.css and phone.css and before the section styles,
   sections/<nn>-<id>/section.css, in the order the study's JSON lists them.
   middle.css (12 Oct, chat VIRGIN BUILD) was cut from page.css, the first
   standalone draft, and is kept as middle.before-split.css. */

:root{
  --client-primary:var(--ext-brand-virgin);
  --vj-col:var(--container-base);
  --vj-ease:var(--ease-emphasized);--client-text:var(--client-primary);
}
.vjm :is(h1,h2,h3,h4){font-family:var(--font-display);font-weight:var(--weight-regular);letter-spacing:var(--display-tight);margin:0;text-wrap:balance}
.vjm :is(p,ul,ol,dl,figure,h4){margin:0}
.vjm a{color:inherit;text-underline-offset:3px;text-decoration-thickness:1.5px}
:where(.vjm) button{font:inherit;color:inherit}
.vjm :is(i[data-lucide],svg.lucide){width:1em;height:1em;flex:none}

/* ---- type ---- */
.vj-eb{display:flex;align-items:center;gap:var(--space-200);font-family:var(--font-mono);font-size:var(--text-label);font-weight:var(--weight-semibold);letter-spacing:var(--tracking-eyebrow);text-transform:uppercase;color:var(--color-text-tertiary);margin:0 0 var(--space-300)}
.vj-eb::before{content:"";width:var(--space-500);height:2px;background:var(--client-primary);flex:none}
.vj-h2{line-height:var(--line-display);max-width:20ch;font-size:max(var(--size-2xl),var(--display-card-title))}
.vj-h3{line-height:var(--line-heading);font-size:var(--text-h2);max-width:24ch}
.vj-p{color:var(--color-text-secondary);max-width:var(--measure)}
.vj-p+.vj-p{margin-top:var(--space-400)}
.vj-p b{font-weight:var(--weight-semibold);color:var(--color-text-primary)}
.vj-cap{font-family:var(--font-mono);font-size:var(--text-caption);line-height:var(--line-snug);color:var(--color-text-tertiary);max-width:60ch}
.vj-cap b{font-weight:var(--weight-semibold);color:var(--color-text-secondary)}

/* ---- layout ---- */
.vj{container-type:inline-size;padding-block:var(--space-800)}
.vj-in{width:100%;max-width:var(--container-wide);margin-inline:auto;padding-inline:var(--gutter,var(--space-500))}
.vj-dip{display:grid;gap:var(--space-700);align-items:center}
.vj-dip>.txt{display:grid;gap:var(--space-400);align-content:start}
.vj-dip>.txt .vj-eb{margin:0}
@container (min-width:900px){
  .vj-dip{grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:var(--space-900)}
  .vj-dip.flip>.txt{order:2}
}
.vj-media{position:relative;display:grid;place-items:center;min-width:0}

/* the coded iPhone from the pitch kit: 393 x 852 points, sized with zoom
   (not transform: WebKit backs a transform-scaled stage at full size) */
.vj-phone{--vj-z:min(var(--z,.6),var(--z-cap,1));position:relative;width:393px;height:852px;zoom:var(--vj-z);margin-inline:auto;flex:none}
/* the hero's three phones (.cs-devices) size from the stage's height, so a tall
   stage made them wider than the stage (960 in 688 at 768, rails closed); the
   stage is a size container, so its width caps their zoom: three phones, two
   48px gaps and the frame ring fit at each band's narrowest width (20 Oct, chat VIRGIN APP). Under 768 the
   side phones are hidden and the one phone needs no cap. */
@media (min-width:768px){
  @container (max-width:1000px){.cs-devices .vj-phone{--z-cap:0.70}}
  @container (max-width:960px){.cs-devices .vj-phone{--z-cap:0.65}}
  @container (max-width:900px){.cs-devices .vj-phone{--z-cap:0.60}}
  @container (max-width:840px){.cs-devices .vj-phone{--z-cap:0.55}}
  @container (max-width:780px){.cs-devices .vj-phone{--z-cap:0.50}}
  @container (max-width:720px){.cs-devices .vj-phone{--z-cap:0.45}}
  @container (max-width:660px){.cs-devices .vj-phone{--z-cap:0.40}}
  @container (max-width:600px){.cs-devices .vj-phone{--z-cap:0.35}}
  @container (max-width:540px){.cs-devices .vj-phone{--z-cap:0.30}}
}
.vj-phone .iph{left:0;top:0}
.vj-phone .frame{box-shadow:0 0 0 2px var(--neutral-500),0 0 0 9px var(--neutral-850),0 0 0 10.5px var(--neutral-550),0 40px 90px var(--color-overlay-soft)}
@container (max-width:599px){.vj-phone{--z:.5}}
/* the app opening inside the phone (the before loop) */
.vj-app{position:absolute;inset:0;border-radius:55px;overflow:hidden;z-index:6;opacity:0;transform:scale(.18);transform-origin:var(--ox,66px) var(--oy,115px);transition:opacity var(--duration-moderate) var(--ease-default),transform var(--duration-flourish) var(--vj-ease);pointer-events:none}
.vj-app.on{opacity:1;transform:none}
/* the app's frame cancels the phone's zoom and scales by transform instead: WebKit
   (iPhone Safari) shrinks a zoomed iframe's own page to the zoomed width, so the app
   laid out at about 180px and sat small in the top left corner (chat VIRGIN MOBILE, 9 Nov 2026) */
.vj-app iframe{position:absolute;left:0;top:0;width:428px;height:928px;border:0;zoom:calc(1 / var(--vj-z,1));transform:scale(calc(.9182 * var(--vj-z,1)));transform-origin:0 0;pointer-events:none;background:var(--neutral-150)}
.vj-app .fb{position:absolute;left:5.7%;width:88.6%;top:24.5%;opacity:0;transform:translateY(12px);transition:opacity var(--duration-slow),transform var(--duration-flourish) var(--vj-ease)}
.vj-app.after .fb{opacity:1;transform:none}
.vj-tap{position:absolute;width:44px;height:44px;margin:-22px 0 0 -22px;border-radius:var(--dot-radius);background:var(--color-static-white);opacity:0;z-index:7;pointer-events:none}
.vj-tap.go{animation:vjTap .55s var(--ease-default)}
@keyframes vjTap{0%{opacity:.55;transform:scale(.4)}100%{opacity:0;transform:scale(1.4)}}
.vj-phone .iph.still *{transition:none!important;animation:none!important}

/* a Live Activity card on its own, no phone (the pitch's K.card, rebuilt) */
.vj-solo{position:relative;width:371px;zoom:var(--z,1)}
.vj-solo .la{position:relative;left:0;bottom:auto;box-shadow:0 10px 30px var(--color-overlay-soft)}


/* ---- shared parts, moved out of the trip and the four sizes on the split ---- */
/* switches: What if, the code tabs, the flight card */
.vj-sw{appearance:none;cursor:pointer;font-size:var(--size-sm);font-weight:var(--weight-medium);padding:var(--space-200) var(--space-300);min-height:36px;border-radius:var(--chip-radius);border:var(--border-hairline);background:var(--color-surface);color:var(--color-text-primary);transition:background var(--duration-fast),border-color var(--duration-fast),color var(--duration-fast)}
.vj-sw:hover{border-color:var(--color-border-hover)}
/* no site lime inside the study (his note 25 Oct 2026): the focus ring takes the text colour in both themes */
.cs-middle :focus-visible{outline-color:var(--color-text-primary)}
.vj-sw[aria-pressed="true"]{background:var(--color-text-primary);border-color:var(--color-text-primary);color:var(--color-bg)}
.vj-sws{display:flex;flex-wrap:wrap;gap:var(--space-200);align-items:center}
.vj-sws .lab{font-family:var(--font-mono);font-size:var(--text-label);letter-spacing:var(--tracking-label);text-transform:uppercase;color:var(--color-text-tertiary);margin-right:var(--space-200);min-width:5.5em}
/* switches on phones (27 Oct 2026, chat VA MOBILE PASS, his note: "a lot tighter", equal padding all round): 8px on all
   four sides, caption words on a line height of 1, 34px tall with an icon and the border, still over the 24px target
   (WCAG 2.5.8). The sections that size their own switches follow in their files. */
@media (max-width:767.98px){.vj-sw{min-height:var(--space-600);padding:var(--space-200);font-size:var(--text-caption);line-height:1;gap:var(--space-200)}}
/* island pills: Apple's black island, fixed hardware colour */
.vj-pill{background:rgb(0 0 0);display:flex;align-items:center;justify-content:space-between;color:var(--color-static-white)}
.vj-pill.cmp{width:230px;height:36.67px;border-radius:18.33px;padding:0 var(--space-200) 0 var(--space-250)}
.vj-pill.min{width:36.67px;height:36.67px;border-radius:var(--chip-radius);justify-content:center}
.vj-pill img{width:24px;height:24px;object-fit:contain;display:block}
/* partner-info.svg is 36 x 36 with Figma's minimal circle baked in: it draws at 36 over its 24pt slot, as Figma places it (20 Oct) */
.vj-pill img[src$="partner-info.svg"]{width:36px;height:36px;margin:-6px}
.vj-pill .gate{display:inline-flex;align-items:center;gap:var(--space-50);height:24px;padding:0 6px 0 var(--space-100);border-radius:var(--radius-2xl);background:var(--ext-brand-wcag-amber);color:rgb(0 0 0);font:700 15px/1 -apple-system,"SF Pro Display",sans-serif;white-space:nowrap}
.vj-pill .gate img{width:14px;height:14px;filter:brightness(0)}

/* ---- reduced motion: posters, no auto loops. Each section file ends with its own. ---- */
@media (prefers-reduced-motion:reduce){
  .vj-app{transition:none}
}
html[data-motion="still"] .vj-app{transition:none}

.vj-dip>.txt>*{justify-self:start}
/* the design system's .btn and .chip are global; Virgin's card has its own of each */
.la .btn{min-height:0;line-height:18px;border:0;transform:none}
.la .chip{border:0}
/* Virgin red as small text: 4.5:1 on the light ground, too dark on the dark ground, so it lifts there */
html[data-theme="dark"]{--client-text:color-mix(in oklab,var(--client-primary) 72%,var(--color-static-white))}
@media (prefers-color-scheme:dark){html:not([data-theme="light"]){--client-text:color-mix(in oklab,var(--client-primary) 72%,var(--color-static-white))}}

/* ---- after the judge pass (10 Oct) ---- */
/* one type scale: h1 > h2 > h3 at every width, tokens only */
/* one rhythm between parts */
@media (max-width:599px){.vj{padding-block:var(--space-700)}}
/* switches that do not exist at this stage (the flight card) */
.vj-sw:disabled{opacity:.35;cursor:not-allowed}
.vj-sw:disabled:hover{border-color:var(--color-border)}
/* plates: numbers in white, the red only as a dash */
/* the chapter rail appears once the reader is past the cover */

/* ================================================================
   Section options (13 Oct, chat VIRGIN PROBLEM; Bupa's .bp-var pattern).
   Each section holds its options as .vj-var blocks, today's version
   first; the section's live toggles row (VJ.only) shows one. With
   nothing picked, the first block shows and the rest stay hidden.
   ================================================================ */
.vj-var~.vj-var{display:none}

/* Light only (his pick 26 Oct 2026, "Off for Virgin"): the header's dark mode switch has nothing to do here */
.cs-head .theme-ctl, #site-header .theme-ctl { display: none; }
