/* ==========================================================================
   CMU Student Compass — Immersive · JOURNEY (workstream B)
   Act II  Entry "Trailhead"  (#imm-entry)  — entry card + Ang Kaew seen through a Lanna arch, the glass elephant guide
   Act III Trail              (#imm-trail)  — seven waypoint cards + sticky vista viewport

   Cascade: this sheet is unlayered, so every rule beats the legacy sheet (@layer legacy)
   regardless of specificity. Legacy properties that are not restated here keep applying,
   which is why re-laid-out components reset margin / padding / display / transform explicitly.

   Behavioural contracts (compass.js / help_assistant.js) this sheet must not break:
     · .menu-item.awaiting-selection.disabled keeps `pointer-events: none`
     · [hidden] keeps hiding (.entry-panel, .entry-panel-body, #term-selection, .skill-insights-gated)
     · JS owns inline `display` on the two .entry-panel elements and #demo-selection — never set
       `display` on them here; .entry-panel-body keeps a real `height` transition and no other
       transitioned property (JS waits for transitionend on that element)
     · #trial-mode-status className is overwritten by JS — style the --active/--pending/--inactive classes
   ========================================================================== */

/* ------------------------------------------------------------------ 0. shell + local tokens */
.imm-journey {
  --_ico-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E");
  --_ico-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  --_ico-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4M16 2v4M3 10h18'/%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3C/svg%3E");
  --_ico-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  --_ico-login: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4M10 17l5-5-5-5M15 12H3'/%3E%3C/svg%3E");
  --_scrim: 10, 9, 32; /* --imm-night as an rgb triplet for photo scrims */
  position: relative;
  background-color: var(--imm-bg);
  color: var(--imm-text);
}
/* the seam under the hero (owner request 2026-11-17: no line there, on any device). On a fractional pixel ratio
   (Windows at 125 / 150 %, many Android phones) the hero's bottom edge can fall inside a device pixel, and that
   half-covered row blends the hero's stacked scene layers — dark ridges and leaves under the cream mist — into a
   dark hairline. A strip a few pixels tall straddles the edge above the hero (z-index 1), so the row is only ever cream
   on cream: whenever the seam is on screen the hero's last pixels are its risen mist. Same cure as the footer seam
   (footer.css .imm-ft-seam). */
.imm-journey::before {
  content: ''; position: absolute; left: 0; right: 0; top: -4px; z-index: 2; height: 8px; pointer-events: none;
  background: linear-gradient(var(--imm-cream) 50%, var(--imm-bg) 50%);
}
@media print { .imm-journey::before { display: none; } }

/* topographic contour texture shared by both acts (inline SVG, drifts slower than the page) */
.imm-topo {
  position: absolute; left: 0; top: -5%; width: 100%; height: 110%;
  fill: none; color: var(--imm-violet-500);
  transform: translate3d(0, calc((var(--imm-p) - 0.5) * 9%), 0);
  will-change: transform;
}
.imm-topo__fine { stroke: currentColor; stroke-opacity: 0.17; stroke-width: 1; vector-effect: non-scaling-stroke; }
.imm-topo__index { stroke: currentColor; stroke-opacity: 0.3; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.imm-topo__label { fill: currentColor; fill-opacity: 0.5; stroke: none; font-size: 15px; font-weight: 300; letter-spacing: 0.08em; }

/* section titles: Thai tone marks need more head-room than core's .imm-line clip gives */
.imm-entry__title, .imm-trail__title {
  margin: 0.3em 0 0; font-size: var(--imm-fs-3xl); font-weight: 600; line-height: 1.24; letter-spacing: 0; color: var(--imm-ink);
}
.imm-entry__title .imm-line, .imm-trail__title .imm-line { padding-block: 0.16em 0.12em; margin-block: -0.1em -0.06em; }
.imm-eyebrow__dot { opacity: 0.6; margin-inline: -0.35em; }
.imm-eyebrow__th { letter-spacing: 0; text-transform: none; font-weight: 400; } /* never letter-space Thai */

/* ==================================================================== 1. ENTRY */
.imm-entry {
  position: relative;
  padding-block: clamp(40px, 6.4vw, 104px) clamp(48px, 7vw, 112px);
  overflow-x: clip; /* the guide's glow and the arch aura spill past the gutter; `clip` keeps position: sticky working */
}
.imm-entry__bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.imm-entry__bg::before, .imm-entry__bg::after, .imm-trail__bg::before, .imm-trail__bg::after {
  /* cream fades so the contours never touch the section seams */
  content: ''; position: absolute; left: 0; right: 0; height: clamp(90px, 14vw, 220px); z-index: 1;
}
.imm-entry__bg::before, .imm-trail__bg::before { top: 0; background: linear-gradient(to bottom, var(--imm-bg), transparent); }
.imm-entry__bg::after, .imm-trail__bg::after { bottom: 0; background: linear-gradient(to top, var(--imm-bg), transparent); }
.imm-entry__glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(54% 44% at 76% 36%, rgba(255, 223, 148, 0.5), rgba(255, 223, 148, 0) 72%),
    radial-gradient(42% 36% at 6% 84%, rgba(176, 168, 238, 0.2), rgba(176, 168, 238, 0) 72%);
}

.imm-entry__grid {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'head' 'scene' 'body'; row-gap: clamp(20px, 3.2vw, 30px);
}
.imm-entry__head { grid-area: head; position: relative; z-index: 1; }
.imm-entry__scene { grid-area: scene; }
.imm-entry__body { grid-area: body; min-width: 0; }
.imm-entry__lead { max-width: 34em; margin: 0; text-wrap: pretty; }

/* ---- 1.1 scene: Ang Kaew through a Lanna pointed arch (ซุ้มโขง), the glass elephant guide stepping out of it
   Depth planes (back to front), each driven by --imm-p (scroll, #imm-entry) and --imm-mx/--imm-my (pointer, scene):
     photo (moves against the frame, like a view through a real window) · far lanterns · two mist bands ·
     the arch frame · the warm light spilling out · the elephant on its sill (moves most).
   One unit for the whole object: .imm-arch is an inline-size container, so 1cqw = 1% of the window width and
   every hairline, band and overhang keeps its proportion from a 280px phone to a 4K screen.
   Masks: an SVG silhouette four times taller than wide (a stepped crown of two tiers rising into a flame
   point, like the top of a Lanna gate, over a long straight body), drawn at 100% of each layer's width, so
   the nested layers (gold line, plaster band, gold rim, window) all carry the same arch at their own size.
   --_arch-tall: portrait gate (desktop) · --_arch-wide: phone banner · --_arch-low: tablet / landscape banner. */
.imm-entry {
  --_arch-tall: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 400'%3E%3Cpath d='M0 400V70H3V66C3 60 6.5 56.5 11 54.5H14.5C18 49.5 22.5 46 28 43.5H32C39.5 38.5 46 25 50 0C54 25 60.5 38.5 68 43.5H72C77.5 46 82 49.5 85.5 54.5H89C93.5 56.5 97 60 97 66V70H100V400Z'/%3E%3C/svg%3E");
  --_arch-wide: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 400'%3E%3Cpath d='M0 400V34H2V32C2 29 4 27.5 7 26H11C14 23.5 18 21.5 23 20H28C37 16.5 45 10 50 0C55 10 63 16.5 72 20H77C82 21.5 86 23.5 89 26H93C96 27.5 98 29 98 32V34H100V400Z'/%3E%3C/svg%3E");
  --_arch-low: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 400'%3E%3Cpath d='M0 400V30H2V28.5C2 26 4 24.6 6.5 23.4H10C13 21.4 17 19.6 22 18.4H27C36.5 15 45 9 50 0C55 9 63.5 15 73 18.4H78C83 19.6 87 21.4 90 23.4H93.5C96 24.6 98 26 98 28.5V30H100V400Z'/%3E%3C/svg%3E");
}
.imm-entry__scene { position: relative; z-index: 0; }
.imm-arch {
  /* layout knobs (re-declared per breakpoint) */
  --_w: 92%;                 /* window width (resolved against the scene, like margin): the frame stays inside the gutter */
  --_ratio: 1.38;            /* window width / height */
  --_mask: var(--_arch-wide);
  --_photo: 50% 60%;         /* object-position of the reservoir photo */
  --_ew: 40cqw;              /* elephant width */
  --_ex: 2cqw;               /* elephant left edge (negative = breaks out of the side) */
  --_drop: 4.6cqw;           /* the sill (and the elephant's feet) sit this far below the window */
  /* frame proportions */
  --_rim: max(1.5px, 0.42cqw);
  --_band: 2.6cqw;
  --_line: max(1px, 0.26cqw);
  position: relative; width: var(--_w); aspect-ratio: var(--_ratio);
  margin: 0 auto calc(var(--_w) * 0.075); /* room for the sill and the feet below the window */
  container-type: inline-size;
}
.imm-arch__body { position: absolute; inset: 0; transform: translate3d(calc(var(--imm-mx) * 5px), calc((var(--imm-p) - 0.5) * -22px + var(--imm-my) * 3px), 0); }

/* warm light on the paper around the gate, as if the sun stood behind it */
.imm-arch__aura {
  position: absolute; inset: -16cqw -24cqw -10cqw; pointer-events: none;
  background:
    radial-gradient(closest-side at 50% 62%, rgba(255, 214, 150, 0.55), rgba(255, 214, 150, 0.16) 52%, rgba(255, 214, 150, 0) 100%),
    radial-gradient(closest-side at 50% 30%, rgba(240, 163, 180, 0.22), rgba(240, 163, 180, 0) 100%);
}
.imm-arch__line, .imm-arch__band, .imm-arch__rim, .imm-arch__window {
  position: absolute;
  -webkit-mask: var(--_mask) 50% 0 / 100% auto no-repeat; mask: var(--_mask) 50% 0 / 100% auto no-repeat;
}
.imm-arch__line { inset: calc(-1 * (var(--_rim) + var(--_band) + var(--_line))); background: linear-gradient(172deg, var(--imm-gold-200), var(--imm-gold-400) 46%, var(--imm-gold-600)); }
.imm-arch__band { /* lime-plaster frame, lit from the upper left */
  inset: calc(-1 * (var(--_rim) + var(--_band)));
  background: linear-gradient(160deg, #fffdf7 0%, #f8eedb 46%, #eadbbc 100%);
}
.imm-arch__rim { inset: calc(-1 * var(--_rim)); background: linear-gradient(165deg, #ffe7a6 0%, var(--imm-gold-400) 34%, #a9690a 70%, #ffd27a 100%); }
.imm-arch__window { inset: 0; overflow: hidden; isolation: isolate; background: var(--imm-violet-900); }

.imm-arch__pan {
  position: absolute; inset: -7% -6%;
  transform: translate3d(calc(var(--imm-mx) * -12px), calc((var(--imm-p) - 0.5) * 7% + var(--imm-my) * -7px), 0);
  will-change: transform;
}
.imm-arch__photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--_photo); }

/* far sky lanterns (โคมลอย) drifting up over Doi Suthep */
.imm-arch__lanterns { position: absolute; inset: 0; transform: translate3d(calc(var(--imm-mx) * -8px), calc((var(--imm-p) - 0.5) * -16cqw), 0); }
.imm-arch__lanterns i {
  position: absolute; left: var(--_x); top: var(--_y); width: var(--_s); aspect-ratio: 241 / 360; opacity: 0.9;
  background: url('../../images/immersive/lantern.webp') center / contain no-repeat; filter: blur(var(--_b));
  animation: imm-arch-rise var(--_t) linear var(--_d) infinite;
}
.imm-arch__lanterns i:nth-child(1) { --_x: 23%; --_y: 40%; --_s: 3.1cqw; --_b: 0.3px; --_t: 30s; --_d: -6s; }
.imm-arch__lanterns i:nth-child(2) { --_x: 61%; --_y: 30%; --_s: 2.1cqw; --_b: 0.7px; --_t: 38s; --_d: -23s; }

/* two mist bands drifting across the water against each other */
.imm-arch__mist {
  position: absolute; left: -45%; width: 190%; top: var(--_mist-y, 55%); height: 20%; opacity: 0.3;
  background: url('../../images/immersive/mist.webp') center / 100% 100% no-repeat;
  translate: calc(var(--imm-mx) * -6px + (var(--imm-p) - 0.5) * -10cqw) 0;
  animation: imm-drift 52s ease-in-out infinite alternate;
}
.imm-arch__mist--near {
  top: calc(var(--_mist-y, 55%) + 9%); height: 26%; opacity: 0.36;
  translate: calc(var(--imm-mx) * -3px + (var(--imm-p) - 0.5) * -24cqw) calc((var(--imm-p) - 0.5) * -3cqw);
  animation-duration: 36s; animation-direction: alternate-reverse;
}
.imm-arch__shade { /* dusk vignette: the arch top reads recessed, the water calms down for the caption */
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(var(--_scrim), 0.34), rgba(var(--_scrim), 0) 22%),
    linear-gradient(to top, rgba(var(--_scrim), 0.42), rgba(var(--_scrim), 0) 30%),
    linear-gradient(150deg, rgba(250, 172, 30, 0.08), rgba(104, 104, 172, 0.08) 70%);
}
.imm-arch__window > .imm-grain { z-index: 3; }

/* caption chip: place + coordinates, a small plate of dark glass on the water */
.imm-arch__tag {
  position: absolute; right: 4.5cqw; bottom: 5cqw; z-index: 4; max-width: 52cqw; margin: 0;
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px; padding: 0.42em 0.85em 0.46em;
  border-radius: var(--imm-r-sm); background: rgba(var(--_scrim), 0.46); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(8px) saturate(1.2); backdrop-filter: blur(8px) saturate(1.2);
  color: #fff; text-align: right; line-height: 1.35;
}
.imm-arch__place { font-size: var(--imm-fs-xs); font-weight: 400; }
.imm-arch__place > span { white-space: nowrap; }
.imm-arch__coord { font-size: var(--imm-fs-2xs); font-weight: 500; letter-spacing: 0.2em; white-space: nowrap; color: var(--imm-gold-200); }
/* small arches (phones, landscape phones, short laptops): a compact two-line plate (place / university);
   the coordinates join when the window itself is wide enough — a container query on the arch */
@container (max-width: 440px) {
  .imm-arch__tag { padding: 0.36em 0.75em 0.4em; }
  .imm-arch__sep, .imm-arch__coord { display: none; }
  .imm-arch__uni { display: block; font-size: var(--imm-fs-2xs); color: var(--imm-gold-100); }
}

/* the light that pours out of the window behind the elephant (screen: it lights the photo, barely tints paper) */
.imm-arch__glow {
  position: absolute; left: calc(var(--_ex) + var(--_ew) * 0.5); top: calc(100cqw / var(--_ratio) + var(--_drop) * 0.42 - var(--_ew) * 0.56);
  width: calc(var(--_ew) * 1.9); aspect-ratio: 1; margin: calc(var(--_ew) * -0.95) 0 0 calc(var(--_ew) * -0.95); pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 222, 160, 0.72), rgba(255, 196, 120, 0.3) 42%, rgba(255, 170, 110, 0) 100%);
  mix-blend-mode: screen;
  transform: translate3d(calc(var(--imm-mx) * 10px), calc((var(--imm-p) - 0.5) * -34px + var(--imm-my) * 5px), 0);
  transition: opacity 1.4s ease 0.9s;
  animation: imm-arch-swell 7s ease-in-out infinite alternate;
}

/* the near plane: sill + elephant + its contact shadow move together, ahead of the frame */
.imm-arch__front {
  position: absolute; inset: 0; pointer-events: none;
  transform: translate3d(calc(var(--imm-mx) * 14px), calc((var(--imm-p) - 0.5) * -40px + var(--imm-my) * 7px), 0);
  will-change: transform;
}
.imm-arch__sill { /* a low plinth under the gate: lit top face, shaded front, gold edge */
  position: absolute; left: calc(-1 * (var(--_rim) + var(--_band) + var(--_sill-out, 1.6cqw))); right: calc(-1 * (var(--_rim) + var(--_band) + var(--_sill-out, 1.6cqw)));
  top: calc(100% - 0.4cqw); height: calc(var(--_drop) + 1.6cqw); border-radius: 1.2cqw 1.2cqw 1.6cqw 1.6cqw;
  background: linear-gradient(to bottom, #fffaf0 0, #f3e6cb calc(var(--_drop) * 0.62), #dccaa4 calc(var(--_drop) * 0.62 + 1px), #cbb68c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(140, 84, 7, 0.25), 0 2.4cqw 4cqw -1.6cqw rgba(43, 39, 91, 0.42);
}
.imm-arch__sill::before { /* gold hairline along the front edge */
  content: ''; position: absolute; left: 1.2cqw; right: 1.2cqw; top: calc(var(--_drop) * 0.62); height: max(1px, 0.24cqw);
  background: linear-gradient(90deg, rgba(250, 172, 30, 0), var(--imm-gold-400) 18%, var(--imm-gold-300) 50%, var(--imm-gold-400) 82%, rgba(250, 172, 30, 0));
}
.imm-arch__guide {
  position: absolute; left: var(--_ex); top: calc(100cqw / var(--_ratio) + var(--_drop) * 0.42 - var(--_ew) * 1.049);
  width: var(--_ew); aspect-ratio: 858 / 900;
}
.imm-arch__shadow {
  position: absolute; left: 4%; right: 2%; bottom: -3%; height: 12%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(43, 39, 91, 0.42), rgba(43, 39, 91, 0)); filter: blur(2px);
}
.imm-arch__elephant { position: relative; display: block; width: 100%; height: 100%; filter: drop-shadow(0 1.4cqw 2.2cqw rgba(43, 39, 91, 0.32)); }
.imm-arch__inner { /* the warm light inside the glass breathes (masked by the sprite's own alpha) */
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(60% 52% at 46% 56%, rgba(255, 214, 140, 0.62), rgba(255, 190, 110, 0.18) 60%, rgba(255, 190, 110, 0) 100%);
  -webkit-mask: url('../../images/immersive/elephant-glass-420.webp') center / 100% 100% no-repeat;
  mask: url('../../images/immersive/elephant-glass-420.webp') center / 100% 100% no-repeat;
  animation: imm-arch-breathe 7s ease-in-out infinite alternate;
}

/* ---- the guest cast (trial mode — journey.js toggles .is-guest while the trial panel is the chosen way in)
   The violet calf (a CMU student) and Ang Kaew (the university as home) give way to a grown clear-crystal elephant
   "from another herd" that stands with its back to us and looks IN at the university at work: a visitor who came to
   observe. Same arch, same light; only the cast changes. Its images load on demand (data-guest-*). */
.imm-arch__photo--guest { position: absolute; inset: 0; opacity: 0; object-position: var(--_photo-guest, 50% 62%); }
.imm-arch__guide--guest {
  --_gw: calc(var(--_ew) * 0.86);
  left: calc(var(--_ex) + var(--_ew) * 0.05);
  top: calc(100cqw / var(--_ratio) + var(--_drop) * 0.42 - var(--_gw) * 1.2535);
  width: var(--_gw);
  aspect-ratio: 718 / 900;
  opacity: 0;
  visibility: hidden;
}
.imm-arch__guide--guest .imm-arch__elephant { filter: drop-shadow(0 1.4cqw 2.2cqw rgba(43, 39, 91, 0.3)); }
.imm-arch.is-guest .imm-arch__photo--guest { opacity: 1; }
.imm-arch.is-guest .imm-arch__guide--guest { opacity: 1; visibility: visible; }
.imm-arch.is-guest .imm-arch__guide:not(.imm-arch__guide--guest) { opacity: 0; visibility: hidden; transform: translate3d(-3cqw, 1.5cqw, 0) scale(0.92); filter: blur(5px); }
.imm-arch.is-guest .imm-arch__guide--guest .imm-arch__inner { /* moonlight, not lamplight, inside the crystal */
  background: radial-gradient(58% 50% at 52% 44%, rgba(226, 236, 255, 0.5), rgba(206, 218, 255, 0.14) 60%, rgba(206, 218, 255, 0) 100%);
  -webkit-mask: url('../../images/immersive/elephant-guest-420.webp') center / 100% 100% no-repeat;
  mask: url('../../images/immersive/elephant-guest-420.webp') center / 100% 100% no-repeat;
}
/* the reservoir's mist and the far lanterns belong to Ang Kaew; the visitor's view is clear */
.imm-arch.is-guest :is(.imm-arch__mist, .imm-arch__lanterns) { opacity: 0; }
.imm-arch__visit,
.imm-arch.is-guest .imm-arch__home { display: none; }
.imm-arch.is-guest .imm-arch__visit { display: inline; }

/* off-screen (journey.js): the ambient loops rest */
.imm-arch.is-asleep :is(.imm-arch__lanterns i, .imm-arch__mist, .imm-arch__glow, .imm-arch__inner) { animation-play-state: paused; }

/* entrance: the frame appears, the view opens from the water up, then the guide steps forward */
html.imm-js:not(.imm-reduced) .imm-arch :is(.imm-arch__line, .imm-arch__band, .imm-arch__rim, .imm-arch__aura) { transition: opacity 1s ease 0.1s; }
html.imm-js:not(.imm-reduced) .imm-arch__window { transition: clip-path 1.6s var(--imm-ease-out) 0.2s; }
html.imm-js:not(.imm-reduced) .imm-arch__photo { transition: transform 3s var(--imm-ease-out) 0.2s; }
html.imm-js:not(.imm-reduced) .imm-arch__guide { transition: opacity 1.1s ease 0.75s, transform 1.5s var(--imm-ease-out) 0.75s, filter 1.1s ease 0.75s; }
html.imm-js:not(.imm-reduced) .imm-arch__sill { transition: opacity 0.9s ease 0.55s; }
html.imm-js:not(.imm-reduced) .imm-arch__tag { transition: opacity 0.9s ease 1.3s, transform 1.1s var(--imm-ease-out) 1.3s; }
html.imm-js:not(.imm-reduced) .imm-arch:not(.is-inview) :is(.imm-arch__line, .imm-arch__band, .imm-arch__rim, .imm-arch__aura, .imm-arch__sill) { opacity: 0; }
html.imm-js:not(.imm-reduced) .imm-arch:not(.is-inview) .imm-arch__window { clip-path: inset(100% 0 0 0); }
html.imm-js:not(.imm-reduced) .imm-arch:not(.is-inview) .imm-arch__photo { transform: scale(1.18); }
html.imm-js:not(.imm-reduced) .imm-arch:not(.is-inview) .imm-arch__guide { opacity: 0; transform: translate3d(0, 5cqw, 0) scale(0.9); filter: blur(6px); }
html.imm-js:not(.imm-reduced) .imm-arch:not(.is-inview) .imm-arch__tag { opacity: 0; transform: translate3d(0, 10px, 0); }
html.imm-js:not(.imm-reduced) .imm-arch:not(.is-inview) .imm-arch__glow { opacity: 0; }
/* the cast changes: the calf steps back at once, the view dissolves, then the visitor steps onto the sill */
html.imm-js:not(.imm-reduced) .imm-arch__photo--guest { transition: transform 3s var(--imm-ease-out) 0.2s, opacity 1.2s ease 0.1s; }
html.imm-js:not(.imm-reduced) :is(.imm-arch__mist, .imm-arch__lanterns) { transition: opacity 0.9s ease; }
html.imm-js:not(.imm-reduced) .imm-arch__guide--guest { transition: opacity 0.6s ease, transform 0.8s var(--imm-ease-out), filter 0.6s ease, visibility 0s linear 0.8s; }
html.imm-js:not(.imm-reduced) .imm-arch:not(.is-guest) .imm-arch__guide--guest { transform: translate3d(3cqw, 2cqw, 0) scale(0.94); filter: blur(6px); }
html.imm-js:not(.imm-reduced) .imm-arch.is-guest .imm-arch__guide--guest { transition: opacity 1s ease 0.4s, transform 1.4s var(--imm-ease-out) 0.4s, filter 1s ease 0.4s, visibility 0s; }
html.imm-js:not(.imm-reduced) .imm-arch.is-guest .imm-arch__guide:not(.imm-arch__guide--guest) { transition: opacity 0.6s ease, transform 0.8s var(--imm-ease-out), filter 0.6s ease, visibility 0s linear 0.8s; }

/* ---- 1.3 entry card (glass on paper) */
.imm-entry__card {
  position: relative; margin: clamp(18px, 2.6vw, 30px) 0 0; padding: clamp(14px, 2vw, 24px);
  border: 1px solid var(--imm-glass-border); border-radius: var(--imm-r-lg);
  background: linear-gradient(165deg, rgba(255, 253, 248, 0.96), rgba(255, 253, 248, 0.86));
  box-shadow: var(--imm-shadow-2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.imm-entry__card::after { /* gold ring used by the "come back here" nudge */
  content: ''; position: absolute; inset: -7px; border-radius: calc(var(--imm-r-lg) + 7px); border: 2px solid var(--imm-gold-400);
  opacity: 0; pointer-events: none;
}
.imm-entry__card.is-nudged::after { animation: imm-journey-ring 1.1s var(--imm-ease-out) 2; }
.imm-entry__card-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 4px clamp(12px, 1.6vw, 18px); }
.reg-logo { height: clamp(40px, 3.6vw, 50px); text-align: left; min-width: 0; }
.reg-logo img { display: block; width: auto; height: 100%; max-width: 100%; }
.imm-entry__card-mark { flex: none; width: clamp(30px, 2.8vw, 38px); aspect-ratio: 1; }
.imm-entry__card-mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.imm-entry__card-mark path { fill: rgba(250, 172, 30, 0.08); stroke: var(--imm-gold-500); stroke-width: 1.6; stroke-linejoin: round; }
.imm-entry__card-mark circle { fill: var(--imm-gold-400); filter: drop-shadow(0 0 3px rgba(250, 172, 30, 0.7)); }

/* accordion panels: account / trial (legacy classes are application state) */
.entry-panels { display: flex; flex-direction: column; gap: 10px; }
.entry-panel {
  border: 1px solid var(--imm-line); border-radius: var(--imm-r-md); background: rgba(255, 255, 255, 0.6); box-shadow: none; overflow: hidden;
  transition: border-color 0.5s ease, box-shadow 0.6s ease, background-color 0.5s ease;
}
.entry-panel.is-open { border-color: var(--imm-line-gold); background: var(--imm-white); box-shadow: 0 14px 34px rgba(250, 172, 30, 0.14), 0 2px 6px rgba(27, 24, 56, 0.05); }
.entry-panel[hidden] { display: none !important; } /* guard: JS pairs `hidden` with inline display, keep both honoured */
.entry-panel-toggle {
  width: 100%; min-height: 62px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(10px, 1.4vw, 16px);
  padding: 10px clamp(10px, 1.4vw, 16px) 10px clamp(10px, 1.2vw, 14px); border: 0; background: none;
  color: var(--imm-ink-2); font: inherit; font-size: var(--imm-fs-md); font-weight: 500; line-height: 1.45; text-align: left;
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color 0.4s ease, color 0.4s ease;
}
.entry-panel-toggle:hover { background: rgba(104, 104, 172, 0.07); }
.entry-panel-toggle:focus-visible { outline-offset: -4px; border-radius: var(--imm-r-md); }
.entry-panel.is-open .entry-panel-toggle { color: var(--imm-ink); background: none; cursor: default; }
.imm-entry__mode {
  width: 42px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  color: var(--imm-violet-600); background: rgba(104, 104, 172, 0.1); box-shadow: inset 0 0 0 1px var(--imm-line);
  transition: color 0.5s ease, background-color 0.5s ease, box-shadow 0.5s ease, transform 0.7s var(--imm-ease-spring);
}
.imm-entry__mode svg { width: 21px; height: 21px; }
.entry-panel.is-open .imm-entry__mode { color: #fff; background: var(--imm-violet-500); box-shadow: 0 8px 20px rgba(104, 104, 172, 0.4); transform: scale(1.06); }
.entry-panel-icon { /* the template glyph is replaced by a drawn chevron */
  width: 30px; height: 30px; display: grid; place-items: center; font-size: 0; color: var(--imm-violet-500);
  transition: transform 0.65s var(--imm-ease-spring);
}
.entry-panel-icon::before { content: ''; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.entry-panel.is-open .entry-panel-icon { transform: rotate(180deg); color: var(--imm-gold-500); }
.entry-panel-body { padding: 2px clamp(12px, 1.6vw, 18px) clamp(14px, 1.8vw, 20px); border-top: 0; }
.entry-panel-body[hidden] { display: none; }
/* JS contract: ONLY `height` may transition on this element (transitionend drives the state machine) */
.entry-panel-collapsing { height: 0; overflow: hidden; transition: height 0.5s var(--imm-ease-out); }
/* the "grand" part of the unfold lives on the children, whose transitionend events JS ignores. `backwards`, not `both`:
   a filled end state leaves blur(0) + a transform on every step, which turns each into its own stacking context and
   breaks the glass of the trial pickers (journey.js §10) — the card's words showed through an open list */
html.imm-js .entry-panel.is-open #login-container,
html.imm-js .entry-panel.is-open #demo-selection > * { animation: imm-journey-unfold 0.75s var(--imm-ease-out) backwards; }
html.imm-js .entry-panel.is-open #demo-selection > :nth-child(3) { animation-delay: 60ms; }
html.imm-js .entry-panel.is-open #demo-selection > :nth-child(4) { animation-delay: 120ms; }
html.imm-js .entry-panel.is-open #demo-selection > :nth-child(5) { animation-delay: 180ms; }
html.imm-js .entry-panel.is-open #demo-selection > :nth-child(n + 6) { animation-delay: 240ms; }

/* account panel: login / greeting markup is injected by compass.js */
#login-container {
  display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin: 6px 0 0;
  background: none; text-align: left; font-size: var(--imm-fs-md); line-height: 1.5;
}
#login-container .btn {
  position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 0.65em;
  min-height: 52px; padding: 0.75em 1.5em; border: 0; border-radius: var(--imm-r-pill);
  background: var(--imm-grad-brand); color: #fff; box-shadow: var(--imm-shadow-violet), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font: inherit; font-size: var(--imm-fs-md); font-weight: 500; line-height: 1.3; text-align: center; text-decoration: none; white-space: normal; cursor: pointer;
  transition: transform var(--imm-dur-2) var(--imm-ease-out), box-shadow var(--imm-dur-2) var(--imm-ease-out);
}
#login-container .btn::before { content: ''; flex: none; width: 1.25em; height: 1.25em; background: currentColor; -webkit-mask: var(--_ico-login) center / contain no-repeat; mask: var(--_ico-login) center / contain no-repeat; }
#login-container .btn::after { /* light sweep */
  content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.9s var(--imm-ease-out);
}
@media (hover: hover) {
  #login-container .btn:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(104, 104, 172, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
  #login-container .btn:hover::after { transform: translateX(120%); }
}
#login-container .btn:active { transform: translateY(0) scale(0.985); }
#login-container #logout { align-self: flex-start; min-height: 46px; background: rgba(104, 104, 172, 0.1); color: var(--imm-violet-700); box-shadow: none; }
#login-container #logout::before { transform: scaleX(-1); }
#login-container .divider { justify-content: flex-start; margin: 2px 0 0; font-size: var(--imm-fs-xl); font-weight: 500; line-height: 1.4; }
#login-container .divider::before { display: none; }
#login-container .divider::after { margin-left: 14px; border-bottom: 1px solid var(--imm-line-gold); }
#login-container .admin-switch-card { width: 100%; margin: 0; padding: 14px 16px; border: 1px dashed var(--imm-line-strong); border-radius: var(--imm-r-md); background: rgba(104, 104, 172, 0.05); }
#login-container .admin-switch-label { margin-bottom: 8px; color: var(--imm-ink-2); font-size: var(--imm-fs-sm); font-weight: 500; }
#login-container .admin-switch-row { gap: 10px; }
#login-container .admin-switch-input { height: 48px; padding: 0.6em 1em; border: 1px solid var(--imm-line-strong); border-radius: var(--imm-r-md); font: inherit; font-size: var(--imm-fs-md); color: var(--imm-ink); }
#login-container .admin-switch-input:focus { border-color: var(--imm-gold-400); box-shadow: 0 0 0 4px rgba(250, 172, 30, 0.22); }
#login-container .admin-switch-btn { min-height: 48px; min-width: 0; padding-inline: 1.3em; box-shadow: none; white-space: nowrap; }
#login-container .admin-switch-btn::before { display: none; }
#login-container .admin-switch-status { margin-top: 8px; font-size: var(--imm-fs-sm); line-height: 1.5; color: var(--imm-ink-3); }
#login-container .admin-switch-status:empty { display: none; }
#login-container .admin-switch-status--success { color: var(--imm-success); }
#login-container .admin-switch-status--error { color: var(--imm-danger); }

/* trial panel: three numbered selects joined by a little trail */
#demo-selection { counter-reset: imm-step; padding-top: 4px; }
.select-container {
  position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: clamp(10px, 1.4vw, 16px); row-gap: 5px;
  margin: 0 0 14px; counter-increment: imm-step;
}
.select-container::before {
  content: counter(imm-step); grid-column: 1; grid-row: 2; align-self: center; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: var(--imm-fs-sm); font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums;
  color: var(--imm-violet-600); background-color: var(--imm-paper); box-shadow: inset 0 0 0 1.5px var(--imm-line-strong);
  transition: color 0.4s ease, background-color 0.5s ease, box-shadow 0.5s ease, transform 0.7s var(--imm-ease-spring);
}
.select-container::after { /* dashed connector to the next step */
  content: ''; position: absolute; left: 14px; bottom: -17px; width: 2px; height: 20px; border-radius: 2px;
  background: repeating-linear-gradient(to bottom, var(--imm-line-strong) 0 4px, transparent 4px 8px);
  transition: background-color 0.5s ease;
}
.select-container:last-of-type::after { display: none; }
.select-container.is-filled::before {
  content: ''; background: var(--imm-gold-400) var(--_ico-check) center / 15px no-repeat; background-blend-mode: multiply;
  box-shadow: 0 0 0 5px rgba(250, 172, 30, 0.18); transform: scale(1.08);
}
.select-container.is-filled::after { background: var(--imm-gold-400); }
.select-container label { grid-column: 2; grid-row: 1; color: var(--imm-ink-2); font-size: var(--imm-fs-sm); font-weight: 500; line-height: 1.5; }
.select-container .custom-select { grid-column: 2; grid-row: 2; width: 100%; min-width: 0; }
.trial-mode-hint {
  position: relative; margin: 2px 0 16px; padding: 10px 14px 10px 42px; border-radius: var(--imm-r-sm);
  background: rgba(104, 104, 172, 0.07); color: var(--imm-ink-2); font-size: var(--imm-fs-sm); line-height: 1.6;
}
.trial-mode-hint::before, .image-caption::before {
  content: ''; position: absolute; left: 13px; top: 12px; width: 18px; height: 18px; background: var(--imm-violet-500);
  -webkit-mask: var(--_ico-info) center / contain no-repeat; mask: var(--_ico-info) center / contain no-repeat;
}
.trial-mode-status {
  display: inline-flex; align-items: flex-start; gap: 10px; min-height: 0; margin: 2px 0 0; padding: 8px 15px 8px 13px;
  border-radius: var(--imm-r-md); border: 1px solid var(--imm-line); background: rgba(104, 104, 172, 0.07);
  color: var(--imm-ink-2); font-size: var(--imm-fs-sm); font-weight: 500; line-height: 1.55;
}
.trial-mode-status:empty { display: none; }
.trial-mode-status::before { content: ''; flex: none; width: 9px; height: 9px; margin-top: 0.45em; border-radius: 50%; background: currentColor; opacity: 0.75; }
.trial-mode-status--active { color: #1d6f4c; border-color: rgba(44, 154, 108, 0.4); background: rgba(44, 154, 108, 0.1); }
.trial-mode-status--active::before { background: var(--imm-success); opacity: 1; box-shadow: 0 0 0 4px rgba(44, 154, 108, 0.2); animation: imm-journey-ping 2.4s ease-out 3; }
.trial-mode-status--pending { color: var(--imm-gold-700); border-color: rgba(250, 172, 30, 0.45); background: rgba(250, 172, 30, 0.12); }
.trial-mode-status--inactive { color: var(--imm-ink-3); }

/* term selector — under the trail lead (owner decision 2026-11-16: moved from the entry card; minimal, immersive).
   Not a card: a quiet "bearing" line — a gold hairline that draws itself, a small label, and the term itself set as
   a large line of text on a dashed gold path (the hero's trail motif). Hidden until signed in or in trial mode. */
.term-selection {
  position: relative; display: block; width: fit-content; max-width: 100%; min-width: min(100%, 19em);
  margin: clamp(18px, 2.4vw, 28px) 0 0; padding: 14px 0 0;
  border: 0; border-radius: 0; background: none; box-shadow: none;
}
.term-selection[hidden] { display: none; }
.term-selection::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, var(--imm-gold-400), rgba(250, 172, 30, 0.28) 55%, rgba(250, 172, 30, 0));
  transform-origin: 0 50%;
}
/* entrance without a lasting filter / transform (a leftover blur(0) would cut the picker's glass off the page) */
html.imm-js .term-selection:not([hidden]) { animation: imm-term-in 0.8s var(--imm-ease-out) backwards; }
@keyframes imm-term-in { from { opacity: 0; transform: translate3d(0, 14px, 0); } }
html.imm-js .term-selection:not([hidden])::before { animation: imm-term-draw 1.1s var(--imm-ease-out) 0.15s both; }
.term-selection label {
  display: flex; align-items: center; gap: 9px; margin: 0;
  color: var(--imm-ink-3); font-size: var(--imm-fs-xs); font-weight: 500; letter-spacing: 0.02em; line-height: 1.5;
}
.term-selection label::before {
  content: ''; flex: none; width: 16px; height: 16px; background: var(--imm-gold-500);
  -webkit-mask: var(--_ico-calendar) center / contain no-repeat; mask: var(--_ico-calendar) center / contain no-repeat;
}
.term-selection .custom-select {
  display: block; width: 100%; min-height: 48px; margin: 2px 0 0; padding: 0.3em 2.2em 0.35em 0;
  border: 0; border-radius: 0; box-shadow: none;
  background-color: transparent;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d18a0c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"),
    repeating-linear-gradient(90deg, rgba(209, 138, 12, 0.55) 0 6px, transparent 6px 12px);
  background-repeat: no-repeat, no-repeat;
  background-position: right 0.2em center, 0 100%;
  background-size: 1em, 100% 1.5px;
  color: var(--imm-ink); font-size: var(--imm-fs-lg); font-weight: 500; line-height: 1.35; text-overflow: ellipsis;
  transition: background-size 0.4s var(--imm-ease-out), color 0.3s ease;
}
.term-selection .custom-select:hover { background-color: transparent; color: var(--imm-accent-strong); }
.term-selection .custom-select:focus { background-color: transparent; box-shadow: none; }
.term-selection .custom-select:focus-visible { outline: 2px solid var(--imm-gold-400); outline-offset: 4px; border-radius: 6px; }
.term-selection .custom-select option { color: var(--imm-ink); font-size: var(--imm-fs-md); }
.term-selection-note { margin: 8px 0 0; max-width: 30em; color: var(--imm-ink-3); font-size: var(--imm-fs-sm); line-height: 1.55; }
.term-selection-note:empty { display: none; }
.term-selection-note.is-future { color: var(--imm-gold-700); }
@keyframes imm-term-draw { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }

/* term picker (journey.js §10) — replaces the browser's drop-down list; the native select stays underneath as the
   source of truth (visually hidden once the picker is built; shown as-is without JavaScript) */
.term-selection.has-picker .custom-select {
  position: absolute; width: 1px; height: 1px; min-height: 0; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap; opacity: 0; pointer-events: none;
}
.term-selection.is-open { z-index: 40; }
.imm-picker { position: relative; margin-top: 2px; }
.imm-picker__btn {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; margin: 0; padding: 0.3em 0.15em 0.4em 0;
  border: 0; border-radius: 0; background: none; color: var(--imm-ink); font: inherit; text-align: left; cursor: pointer;
  background-image: repeating-linear-gradient(90deg, rgba(209, 138, 12, 0.55) 0 6px, transparent 6px 12px);
  background-repeat: no-repeat; background-position: 0 100%; background-size: 100% 1.5px;
  -webkit-tap-highlight-color: transparent;
}
.imm-picker__value { font-size: var(--imm-fs-lg); font-weight: 500; line-height: 1.35; transition: color 0.3s ease; }
.imm-picker__tag, .imm-picker__chip {
  flex: none; display: inline-flex; align-items: center; padding: 0.2em 0.75em; border-radius: var(--imm-r-pill);
  font-size: var(--imm-fs-2xs, 0.8rem); font-weight: 500; line-height: 1.4; letter-spacing: 0.02em; white-space: nowrap;
  color: var(--imm-violet-700, #3b3584); background: rgba(104, 104, 172, 0.1); box-shadow: inset 0 0 0 1px rgba(104, 104, 172, 0.18);
}
.imm-picker__tag[hidden] { display: none; }
.imm-picker__btn.is-now .imm-picker__tag, .imm-picker__opt.is-now .imm-picker__chip {
  color: var(--imm-gold-700); background: rgba(250, 172, 30, 0.14); box-shadow: inset 0 0 0 1px rgba(250, 172, 30, 0.38);
}
.imm-picker__chev {
  flex: none; width: 9px; height: 9px; margin: -4px 4px 0 auto; border-right: 2px solid var(--imm-gold-500); border-bottom: 2px solid var(--imm-gold-500);
  transform: rotate(45deg); transition: transform 0.45s var(--imm-ease-spring), margin 0.45s var(--imm-ease-spring);
}
.imm-picker.is-open .imm-picker__chev { margin-top: 5px; transform: rotate(225deg); }
.imm-picker__btn:hover .imm-picker__value, .imm-picker.is-open .imm-picker__value { color: var(--imm-accent-strong); }
.imm-picker__btn:focus { outline: none; }
.imm-picker__btn:focus-visible { outline: 2px solid rgba(250, 172, 30, 0.75); outline-offset: 6px; border-radius: 10px; }

.imm-picker__pop {
  position: absolute; z-index: 1; top: calc(100% + 10px); left: -10px; min-width: calc(100% + 20px); width: max-content;
  max-width: min(30em, calc(100vw - 2 * var(--imm-gutter, 16px)));
  padding: 8px; border-radius: 20px;
  background: rgba(255, 252, 246, 0.97); -webkit-backdrop-filter: blur(20px) saturate(1.2); backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: 0 0 0 1px rgba(250, 172, 30, 0.3), 0 26px 60px -20px rgba(37, 27, 77, 0.38), 0 3px 10px rgba(37, 27, 77, 0.08);
  transform-origin: 24px 0;
}
.imm-picker__pop::before { /* the gold hairline of the bearing line, carried onto the card */
  content: ''; position: absolute; left: 18px; right: 18px; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, rgba(250, 172, 30, 0), var(--imm-gold-400), rgba(250, 172, 30, 0));
}
.imm-picker.is-up .imm-picker__pop { top: auto; bottom: calc(100% + 10px); transform-origin: 24px 100%; }
.imm-picker__pop[hidden] { display: none; }
html.imm-js .imm-picker.is-open .imm-picker__pop { animation: imm-picker-in 0.32s var(--imm-ease-out) both; }
html.imm-js .imm-picker.is-open .imm-picker__opt { animation: imm-picker-row 0.42s var(--imm-ease-out) both; }
html.imm-js .imm-picker.is-open .imm-picker__opt:nth-child(2) { animation-delay: 0.04s; }
html.imm-js .imm-picker.is-open .imm-picker__opt:nth-child(3) { animation-delay: 0.08s; }
html.imm-js .imm-picker.is-open .imm-picker__opt:nth-child(n + 4) { animation-delay: 0.12s; }
@keyframes imm-picker-in { from { opacity: 0; transform: translate3d(0, -6px, 0) scale(0.97); } }
@keyframes imm-picker-row { from { opacity: 0; transform: translate3d(0, 6px, 0); } }

.imm-picker__list { margin: 0; padding: 0; list-style: none; outline: none; max-height: min(60vh, 22rem); overflow-y: auto; overscroll-behavior: contain; }
.imm-picker__opt {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 52px; padding: 8px 14px 8px 12px; border-radius: 14px; cursor: pointer;
  color: var(--imm-ink-2); transition: background-color 0.2s ease, color 0.2s ease;
}
.imm-picker__opt + .imm-picker__opt { margin-top: 2px; }
.imm-picker__opt.is-active { background: rgba(104, 104, 172, 0.09); color: var(--imm-ink); }
.imm-picker__list:focus-visible .imm-picker__opt.is-active { box-shadow: inset 0 0 0 2px var(--imm-gold-400); }
.imm-picker__opt.is-selected { color: var(--imm-accent-strong); }
.imm-picker__opt[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; }
.imm-picker__name { font-size: var(--imm-fs-md); font-weight: 500; line-height: 1.35; }
/* a compass point: an empty ring, filled gold on the chosen term */
.imm-picker__mark { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(104, 104, 172, 0.4); transition: background-color 0.25s ease, box-shadow 0.25s ease; }
.imm-picker__opt.is-selected .imm-picker__mark {
  background: var(--imm-gold-400); box-shadow: 0 0 0 4px rgba(250, 172, 30, 0.2), 0 0 12px rgba(250, 172, 30, 0.55);
}

html.imm-reduced .imm-picker__pop, html.imm-reduced .imm-picker__opt { animation: none !important; }
html.a11y-high-contrast .imm-picker__btn { background-image: none; border-bottom: 2px solid var(--imm-ink); color: var(--imm-ink); }
html.a11y-high-contrast .imm-picker__chev { border-color: var(--imm-ink); }
html.a11y-high-contrast .imm-picker__pop { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 0 0 2px var(--imm-ink); }
html.a11y-high-contrast .imm-picker__pop::before { display: none; }
html.a11y-high-contrast .imm-picker__opt { color: var(--imm-ink); }
html.a11y-high-contrast .imm-picker__opt.is-active { background: #fff; box-shadow: inset 0 0 0 2px var(--imm-ink); }
html.a11y-high-contrast .imm-picker__opt.is-selected .imm-picker__mark { background: var(--imm-ink); box-shadow: none; }
html.a11y-high-contrast :is(.imm-picker__tag, .imm-picker__chip) { color: var(--imm-ink); background: #fff; box-shadow: inset 0 0 0 1.5px var(--imm-ink); }

/* the trial steps use the same picker (owner request 2026-11-17). Placeholders ("-- เลือกคณะ --") show on the trigger
   only; a step still waiting for the one before it is a quiet, disabled trigger. The list is as wide as its step. */
.select-container.has-picker .custom-select {
  position: absolute; width: 1px; height: 1px; min-height: 0; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap; opacity: 0; pointer-events: none;
}
.select-container.is-open { z-index: 40; }
.entry-panel.is-open { overflow: visible; } /* the open list may reach past the panel (the unfolding body clips itself) */
.select-container .imm-picker { grid-column: 2; grid-row: 2; min-width: 0; margin-top: 0; }
.select-container .imm-picker__btn { min-height: 46px; }
.select-container .imm-picker__value { min-width: 0; font-size: var(--imm-fs-md); }
.select-container .imm-picker__pop { width: calc(100% + 20px); min-width: 0; max-width: none; }
.imm-picker__btn.is-empty .imm-picker__value { color: var(--imm-ink-3); font-weight: 400; }
.imm-picker__btn:disabled { cursor: default; background-image: repeating-linear-gradient(90deg, rgba(104, 104, 172, 0.28) 0 6px, transparent 6px 12px); }
.imm-picker__btn:disabled .imm-picker__value { color: var(--imm-ink-3); opacity: 0.75; }
.imm-picker__btn:disabled .imm-picker__chev { border-color: var(--imm-line-strong); }

/* back from the CMU sign-in: the page opens on the trail (journey.js §9), never on a flash of the hero. boot.js sets
   .imm-arriving before the first paint; if the script never places the page, the content shows by itself. */
html.imm-arriving #imm-main { opacity: 0; animation: imm-arrive-safety 0.4s ease 3.2s forwards; }
html.imm-arrived #imm-main { animation: imm-arrive-in 0.55s ease both; }
@keyframes imm-arrive-safety { to { opacity: 1; } }
@keyframes imm-arrive-in { from { opacity: 0; } }

/* "go on" call-to-action, revealed by journey.js when the menus are unlocked */
.imm-entry__go { display: none; width: 100%; margin-top: 14px; }
.imm-journey.is-unlocked .imm-entry__go { display: inline-flex; }
html.imm-js .imm-journey.is-unlocked .imm-entry__go { animation: imm-journey-unfold 0.8s var(--imm-ease-spring) both; }
.imm-entry__go svg { width: 1.2em; height: 1.2em; }
html.imm-js .imm-journey.is-unlocked .imm-entry__go svg { animation: imm-journey-nod 1.6s var(--imm-ease-in-out) 0.9s 3; }

/* ==================================================================== 2. TRAIL */
.imm-trail { position: relative; padding-block: clamp(40px, 6vw, 96px) clamp(72px, 10vw, 168px); overflow-x: clip; }
.imm-trail__bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.imm-trail__bg .imm-topo { color: var(--imm-violet-400); }

.imm-trail__grid {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'head' 'list';
  gap: 0; row-gap: clamp(20px, 3vw, 32px); margin: 0; padding: 0;
}
.imm-trail__head { grid-area: head; min-width: 0; }
.imm-trail__lead { margin: 0.5em 0 0; max-width: 30em; }
/* the head reads as two groups (owner 2026-11-19): what this act is — eyebrow, title, lead, set tight — and its
   controls in the bearing card (term + AI note; a card only where the vista is not shown, see §3) */
.imm-trail__intro .imm-trail__title { margin-top: 0.12em; }
.imm-trail__intro .imm-trail__lead { margin-top: 0.25em; }
.imm-trail__bearing { position: relative; min-width: 0; }
.imm-trail__rose { display: none; }
.imm-trail__list { grid-area: list; position: relative; display: block; width: auto; min-width: 0; }

/* ---- 2.1 AI disclaimer fold (shown wherever the vista, which carries the same note, is not) */
.imm-fold--ai {
  display: none; position: relative; margin-top: 16px; border: 1px solid var(--imm-line); border-radius: var(--imm-r-md);
  background: rgba(255, 255, 255, 0.6); overflow: hidden; transition: border-color 0.5s ease, background-color 0.5s ease, box-shadow 0.6s ease;
}
.imm-fold--ai.is-open { border-color: var(--imm-line-gold); background: var(--imm-white); box-shadow: var(--imm-shadow-1); }
/* scoped to the --ai variant: the modal (modal.css) owns the canonical .imm-fold skin */
.imm-fold--ai .imm-fold__toggle {
  position: relative; width: 100%; min-height: 50px; display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 10px;
  border: 0; background: none; color: var(--imm-ink-2); font: inherit; font-size: var(--imm-fs-sm); font-weight: 500; line-height: 1.5; text-align: left;
}
.imm-fold--ai .imm-fold__toggle:focus-visible { outline-offset: -4px; border-radius: var(--imm-r-md); }
.imm-fold--ai .imm-fold__toggle::after { /* gold hairline that draws itself while the note unfolds */
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 1px; background: var(--imm-grad-gold);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.9s var(--imm-ease-out);
}
.imm-fold--ai.is-open > .imm-fold__toggle::after { transform: scaleX(1); }
.imm-fold--ai .imm-fold__icon { flex: none; width: 32px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; color: var(--imm-gold-600); background: rgba(250, 172, 30, 0.14); transition: transform 0.7s var(--imm-ease-spring); }
.imm-fold--ai.is-open .imm-fold__icon { transform: rotate(-12deg) scale(1.08); }
.imm-fold--ai .imm-fold__icon svg { width: 17px; height: 17px; }
.imm-fold--ai .imm-fold__title { flex: 1; min-width: 0; }
.imm-fold--ai .imm-fold__toggle .imm-chevron { color: var(--imm-violet-500); margin-right: 4px; }
/* the note about the analysis reads as a calm, professional footnote, not an alarm (owner request 2026-11-17) */
.mobile-ai-disclaimer { display: block; margin: 0; padding: 12px 16px 14px; color: var(--imm-ink-2); font-size: var(--imm-fs-sm); line-height: 1.7; }
.mobile-ai-disclaimer br, .image-caption .text-danger br { display: none; }

/* ---- 2.2 gate banner (menus locked) */
.imm-trail__gate { display: none; }
.imm-trail__gate:not([hidden]) {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; width: 100%; min-height: 54px; margin: 0 0 clamp(12px, 1.6vw, 18px);
  padding: 9px 16px 9px 10px; border: 1px dashed var(--imm-line-gold); border-radius: var(--imm-r-md); background: rgba(250, 172, 30, 0.08);
  color: var(--imm-ink-2); font: inherit; font-size: var(--imm-fs-sm); line-height: 1.5; text-align: left; cursor: pointer;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}
html.imm-js .imm-trail__gate:not([hidden]) { animation: imm-journey-unfold 0.8s var(--imm-ease-out) both; }
.imm-trail__gate:hover { background: rgba(250, 172, 30, 0.15); border-color: var(--imm-gold-400); }
.imm-trail__gate-icon { flex: none; width: 34px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; color: var(--imm-gold-700); background: rgba(250, 172, 30, 0.2); }
.imm-trail__gate-icon svg { width: 17px; height: 17px; }
.imm-trail__gate-text { font-weight: 500; }
@media (max-width: 599.98px) {
  .imm-trail__gate-icon { grid-row: 1 / span 2; }
  .imm-trail__gate-cta { grid-column: 2; grid-row: 2; justify-self: start; }
}
.imm-trail__gate-cta { display: inline-flex; align-items: center; gap: 6px; color: var(--imm-violet-600); font-weight: 500; white-space: nowrap; }
.imm-trail__gate-cta svg { width: 16px; height: 16px; transition: transform 0.5s var(--imm-ease-out); }
.imm-trail__gate:hover .imm-trail__gate-cta svg { transform: translateY(-3px); }

/* ---- 2.3 waypoint list + trail line */
.menu-container {
  --_gap: clamp(10px, 1.1vw, 14px);
  position: relative; display: flex; flex-direction: column; gap: var(--_gap); margin: 0; color: inherit;
  overflow-anchor: none; /* cards fold/unfold while scrolling: never let them become scroll anchors */
}
.imm-waypoint { --_dot: 50%; position: relative; }
.imm-waypoint:has(.menu-item[hidden]) { display: none; }
.imm-waypoint__dot { display: none; }
.imm-waypoint::before, .imm-waypoint::after { display: none; }

.imm-waypoint__card {
  position: relative; isolation: isolate; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  border: 1px solid var(--imm-line); border-radius: var(--imm-r-lg); background: var(--imm-surface); box-shadow: var(--imm-shadow-1);
  transition: transform 0.9s var(--imm-ease-out), box-shadow 0.6s var(--imm-ease-out), border-color 0.5s ease, background-color 0.5s ease,
    grid-template-rows 0.75s var(--imm-ease-spring);
}
.imm-waypoint__card::before { /* gold hairline that draws on hover / focus / spotlight */
  content: ''; position: absolute; left: var(--imm-r-lg); right: var(--imm-r-lg); bottom: -1px; height: 2px; border-radius: 2px; z-index: 2;
  background: var(--imm-grad-gold); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.9s var(--imm-ease-out);
}
.imm-waypoint.is-current .imm-waypoint__card::before { transform: scaleX(1); }

.imm-waypoint__num {
  position: relative; z-index: 1; font-size: clamp(2.2rem, 1.5rem + 1.9vw, 3.4rem); font-weight: 200; line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: transparent; -webkit-text-stroke: 1px var(--imm-violet-300); transition: -webkit-text-stroke-color 0.5s ease;
}
.imm-waypoint__num::after { /* gold fill that fades in when the waypoint is lit */
  content: attr(data-n); position: absolute; left: 0; top: 0; -webkit-text-stroke: 0; background: var(--imm-grad-gold);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; opacity: 0; transition: opacity 0.5s ease;
}
.imm-waypoint.is-current .imm-waypoint__num, .imm-waypoint.is-passed .imm-waypoint__num { -webkit-text-stroke-color: transparent; }
.imm-waypoint.is-current .imm-waypoint__num::after, .imm-waypoint.is-passed .imm-waypoint__num::after { opacity: 1; }

/* the legacy item becomes a transparent, stretched hit-area inside the card */
.menu-item {
  position: static; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; min-width: 0; margin: 0;
  border: 0; border-radius: 0; background: none; box-shadow: none; transform: none; transition: none; opacity: 1;
  color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.menu-item::after { content: ''; position: absolute; inset: 0; z-index: 3; border-radius: var(--imm-r-lg); }
.menu-item:hover, .menu-item:active { transform: none; background: none; box-shadow: none; }
.menu-item:focus-visible { outline: none; box-shadow: none; }
.menu-item:focus-visible::after { outline: 2px solid var(--imm-gold-400); outline-offset: 3px; }
/* compass.js relies on this: a disabled item must not receive pointer events (it would show a native alert) */
.menu-item.awaiting-selection.disabled { opacity: 1; pointer-events: none; }

.icon-wrapper {
  --_ic: clamp(40px, 3.2vw, 50px); /* badge size; the glyph is sized from it (a % width would resolve against an auto grid track) */
  position: relative; z-index: 1; flex: none; width: var(--_ic); height: var(--_ic); padding: 0; border-radius: 50%; display: grid; place-items: center;
  color: var(--imm-violet-600); background-color: rgba(104, 104, 172, 0.09);
  transition: color 0.5s ease, background-color 0.5s ease, transform 0.8s var(--imm-ease-spring), box-shadow 0.5s ease;
}
.icon-wrapper::before { /* fine tick ring */
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  background: repeating-conic-gradient(var(--imm-line-strong) 0 1.4deg, transparent 1.4deg 15deg);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
  mask: radial-gradient(closest-side, transparent calc(100% - 3.5px), #000 calc(100% - 3px));
  transition: transform 1.3s var(--imm-ease-out);
}
.icon-wrapper svg { width: calc(var(--_ic) * 0.46); height: calc(var(--_ic) * 0.46); stroke-width: 1.8; }
.imm-waypoint.is-current .icon-wrapper { color: #fff; background-color: var(--imm-violet-500); box-shadow: 0 8px 22px rgba(104, 104, 172, 0.42); }
.imm-waypoint.is-current .icon-wrapper::before { transform: rotate(52.5deg); }

.menu-text { position: relative; z-index: 1; min-width: 0; }
.menu-text h3 { margin: 0; font-size: var(--imm-fs-lg); font-weight: 500; line-height: 1.45; color: var(--imm-ink); text-wrap: balance; transition: color 0.4s ease; }
.menu-text p { margin: 0; font-size: var(--imm-fs-sm); line-height: 1.6; color: var(--imm-ink-3); text-wrap: pretty; transition: color 0.4s ease, opacity 0.45s ease; }
.menu-text p br { display: none; } /* let descriptions reflow to the card width (no orphaned words) */
.menu-title-with-badge { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.menu-new-badge {
  min-height: 0; padding: 0.28em 0.7em 0.24em; border: 0; border-radius: var(--imm-r-pill); background: var(--imm-grad-gold); color: #2b1d00;
  box-shadow: 0 4px 12px rgba(250, 172, 30, 0.35); font-size: 0.62rem; font-weight: 600; line-height: 1; letter-spacing: 0.16em; transform: none;
}
.imm-waypoint__brand { display: block; width: auto; height: 1.5rem; opacity: 0.95; }
/* #qq after a questionnaire was submitted (compass.js rewrites .menu-text) */
.menu-item.qq-submitted .menu-text { width: auto; }
.menu-item.qq-submitted .qq-status-title { margin: 0; font-size: var(--imm-fs-lg); font-weight: 500; line-height: 1.45; color: var(--imm-ink); }
.menu-item.qq-submitted .qq-status-caption { margin: 0; font-size: var(--imm-fs-sm); line-height: 1.6; color: var(--imm-ink-3); }
.menu-item.qq-submitted .qq-status-code {
  display: inline-block; margin-top: 6px; padding: 0.28em 0.75em; border: 1px solid var(--imm-line-gold); border-radius: var(--imm-r-sm);
  background: rgba(250, 172, 30, 0.12); color: var(--imm-violet-800); font-size: var(--imm-fs-xl); font-weight: 600; line-height: 1.1; letter-spacing: 0.08em;
}

.imm-waypoint__go {
  position: relative; z-index: 1; width: 44px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  color: var(--imm-violet-500); box-shadow: inset 0 0 0 1px var(--imm-line-strong);
  transition: color 0.4s ease, background-color 0.5s ease, box-shadow 0.5s ease, transform 0.7s var(--imm-ease-out);
}
.imm-waypoint__go svg { grid-area: 1 / 1; width: 20px; height: 20px; transition: transform 0.6s var(--imm-ease-out), opacity 0.35s ease; }
.imm-waypoint__padlock { opacity: 0; transform: scale(0.5); }
.imm-waypoint.is-current .imm-waypoint__go { color: #fff; background-color: var(--imm-violet-500); box-shadow: 0 10px 26px rgba(104, 104, 172, 0.45); transform: translateX(4px); }
.imm-waypoint.is-current .imm-waypoint__arrow { animation: imm-journey-arrow 0.8s var(--imm-ease-out); }

.imm-waypoint__glare { display: none; }
.imm-waypoint__cue { display: none; }
.imm-waypoint__chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 0.42em 1em; border-radius: var(--imm-r-pill);
  font-size: var(--imm-fs-xs); font-weight: 500; line-height: 1.4; white-space: nowrap;
}
.imm-waypoint__chip--lock { display: none; }
html.imm-fine .imm-cue-touch, html:not(.imm-fine) .imm-cue-fine { display: none; }

/* locked: the visitor has not signed in / completed a trial selection yet. The cards stay beautiful
   (they still preview their vista); the padlock, a quieter badge and the hint chip carry the state. */
.imm-waypoint.is-locked .imm-waypoint__card { cursor: pointer; }
.imm-waypoint.is-locked .icon-wrapper { color: var(--imm-ink-3); background-color: rgba(111, 107, 144, 0.1); box-shadow: none; }
.imm-waypoint.is-locked .imm-waypoint__arrow { opacity: 0; transform: scale(0.5); animation: none; }
.imm-waypoint.is-locked .imm-waypoint__padlock { opacity: 1; transform: none; }
.imm-waypoint.is-locked .imm-waypoint__go { color: var(--imm-gold-600); background-color: rgba(250, 172, 30, 0.14); box-shadow: inset 0 0 0 1px var(--imm-line-gold); transform: none; }
.imm-waypoint.is-locked .imm-waypoint__chip--open { display: none; }
.imm-waypoint.is-locked .imm-waypoint__chip--lock { display: inline-flex; }

/* ---- 2.4 vista viewport */
.imm-vista {
  grid-area: vista; align-self: start; position: static; width: auto; min-width: 0; padding: 0; border: 0; border-radius: 0; overflow: visible;
  background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; z-index: auto;
}
.imm-vista__frame {
  position: relative; width: 100%; height: auto; aspect-ratio: 21 / 9; min-height: 260px; padding: 0; border-radius: var(--imm-r-xl); overflow: hidden; isolation: isolate;
  background: var(--imm-violet-900); box-shadow: var(--imm-shadow-3);
}
/* ---- the trail is sealed until the menus unlock (journey.js); it unveils like a map being unrolled toward you:
   the section rises out of the paper, the heading clears, then the waypoints arrive one after another */
.imm-trail[hidden] { display: none !important; }
.imm-trail.is-unsealing { animation: imm-trail-unseal 1.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.imm-trail.is-unsealing .imm-trail__head { animation: imm-trail-unseal-head 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both; }
.imm-trail.is-unsealing .imm-waypoint { animation: imm-trail-unseal-item 1.1s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(0.35s + var(--imm-i, 0) * 0.09s); }
.imm-trail.is-unsealing .imm-vista { animation: imm-trail-unseal-item 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both; }
@keyframes imm-trail-unseal { from { opacity: 0; clip-path: inset(0 0 100% 0 round 0 0 48px 48px); } to { opacity: 1; clip-path: inset(0 0 -2% 0 round 0); } }
@keyframes imm-trail-unseal-head { from { opacity: 0; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }
@keyframes imm-trail-unseal-item { from { opacity: 0; transform: translate3d(0, 34px, 0) scale(0.985); } to { opacity: 1; transform: none; } }
html.imm-reduced .imm-trail.is-unsealing, html.imm-reduced .imm-trail.is-unsealing * { animation: none !important; }

/* destinations cross-dissolve (opacity only: composited, no repaint). The incoming photo fades in on top while the
   outgoing one lingers underneath a beat longer, so the frame never dips toward the dark backing between photos. */
.image-item {
  position: absolute; inset: 0; width: auto; height: auto; z-index: 1; opacity: 0; visibility: hidden;
  transition: opacity 0.9s cubic-bezier(0.45, 0, 0.55, 1) 0.28s, visibility 0s linear 1.2s;
}
.image-item.active {
  z-index: 2; opacity: 1; visibility: visible;
  transition: opacity 0.85s cubic-bezier(0.33, 0, 0.2, 1), visibility 0s;
}
.imm-vista__pan {
  position: absolute; inset: -7% -3%;
  transform: translate3d(calc(var(--imm-mx) * -12px), calc((var(--imm-p) - 0.5) * -8% + var(--imm-my) * -8px), 0);
  will-change: transform;
}
/* a slow camera settle under the dissolve (small scale: reads as depth, not as movement) */
.image-item .imm-vista__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; border: 0; transform: scale(1.05); transition: transform 2.2s cubic-bezier(0.22, 1, 0.36, 1); }
.image-item.active .imm-vista__img { transform: none; }
.color-overlay { /* scrim + a breath of dawn so eight different photos read as one film */
  position: absolute; inset: 0; padding: 0; opacity: 1;
  background-image:
    linear-gradient(to top, rgba(var(--_scrim), 0.86) 0%, rgba(var(--_scrim), 0.5) 26%, rgba(var(--_scrim), 0) 56%),
    linear-gradient(to bottom, rgba(var(--_scrim), 0.34), rgba(var(--_scrim), 0) 24%),
    linear-gradient(147deg, rgba(250, 172, 30, 0.06), rgba(104, 104, 172, 0.08) 74%);
}
/* the night photograph needs its exposure lifted to show the chedi, the stars and the city lights */
.image-item[data-imm-dest='insights'] .imm-vista__img { filter: brightness(1.24) saturate(1.06); }
.image-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: clamp(20px, 2.8vw, 44px); padding-right: clamp(20px, 12%, 140px);
  background: none; color: #fff; transform: translate3d(calc(var(--imm-mx) * 7px), calc(var(--imm-my) * 5px), 0);
}
.image-overlay > * { opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity 0.3s ease, transform 0.3s ease; }
.image-item.active .image-overlay > * { opacity: 1; transform: none; transition: opacity 0.8s ease 0.3s, transform 1s var(--imm-ease-out) 0.3s; }
.image-item.active .image-overlay > h2 { transition-delay: 0.4s; }
.image-item.active .image-overlay > p { transition-delay: 0.5s; }
.image-overlay h2 { margin: 0.45em 0 0.25em; font-size: var(--imm-fs-2xl); font-weight: 600; line-height: 1.3; letter-spacing: 0; text-wrap: balance; text-shadow: 0 2px 20px rgba(var(--_scrim), 0.5); }
.image-overlay p { margin: 0; max-width: 32em; font-size: var(--imm-fs-md); font-weight: 300; line-height: 1.7; opacity: 0.92; text-wrap: pretty; }
.image-item.active .image-overlay > p { opacity: 0.92; }
.imm-vista__tag {
  display: inline-flex; align-items: center; gap: 0.75em; font-size: var(--imm-fs-xs); font-weight: 500; letter-spacing: var(--imm-track-eyebrow);
  text-transform: uppercase; color: var(--imm-gold-200);
}
.imm-vista__tag::before { content: ''; width: 2.4em; height: 1px; background: currentColor; opacity: 0.7; }
.imm-vista__tag i { font-style: normal; opacity: 0.6; margin-left: -0.3em; }
/* locked preview: the destination stays visible and only slightly muted; the padlock on the readout carries the state */
.imm-journey.is-locked .image-item:not(#default-image) .imm-vista__img { filter: saturate(0.82) brightness(0.96); }
.imm-journey.is-locked .image-item[data-imm-dest='insights'] .imm-vista__img { filter: brightness(1.18) saturate(0.92); }
.imm-journey.is-locked .image-item:not(#default-image) .imm-vista__tag::after {
  content: ''; width: 1.15em; height: 1.15em; margin-left: 0.2em; background: currentColor;
  -webkit-mask: var(--_ico-lock) center / contain no-repeat; mask: var(--_ico-lock) center / contain no-repeat;
}
.imm-vista__frame > .imm-grain { z-index: 3; }
.imm-vista__hud { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.imm-vista__mark { /* the entry arch in miniature, a lantern lit inside */
  position: absolute; top: clamp(14px, 1.6vw, 24px); right: clamp(16px, 1.8vw, 26px); width: clamp(30px, 2.6vw, 42px); aspect-ratio: 1;
  filter: drop-shadow(0 1px 6px rgba(var(--_scrim), 0.6));
}
.imm-vista__mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.imm-vista__mark path { fill: rgba(var(--_scrim), 0.3); stroke: var(--imm-gold-200); stroke-width: 1.5; stroke-linejoin: round; }
.imm-vista__mark circle { fill: var(--imm-gold-300); }
.imm-vista__coord { position: absolute; top: 18px; left: 46px; font-size: var(--imm-fs-xs); font-weight: 300; letter-spacing: 0.16em; line-height: 1.2; color: rgba(255, 255, 255, 0.86); text-shadow: 0 1px 8px rgba(var(--_scrim), 0.6); }
.image-caption {
  position: relative; margin: 14px 2px 0; padding: 0 0 0 30px; border: 0; text-align: left; color: var(--imm-ink-3); font-size: var(--imm-fs-xs); line-height: 1.65;
}
.image-caption::before { left: 2px; top: 0.15em; width: 17px; height: 17px; background: var(--imm-ink-3); }
.image-caption .text-danger { color: var(--imm-ink-3); } /* a footnote, not an alarm (owner request 2026-11-17) */

/* ==================================================================== 3. < 1024px — compact rows: numeral · icon · words · arrow
   Owner requests 2026-11-17: the open photo cards (a 100–190px photo over every waypoint) made the phone list far too
   long, and photo thumbnails read like a travel guide — each waypoint is one compact paper row like the desktop list:
   the outlined numeral, the line icon in its tick ring, the words, the arrow; the whole row is the tap target (so no
   "tap to open" chip). Nothing changes size while scrolling (owner report 2026-11-16: no scroll-driven folding on
   phones); the spotlight still marks the row in the middle with paint-only changes. */
@media (max-width: 1023.98px), (max-width: 1199.98px) and (max-aspect-ratio: 999/1000) {
  .imm-waypoint__card {
    grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto; align-items: center;
    padding: 13px 10px 13px 14px; overflow: hidden; border-radius: 20px;
  }
  .imm-waypoint__card::before { left: 0; right: 0; bottom: 0; border-radius: 0; z-index: 4; }
  .imm-waypoint__cue { display: none; }
  .imm-waypoint__num { grid-column: 1; grid-row: 1; padding-right: 10px; font-size: clamp(1.6rem, 1.35rem + 1vw, 2.1rem); }
  .menu-item { grid-column: 2; grid-row: 1; column-gap: 12px; padding: 0 8px 0 0; }
  .icon-wrapper { --_ic: 40px; }
  .menu-text h3, .menu-item.qq-submitted .qq-status-title { font-size: clamp(0.98rem, 0.9rem + 0.4vw, 1.12rem); line-height: 1.38; }
  .menu-text p, .menu-item.qq-submitted .qq-status-caption { margin-top: 2px; font-size: clamp(0.8rem, 0.76rem + 0.2vw, 0.9rem); line-height: 1.5; }
  .menu-item.qq-submitted .qq-status-code { margin-top: 4px; font-size: var(--imm-fs-md); }
  .menu-title-with-badge { gap: 2px 8px; }
  .menu-new-badge { font-size: 0.56rem; }
  .imm-waypoint__brand { height: 1.05rem; }
  .imm-waypoint__go { grid-column: 3; grid-row: 1; width: 36px; margin-right: 3px; }
  .imm-waypoint__go svg { width: 17px; height: 17px; }
  .imm-waypoint.is-current .imm-waypoint__go { transform: none; }

  /* reveals arrive one at a time on small screens: no staggered delay */
  .menu-container > .imm-waypoint { --imm-i: 0 !important; } /* !important: the engine writes --imm-i inline */
}

/* below 1024px there is no vista (the rows carry the words alone); its AI note moves into the folded pill */
@media (max-width: 1023.98px), (max-width: 1199.98px) and (max-aspect-ratio: 999/1000) {
  .imm-vista { display: none; }
  .imm-fold--ai { display: block; }

  /* the bearing card: the term (label · value · note, set tight) and the AI note as its last row, on frosted paper
     with a compass rose drifting in its corner — the controls read as one group, apart from the title */
  /* no overflow / filter / isolation on the card itself: the term picker's menu must spill out above the list */
  .imm-trail__bearing {
    margin-top: 18px; padding: 16px 18px 14px;
    border: 1px solid var(--imm-line); border-radius: var(--imm-r-lg);
    background:
      radial-gradient(120% 90% at 100% 0%, rgba(250, 172, 30, 0.13), rgba(250, 172, 30, 0) 58%),
      radial-gradient(90% 80% at 0% 100%, rgba(104, 104, 172, 0.08), rgba(104, 104, 172, 0) 60%),
      rgba(255, 253, 248, 0.86);
    box-shadow: var(--imm-shadow-1);
  }
  .imm-trail__rose-clip { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
  .imm-trail__bearing .term-selection { width: auto; min-width: 0; margin: 0; padding: 0; }
  .imm-trail__bearing .term-selection::before { display: none; } /* the card edge groups it now */
  .imm-trail__bearing .term-selection .custom-select { margin-top: 0; }
  .imm-trail__bearing .term-selection-note { margin-top: 4px; font-size: var(--imm-fs-xs); }
  .imm-trail__bearing .imm-fold--ai {
    margin: 14px -18px -14px; border: 0; border-top: 1px solid var(--imm-line); border-radius: 0 0 var(--imm-r-lg) var(--imm-r-lg);
    background: rgba(255, 255, 255, 0.35); box-shadow: none;
  }
  .imm-trail__bearing .imm-fold--ai.is-open { background: rgba(255, 255, 255, 0.7); }
  .imm-trail__bearing .term-selection[hidden] ~ .imm-fold--ai { margin-top: -16px; border-top: 0; } /* not signed in yet */
  .imm-trail__rose {
    display: block; position: absolute; right: -30px; top: -34px; width: 148px; height: 148px;
    color: var(--imm-violet-500); opacity: 0.16; pointer-events: none;
  }
  .imm-trail__rose-ring { fill: none; stroke: currentColor; stroke-width: 1.2; }
  .imm-trail__rose-dash { fill: none; stroke: currentColor; stroke-width: 0.8; stroke-dasharray: 2 4; }
  .imm-trail__rose-tick { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
  .imm-trail__rose-tail { fill: currentColor; opacity: 0.55; }
  .imm-trail__rose-tip { fill: var(--imm-gold-500); opacity: 1; }
  .imm-trail__rose-pin { fill: currentColor; }
  .imm-trail__rose-needle { transform-origin: 60px 60px; transform: rotate(32deg); animation: imm-rose-sway 7s var(--imm-ease-in-out) infinite alternate; }
}
@keyframes imm-rose-sway { from { transform: rotate(24deg); } to { transform: rotate(44deg); } }
html.imm-reduced .imm-trail__rose-needle { animation: none; }
html.a11y-high-contrast .imm-trail__bearing { background: #fff; border: 2px solid var(--imm-ink); box-shadow: none; }
html.a11y-high-contrast .imm-trail__rose-clip { display: none; }
/* tablets: the two groups side by side, so the head fills its width instead of leaving the right half bare */
@media (min-width: 600px) and (max-width: 1023.98px), (min-width: 600px) and (max-width: 1199.98px) and (max-aspect-ratio: 999/1000) {
  .imm-trail__head {
    display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); column-gap: clamp(20px, 3.6vw, 40px); align-items: end;
  }
  .imm-trail__bearing { margin-top: 0; }
  .imm-trail__rose { width: 172px; height: 172px; right: -34px; top: -40px; }
}

/* ==================================================================== 4. breakpoints */
@media (min-width: 600px) {
  /* tablets / large phones: a wider, lower banner arch; the guide keeps the left of the water */
  .imm-arch { --_w: min(100%, 780px); --_ratio: 1.78; --_mask: var(--_arch-low); --_photo: 50% 57%; --_ew: 30cqw; --_ex: 5cqw; --_drop: 4.4cqw; --_band: 2cqw; --_mist-y: 52%; }

  /* trail line + waypoint dots. The dashed path runs the whole list (ends feathered); each waypoint
     owns the gold segment above its dot (::before) and below it (::after), lit by journey.js state:
     passed waypoints are fully lit, the spotlit one is lit up to its dot. */
  .imm-trail__list { padding-left: 44px; }
  .menu-container::before {
    content: ''; position: absolute; left: -31px; top: 0; bottom: 0; width: 2px; border-radius: 2px; opacity: 0.8;
    background: repeating-linear-gradient(to bottom, var(--imm-violet-300) 0 5px, transparent 5px 11px);
    -webkit-mask: linear-gradient(transparent, #000 34px, #000 calc(100% - 34px), transparent);
    mask: linear-gradient(transparent, #000 34px, #000 calc(100% - 34px), transparent);
  }
  .imm-waypoint { --_dot: 50%; } /* the dot sits level with the row's middle */
  .imm-waypoint::before, .imm-waypoint::after {
    content: ''; display: block; position: absolute; left: -31px; width: 2px; z-index: 0; pointer-events: none;
    background: linear-gradient(to bottom, var(--imm-gold-300), var(--imm-gold-500)); box-shadow: 0 0 10px rgba(250, 172, 30, 0.5);
    transform: scaleY(0); transition: transform 0.55s var(--imm-ease-out);
  }
  .imm-waypoint::before { top: calc(var(--_gap) / -2); height: calc(var(--_dot) + var(--_gap) / 2); transform-origin: 50% 0; }
  .imm-waypoint::after { top: var(--_dot); bottom: calc(var(--_gap) / -2); transform-origin: 50% 0; }
  .imm-waypoint:first-child::before, .imm-waypoint:last-child::after { display: none; }
  .imm-waypoint.is-passed::before, .imm-waypoint.is-passed::after, .imm-waypoint.is-spot::before { transform: scaleY(1); }
  .imm-waypoint.is-spot::before { transition-delay: 0.22s; }
  .imm-waypoint__dot {
    display: block; position: absolute; left: -38px; top: var(--_dot); width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; z-index: 1;
    background: var(--imm-bg); border: 2px solid var(--imm-violet-300);
    transition: border-color 0.5s ease, background-color 0.5s ease, box-shadow 0.6s ease, transform 0.7s var(--imm-ease-spring);
  }
  .imm-waypoint.is-passed .imm-waypoint__dot { border-color: var(--imm-gold-400); background: var(--imm-gold-400); box-shadow: 0 0 0 5px rgba(250, 172, 30, 0.18); }
  .imm-waypoint.is-spot .imm-waypoint__dot { transition-delay: 0.4s; transform: scale(1.3); border-color: var(--imm-gold-400); background: var(--imm-paper); box-shadow: 0 0 0 6px rgba(250, 172, 30, 0.22), 0 0 18px rgba(250, 172, 30, 0.6); }
  .imm-waypoint.is-current:not(.is-spot) .imm-waypoint__dot { border-color: var(--imm-violet-500); transform: scale(1.15); }
}

@media (max-width: 1023.98px) and (max-height: 520px) { /* landscape phones */
  .imm-entry__title, .imm-trail__title { font-size: clamp(1.7rem, 0.6rem + 6vh, 2.3rem); }
  .imm-arch { --_ratio: 1.9; --_mask: var(--_arch-low); --_photo: 50% 56%; --_ew: 31cqw; --_ex: 4cqw; --_drop: 4.4cqw; --_band: 2.2cqw; --_mist-y: 50%; }
}
@media (min-width: 600px) and (max-width: 1023.98px) and (max-height: 520px) {
  /* short and wide: copy + the arch banner on the left, the entry card on the right */
  .imm-entry__grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); grid-template-rows: auto 1fr; grid-template-areas: 'head body' 'scene body';
    column-gap: clamp(22px, 4vw, 40px); align-items: start;
  }
  .imm-entry__scene { margin-top: 18px; }
  .imm-entry__card { margin-top: 14px; }
}

@media (max-width: 359.98px) { /* fold-class phones */
  .imm-entry__title, .imm-trail__title { font-size: 1.75rem; }
  .imm-arch { --_ew: 37cqw; --_ex: 1cqw; }
  .imm-entry__card { padding: 12px; }
  .entry-panel-toggle { gap: 9px; padding-inline: 8px; font-size: var(--imm-fs-sm); }
  .entry-panel-body { padding-inline: 10px; }
  #login-container .btn { padding-inline: 1em; font-size: var(--imm-fs-sm); }
  .imm-entry__mode { width: 36px; }
  .select-container { grid-template-columns: 26px minmax(0, 1fr); column-gap: 9px; }
  .select-container::before { width: 26px; height: 26px; }
  .select-container::after { left: 12px; }
  /* the icon is the badge here: the numeral as well would squeeze the Thai titles into 4 lines */
  .imm-waypoint__card { padding-inline: 12px 8px; }
  .imm-waypoint__num { display: none; }
  .menu-item { column-gap: 11px; padding-right: 6px; }
  .imm-waypoint__go { width: 32px; margin-right: 0; }
}

@media (min-width: 1024px) and (min-aspect-ratio: 1/1), (min-width: 1200px) {
  /* ---- entry: copy + card left, sticky scene right */
  .imm-entry__grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); grid-template-rows: auto 1fr; grid-template-areas: 'head scene' 'body scene';
    column-gap: clamp(48px, 6.4vw, 124px); row-gap: clamp(14px, 1.6vw, 24px); align-items: start;
  }
  .imm-entry__body { max-width: 680px; }
  .imm-entry__scene { position: sticky; top: clamp(96px, 14vh, 150px); align-self: start; }
  /* the portrait gate: height follows the viewport so the whole scene always fits while it is pinned */
  .imm-arch {
    --_w: min(88%, 500px, calc(var(--imm-vh) * 0.5)); --_ratio: 0.7; --_mask: var(--_arch-tall); --_photo: 50% 52%;
    --_ew: 63cqw; --_ex: -17cqw; --_drop: 5cqw; --_band: 2.8cqw; --_mist-y: 56%; --_sill-out: 3cqw;
    margin-left: auto; margin-right: clamp(0px, 2.4vw, 44px);
  }
  .imm-arch__tag { right: 5cqw; bottom: 6cqw; max-width: 46cqw; }

  /* ---- trail: waypoint list left, sticky vista right */
  .imm-trail__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); grid-template-rows: auto 1fr; grid-template-areas: 'head vista' 'list vista';
    column-gap: clamp(40px, 4.6vw, 96px); row-gap: clamp(22px, 2.4vw, 36px);
  }
  .imm-vista { position: sticky; top: clamp(76px, 11vh, 124px); }
  .imm-vista__frame { aspect-ratio: auto; min-height: 0; height: clamp(360px, calc(var(--imm-vh) * 0.72), 900px); }

  .imm-waypoint { --_dot: 50%; }
  .imm-waypoint__card {
    grid-template-columns: auto minmax(0, 1fr) auto; column-gap: clamp(12px, 1.2vw, 20px); padding: clamp(14px, 1.2vw, 20px) clamp(16px, 1.5vw, 24px);
    transform: perspective(1000px) rotateX(var(--imm-rx, 0deg)) rotateY(var(--imm-ry, 0deg));
  }
  .imm-waypoint__card.is-tilting { transition-duration: 0.14s, 0.6s, 0.5s, 0.5s, 0.75s; }
  .imm-waypoint__num { min-width: 1.22em; font-size: clamp(2rem, 1.1rem + 1.3vw, 2.9rem); }
  .menu-item { column-gap: clamp(12px, 1.2vw, 20px); }
  .imm-waypoint__go { width: 40px; }
  .imm-waypoint__go svg { width: 18px; height: 18px; }
  .imm-waypoint.is-current .imm-waypoint__card { border-color: var(--imm-line-gold); box-shadow: var(--imm-shadow-2), 0 18px 44px rgba(250, 172, 30, 0.14); }
  .imm-waypoint.is-current .menu-text h3 { color: var(--imm-violet-700); }
  .imm-waypoint__glare { /* under the words (z 0 < 1), so the light polishes the paper, never washes out the text */
    display: block; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.5s ease;
    background: radial-gradient(420px circle at var(--imm-gx, 50%) var(--imm-gy, 50%), rgba(255, 236, 190, 0.55), rgba(255, 255, 255, 0) 64%);
  }
  .imm-waypoint__card.is-tilting .imm-waypoint__glare { opacity: 1; }
  /* locked hint: a small chip that floats on the card's top edge, so the list never reflows */
  .imm-waypoint__cue { display: block; position: absolute; right: clamp(16px, 1.7vw, 26px); top: 0; z-index: 4; pointer-events: none; opacity: 0; transform: translate3d(0, -30%, 0); transition: opacity 0.4s ease, transform 0.6s var(--imm-ease-out); }
  .imm-waypoint__chip--open { display: none; }
  .imm-waypoint__chip--lock { color: #fff; background: var(--imm-ink); box-shadow: var(--imm-shadow-2); }
  .imm-waypoint.is-locked.is-current .imm-waypoint__cue { opacity: 1; transform: translate3d(0, -52%, 0); }
  .imm-waypoint.is-locked.is-current .imm-waypoint__card { border-color: var(--imm-line-gold); background: var(--imm-surface); }
}
@media (min-width: 1024px) and (min-aspect-ratio: 1/1) and (hover: hover) and (pointer: fine), (min-width: 1200px) and (hover: hover) and (pointer: fine) {
  .imm-entry__card { /* real glass only where the GPU can afford it */
    background: linear-gradient(165deg, rgba(255, 253, 248, 0.82), rgba(255, 253, 248, 0.62));
    -webkit-backdrop-filter: blur(var(--imm-blur)) saturate(1.3); backdrop-filter: blur(var(--imm-blur)) saturate(1.3);
  }
  .imm-waypoint:hover .imm-waypoint__card { border-color: var(--imm-line-gold); } /* fallback if journey.js is unavailable */
}

@media (min-width: 1536px) {
  .imm-arch { --_w: min(88%, 560px, calc(var(--imm-vh) * 0.52)); }
  .imm-trail__grid { grid-template-columns: minmax(0, 660px) minmax(0, 1fr); }
}
@media (min-width: 2560px) {
  .imm-journey { --imm-max-wide: 1880px; }
  .imm-arch { --_w: min(88%, 640px, calc(var(--imm-vh) * 0.52)); }
  .imm-trail__grid { grid-template-columns: minmax(0, 760px) minmax(0, 1fr); }
}
@media (min-width: 3200px) { /* 4K: scale the whole act rather than leaving a small island */
  .imm-journey {
    --imm-max-wide: 2560px; --imm-fs-xs: 1rem; --imm-fs-sm: 1.15rem; --imm-fs-md: 1.32rem; --imm-fs-lg: 1.65rem; --imm-fs-xl: 2.3rem;
    --imm-fs-2xl: 3.3rem; --imm-fs-3xl: 5rem; --imm-r-md: 24px; --imm-r-lg: 34px; --imm-r-xl: 48px;
  }
  .imm-arch { --_w: min(88%, 880px, calc(var(--imm-vh) * 0.5)); }
  .imm-entry__body { max-width: 960px; }
  .imm-trail__grid { grid-template-columns: minmax(0, 1000px) minmax(0, 1fr); }
  .imm-vista__frame { height: clamp(360px, calc(var(--imm-vh) * 0.72), 1400px); }
  .entry-panel-toggle { min-height: 84px; }
  .imm-entry__mode { width: 58px; }
  .imm-entry__mode svg { width: 28px; height: 28px; }
  .imm-waypoint__go { width: 60px; }
  .imm-waypoint__go svg { width: 26px; height: 26px; }
  .custom-select { min-height: 64px; }
}

/* ==================================================================== 5. motion, contrast, robustness */
@keyframes imm-arch-rise {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  14% { opacity: 0.95; }
  50% { transform: translate3d(1.4cqw, -13cqw, 0); }
  78% { opacity: 0.8; }
  100% { opacity: 0; transform: translate3d(-0.8cqw, -27cqw, 0) scale(0.8); }
}
@keyframes imm-arch-breathe { from { opacity: 0.55; } to { opacity: 1; } }
@keyframes imm-arch-swell { from { scale: 0.94; } to { scale: 1.05; } }
@keyframes imm-journey-unfold { from { opacity: 0; transform: translate3d(0, 14px, 0); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes imm-journey-ring { 0% { opacity: 0.95; transform: scale(0.985); } 100% { opacity: 0; transform: scale(1.05); } }
@keyframes imm-journey-ping { 0% { box-shadow: 0 0 0 0 rgba(44, 154, 108, 0.5); } 100% { box-shadow: 0 0 0 10px rgba(44, 154, 108, 0); } }
@keyframes imm-journey-nod { 0%, 100% { transform: none; } 50% { transform: translate3d(0, 5px, 0); } }
@keyframes imm-journey-arrow { 0% { transform: none; opacity: 1; } 45% { transform: translate3d(130%, 0, 0); opacity: 0; } 46% { transform: translate3d(-130%, 0, 0); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* reduced motion (OS setting or the in-app switch): a still, complete composition */
html.imm-reduced .imm-topo, html.imm-reduced .imm-arch__body, html.imm-reduced .imm-arch__pan, html.imm-reduced .imm-arch__lanterns,
html.imm-reduced .imm-arch__front, html.imm-reduced .imm-arch__glow, html.imm-reduced .imm-vista__pan, html.imm-reduced .image-overlay,
html.imm-reduced .imm-waypoint__card { transform: none; }
html.imm-reduced .imm-arch__mist { translate: none; animation: none; }
html.imm-reduced .imm-arch__lanterns i, html.imm-reduced .imm-arch__glow, html.imm-reduced .imm-arch__inner { animation: none; }
html.imm-reduced .imm-entry__go svg, html.imm-reduced .trial-mode-status--active::before,
html.imm-reduced .imm-waypoint__arrow, html.imm-reduced .imm-entry__card.is-nudged::after { animation: none; }
html.imm-reduced .entry-panel.is-open #login-container, html.imm-reduced .entry-panel.is-open #demo-selection > *,
html.imm-reduced .term-selection, html.imm-reduced .term-selection::before, html.imm-reduced .imm-trail__gate, html.imm-reduced .imm-entry__go { animation: none; }
html.imm-reduced .imm-entry__card.is-nudged { outline: 3px solid var(--imm-gold-400); outline-offset: 4px; }
html.imm-reduced .image-item { clip-path: none; transition: opacity 0.2s linear, visibility 0s linear 0.2s; }
html.imm-reduced .image-item.active { transition: opacity 0.2s linear, visibility 0s; }
html.imm-reduced .image-item .imm-vista__img { transform: none; transition: none; }
html.imm-reduced .image-overlay > *, html.imm-reduced .image-item.active .image-overlay > * { transform: none; transition: opacity 0.2s linear; transition-delay: 0s; }
html.imm-reduced .imm-waypoint__glare { display: none; }
html.imm-reduced .imm-waypoint::before, html.imm-reduced .imm-waypoint::after, html.imm-reduced .imm-waypoint__dot { transition: none; }

/* high contrast: opaque plates behind every word, 2px borders, no text on photographs */
html.a11y-high-contrast .imm-topo, html.a11y-high-contrast .imm-entry__glow { display: none; }
html.a11y-high-contrast .imm-entry__card, html.a11y-high-contrast .entry-panel, html.a11y-high-contrast .term-selection,
html.a11y-high-contrast .imm-fold--ai, html.a11y-high-contrast .imm-trail__gate:not([hidden]), html.a11y-high-contrast .trial-mode-hint,
html.a11y-high-contrast .trial-mode-status { background: var(--imm-surface); border: 2px solid var(--imm-ink); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--imm-ink); }
html.a11y-high-contrast .entry-panel.is-open { border-color: var(--imm-accent); box-shadow: 0 0 0 2px var(--imm-accent); }
html.a11y-high-contrast .entry-panel-toggle, html.a11y-high-contrast .entry-panel.is-open .entry-panel-toggle { background: none; color: var(--imm-ink); }
html.a11y-high-contrast .imm-entry__mode, html.a11y-high-contrast .entry-panel.is-open .imm-entry__mode { color: #fff; background: var(--imm-accent-strong); box-shadow: none; }
html.a11y-high-contrast .select-container::before { color: var(--imm-ink); background-color: #fff; box-shadow: inset 0 0 0 2px var(--imm-ink); }
html.a11y-high-contrast .select-container.is-filled::before { background-color: var(--imm-highlight); }
html.a11y-high-contrast .trial-mode-status--active { color: #0d4a31; border-color: #0d4a31; }
html.a11y-high-contrast .trial-mode-status--pending, html.a11y-high-contrast .term-selection-note.is-future { color: #6b3a00; }
html.a11y-high-contrast .term-selection { padding: 12px 16px 14px; border-radius: var(--imm-r-md); }
html.a11y-high-contrast .term-selection::before { display: none; }
html.a11y-high-contrast .term-selection label { color: var(--imm-ink); }
html.a11y-high-contrast .term-selection .custom-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  border-bottom: 2px solid var(--imm-ink); color: var(--imm-ink);
}
html.a11y-high-contrast #login-container .btn { background: var(--imm-accent-strong); color: #fff; border: 2px solid var(--imm-ink); box-shadow: none; }
html.a11y-high-contrast #login-container #logout { background: #fff; color: var(--imm-ink); }
html.a11y-high-contrast .mobile-ai-disclaimer, html.a11y-high-contrast .image-caption, html.a11y-high-contrast .image-caption .text-danger { color: var(--imm-ink); }
html.a11y-high-contrast .imm-waypoint__card,
html.a11y-high-contrast.imm-js .imm-waypoint .imm-waypoint__card { background: var(--imm-surface); border: 2px solid var(--imm-ink); border-style: solid; box-shadow: none; }
html.a11y-high-contrast .imm-waypoint.is-locked .imm-waypoint__card { border-style: dashed; }
html.a11y-high-contrast .imm-waypoint.is-current .imm-waypoint__card { border-color: var(--imm-accent); box-shadow: 0 0 0 2px var(--imm-accent); }
html.a11y-high-contrast .imm-waypoint__num, html.a11y-high-contrast.imm-js .imm-waypoint .imm-waypoint__num { -webkit-text-stroke: 0; color: var(--imm-ink); font-weight: 300; }
html.a11y-high-contrast .imm-waypoint__num::after { display: none; }
html.a11y-high-contrast .menu-text :is(h3, p, .qq-status-title, .qq-status-caption),
html.a11y-high-contrast.imm-js .imm-waypoint .menu-text :is(h3, p, .qq-status-title, .qq-status-caption) { color: var(--imm-ink); }
html.a11y-high-contrast .icon-wrapper, html.a11y-high-contrast.imm-js .imm-waypoint .icon-wrapper { color: #fff; background-color: var(--imm-accent-strong); box-shadow: none; }
html.a11y-high-contrast .icon-wrapper::before, html.a11y-high-contrast .imm-waypoint__glare { display: none; }
html.a11y-high-contrast .imm-waypoint__go, html.a11y-high-contrast.imm-js .imm-waypoint .imm-waypoint__go { color: var(--imm-ink); background-color: #fff; box-shadow: inset 0 0 0 2px var(--imm-ink); }
html.a11y-high-contrast .menu-new-badge { background: var(--imm-ink); color: #fff; box-shadow: none; }
/* the legacy sheet stops the badge's shine under the OS reduced-motion preference; here only the in-app switch does */
html.imm-js:not(.imm-reduced) .menu-new-badge::after { animation: menu-new-badge-shine 3.2s ease-in-out infinite; }
html.imm-reduced .menu-new-badge::after { animation: none; }
html.a11y-high-contrast .imm-waypoint__chip { color: #fff; background: var(--imm-ink); box-shadow: none; }
html.a11y-high-contrast .imm-waypoint__dot { border-color: var(--imm-ink); }
html.a11y-high-contrast .color-overlay { background-image: linear-gradient(to top, #05050c 0%, #05050c 100%); opacity: 0; }
html.a11y-high-contrast .image-overlay { background: #05050c; padding-right: clamp(20px, 2.8vw, 44px); border-top: 2px solid #fff; transform: none; }
html.a11y-high-contrast .image-overlay h2 { text-shadow: none; }
html.a11y-high-contrast .imm-vista__tag { color: #fff; }
html.a11y-high-contrast .imm-vista__frame { box-shadow: 0 0 0 2px var(--imm-ink); }
html.a11y-high-contrast .imm-vista__coord { padding: 4px 10px; border-radius: 6px; background: #05050c; color: #fff; text-shadow: none; }
/* the arch: an ink outline on a white frame, the caption on a solid plate, no light effects */
html.a11y-high-contrast .imm-arch { --_line: 2px; }
html.a11y-high-contrast :is(.imm-arch__aura, .imm-arch__glow, .imm-arch__inner, .imm-arch__mist) { display: none; }
html.a11y-high-contrast .imm-arch__line { background: var(--imm-ink); }
html.a11y-high-contrast .imm-arch__band { background: #fff; }
html.a11y-high-contrast .imm-arch__sill { background: #fff; box-shadow: inset 0 0 0 2px var(--imm-ink); }
html.a11y-high-contrast .imm-arch__sill::before { display: none; }
html.a11y-high-contrast .imm-arch__tag { background: #05050c; box-shadow: 0 0 0 2px #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.a11y-high-contrast .imm-arch__coord { color: #fff; }
html.a11y-high-contrast .imm-entry__card-mark path { fill: none; stroke: var(--imm-ink); }

/* larger text settings: give the tight rows more air */
html.a11y-font-xlarge .entry-panel-toggle, html.a11y-font-large .entry-panel-toggle { line-height: 1.5; }
html.a11y-font-xlarge .imm-waypoint__chip { white-space: normal; }

/* legacy `!important` declarations can only be beaten from the imm-force layer */
@layer imm-force {
  #login-container .newregcolor { color: var(--imm-ink) !important; } /* legacy: .newregcolor { color: #5B3F6D !important } */
}

@media print {
  .imm-entry__scene, .imm-entry__bg, .imm-trail__bg, .imm-vista__frame { display: none !important; }
}
