/* ==========================================================================
   CMU Student Compass — Immersive design system · RESULT CONTENT: ANALYSIS  (workstream E)
   Menus  sw  วิเคราะห์ศักยภาพและโอกาสในการพัฒนา   ·   oc  แนะนำอาชีพในอนาคต
   + the flow-chart figure of every "แนวทางการวิเคราะห์" tab (sw / el / fe / oc).

   Each tab reads like an editorial data story: a framed intro, the chart as the hero inside a paper figure
   (eyebrow · title · toolbar · plot · caption / text alternative), then supporting notes.
   Structure is added by static/js/immersive/results-analysis.js (all classes `imm-ra-*`); every behavioural
   id / class / inline style written by compass.js and the chart scripts is kept.

   Cascade: unlayered rules here beat legacy (layer `legacy`) normal declarations; legacy `!important` is beaten
   from `@layer imm-force` (§17). `!important` elsewhere only overrides inline sizes written by compass.js
   (each one says so). Chart-container heights written by the chart scripts are never pinned.

   Sections
     1 tokens · 2 panel rhythm + intro · 3 folds (callout, explain, glossary, guide, advice) · 4 figures
     5 sw0 radar + ledger · 6 sw1 packed bubble · 7 flow chart · 8 oc0 control deck (modes + threshold)
     9 oc0 map figure · 10 oc1 destination search · 11 oc1 occupation figure · 12 supporting notes
     13 empty / waiting states · 14 responsive · 15 reduced motion · 16 high contrast / large text · 17 imm-force
   ========================================================================== */

/* ------------------------------------------------------------------ 1 · tokens */
#resultsModal {
  --imm-ra-gap: clamp(22px, 3.4vw, 44px);
  --imm-ra-col: min(100%, 64rem);
  --imm-ra-fig-pad: clamp(14px, 2.2vw, 30px);
  --imm-ra-map-min: 0px;        /* min plot width of the Sankeys (phones scroll sideways) */
  --imm-ra-flow-min: 0px;       /* min plot width of the flow chart */
  --imm-ra-head-top: calc(var(--imm-modal-sticky-top, 0px) + 0px);
}

@keyframes imm-ra-rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }
@keyframes imm-ra-orbit { to { transform: rotate(360deg); } }
@keyframes imm-ra-nudge { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(6px, 0, 0); } }
@keyframes imm-ra-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(250, 172, 30, 0.45); } 60% { box-shadow: 0 0 0 10px rgba(250, 172, 30, 0); } }

/* ------------------------------------------------------------------ 2 · panel rhythm + intro */
.imm-ra-panel.tab-panel.active { gap: 0; }
.imm-ra-panel > * { flex: none; }
.imm-ra-panel > br { display: none; }

.imm-ra-intro {
  display: grid; justify-items: center; gap: 2px;
  width: min(100%, 52rem); margin: clamp(6px, 1.4vw, 16px) auto var(--imm-ra-gap); text-align: center;
}
.imm-ra-intro__eyebrow { margin: 0 0 6px; justify-content: center; }
.imm-ra-intro > h1 {
  width: 100%; margin: 0 0 0.45em; font-size: var(--imm-fs-xl); font-weight: 600; line-height: var(--imm-lh-snug);
  color: var(--imm-ink); text-wrap: balance;
}
.imm-ra-intro > p:not(.imm-eyebrow) {
  width: min(100%, var(--imm-modal-measure, 46rem)); margin: 0; font-size: var(--imm-fs-md); font-weight: 300; line-height: 1.85;
  color: var(--imm-ink-2); text-align: left; text-wrap: pretty;
}

/* section header inside a panel */
.imm-ra-section { width: var(--imm-ra-col); margin: var(--imm-ra-gap) auto 0; display: flex; flex-direction: column; align-items: stretch; }
.imm-ra-section__head { display: grid; justify-items: center; gap: 2px; margin-bottom: clamp(12px, 2vw, 20px); text-align: center; }
.imm-ra-section__title.imm-ra-section__title { margin: 0; font-size: var(--imm-fs-xl); font-weight: 600; line-height: var(--imm-lh-snug); color: var(--imm-ink); }

/* ------------------------------------------------------------------ 3 · folds (skins over D's .imm-fold) */
.imm-ra-fold.imm-fold { width: var(--imm-ra-col); margin: 0 auto clamp(16px, 2.6vw, 28px); }
.imm-ra-fold .imm-fold__icon svg { width: 18px; height: 18px; }
.imm-ra-fold .imm-fold__title { display: flex; flex-direction: column; gap: 0; }
.imm-ra-fold__eyebrow { font-size: var(--imm-fs-2xs); font-weight: 500; letter-spacing: var(--imm-track-eyebrow); text-transform: uppercase; color: var(--imm-gold-600); line-height: 1.6; }
.imm-ra-fold__label { min-width: 0; }
.imm-ra-fold__body { color: var(--imm-ink-2); }
.imm-ra-fold__body > p, .imm-ra-fold__body > div > p { margin: 0; font-size: var(--imm-fs-md); font-weight: 300; line-height: 1.85; text-wrap: pretty; }

/* 3a · 21st Century Skills — two-tone callout (violet band + paper), a fold on phones */
.imm-ra-callout.imm-fold {
  position: relative; overflow: hidden; overflow: clip;
  width: min(100%, 64rem);
  border: 1px solid var(--imm-line); border-radius: var(--imm-r-lg);
  background: var(--imm-surface); box-shadow: var(--imm-shadow-2);
  animation: imm-ra-rise 0.8s var(--imm-ease-out) 0.1s backwards;
}
.imm-ra-callout .imm-fold__toggle { position: relative; isolation: isolate; overflow: hidden; color: #fff; border-radius: 0; }
.imm-ra-callout .imm-fold__toggle::before { /* the violet band with a warm dawn glow */
  content: ''; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 90% at 0% 110%, rgba(250, 172, 30, 0.42), rgba(250, 172, 30, 0) 58%),
    radial-gradient(80% 70% at 100% 0%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 60%),
    var(--imm-grad-brand);
}
.imm-ra-callout .imm-fold__icon { color: #2b1d00; background: var(--imm-grad-gold); border-color: rgba(255, 255, 255, 0.55); box-shadow: 0 6px 18px rgba(250, 172, 30, 0.38); }
.imm-ra-callout .imm-ra-fold__eyebrow { color: var(--imm-gold-200); }
.imm-ra-callout .imm-ra-fold__label { font-weight: 600; color: #fff; }
.imm-ra-callout .imm-fold__toggle .imm-chevron { color: rgba(255, 255, 255, 0.86); }
.imm-ra-callout .imm-fold__toggle::after { background: linear-gradient(90deg, transparent, var(--imm-gold-300) 18%, var(--imm-gold-300) 82%, transparent); }
.imm-ra-callout__rings { /* thin compass rings + ticks, ornament in the band */
  position: absolute; z-index: -1; right: -34%; bottom: -60%; width: 120%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.34) 0 0.7deg, transparent 0.7deg 10deg),
    radial-gradient(circle, transparent 0 55%, rgba(255, 255, 255, 0.16) 55.4%, transparent 56%, transparent 68%, rgba(255, 255, 255, 0.12) 68.4%, transparent 69%);
  -webkit-mask: radial-gradient(circle, transparent 0 70%, #000 70.5% 74%, transparent 74.5%), radial-gradient(circle, #000 0 69.9%, transparent 70%);
  mask: radial-gradient(circle, transparent 0 70%, #000 70.5% 74%, transparent 74.5%), radial-gradient(circle, #000 0 69.9%, transparent 70%);
  opacity: 0.55; animation: imm-ra-orbit 90s linear infinite;
}
.imm-ra-callout .imm-ra-callout__text { color: var(--imm-ink-2); text-align: left !important; } /* inline text-align:center (compass.js) */
@media (min-width: 768px) {
  .imm-ra-callout.imm-fold { display: grid; grid-template-columns: minmax(230px, 31%) minmax(0, 1fr); align-items: stretch; }
  .imm-ra-callout.imm-fold > .imm-fold__toggle {
    flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 14px;
    min-height: 100%; padding: clamp(24px, 2.8vw, 36px);
  }
  .imm-ra-callout .imm-fold__icon { width: 52px; height: 52px; }
  .imm-ra-callout .imm-fold__icon svg { width: 26px; height: 26px; }
  .imm-ra-callout .imm-fold__title { flex: none; }
  .imm-ra-callout .imm-ra-fold__label { font-size: var(--imm-fs-xl); line-height: 1.25; }
  .imm-ra-callout.imm-fold > .imm-fold__panel { align-self: center; }
  .imm-ra-callout .imm-fold__panel > .imm-ra-fold__body { padding: clamp(22px, 2.8vw, 36px) clamp(22px, 3vw, 40px); }
  .imm-ra-callout .imm-fold__panel > .imm-ra-fold__body::after { display: none; }
  .imm-ra-callout .imm-ra-callout__text { font-size: var(--imm-fs-md); line-height: 1.95; }
}

/* 3b · quieter folds: "how the score is computed", ledger glossary, reading guide, display advice */
.imm-ra-explain.imm-fold, .imm-ra-glossary.imm-fold, .imm-ra-advice.imm-fold {
  border-color: var(--imm-line); background: linear-gradient(135deg, rgba(104, 104, 172, 0.06), rgba(250, 172, 30, 0.05)), var(--imm-surface);
}
@media (min-width: 768px) {
  /* above the fold breakpoint they read as framed notes with a small heading */
  .imm-ra-explain.imm-fold:not(.is-collapsible), .imm-ra-glossary.imm-fold:not(.is-collapsible), .imm-ra-advice.imm-fold:not(.is-collapsible) {
    border-color: transparent; background: none; box-shadow: none;
  }
  .imm-ra-explain.imm-fold:not(.is-collapsible) > .imm-fold__toggle,
  .imm-ra-glossary.imm-fold:not(.is-collapsible) > .imm-fold__toggle { padding: 0 0 0.5em; min-height: 0; font-size: var(--imm-fs-sm); color: var(--imm-violet-700); }
  .imm-ra-explain .imm-fold__panel > .imm-ra-fold__body,
  .imm-ra-glossary .imm-fold__panel > .imm-ra-fold__body { padding-inline: 0; }
  .imm-ra-explain .imm-fold__panel > .imm-ra-fold__body::after,
  .imm-ra-glossary .imm-fold__panel > .imm-ra-fold__body::after { display: none; }
  .imm-ra-explain.imm-fold { width: min(100%, var(--imm-modal-measure, 46rem)); }
  .imm-ra-explain .imm-ra-fold__body > p {
    padding: 0.2em 0 0.2em 1.1em; border-left: 2px solid var(--imm-gold-300);
    font-size: var(--imm-fs-md); font-weight: 300; line-height: 1.9; color: var(--imm-ink-2);
  }
}

/* ledger glossary: definition cards */
.imm-ra-glossary .instruction { width: 100% !important; text-align: left !important; } /* inline width:95% / text-align */
.imm-ra-glossary .imm-ra-glossary__lead { display: none; } /* its text is the fold title */
.imm-ra-glossary__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.imm-ra-glossary__list > li {
  margin: 0; padding: 0.85em 1.05em; border: 1px solid var(--imm-line); border-radius: var(--imm-r-md);
  background: var(--imm-surface); font-size: var(--imm-fs-sm); line-height: 1.75; color: var(--imm-ink-2);
}
.imm-ra-glossary__list > li::marker { content: none; }
.imm-ra-glossary__list > li > b { display: block; margin-bottom: 0.15em; font-size: var(--imm-fs-md); font-weight: 600; color: var(--imm-violet-800); }
.imm-ra-glossary__list ul { margin: 0.6em 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.imm-ra-glossary__list ul > li {
  margin: 0; padding: 0.45em 0.8em; border-radius: var(--imm-r-sm); background: rgba(104, 104, 172, 0.06);
  font-size: var(--imm-fs-sm); line-height: 1.6;
}
.imm-ra-glossary__list ul > li > b { color: var(--imm-gold-700); font-weight: 600; }
@media (min-width: 900px) {
  .imm-ra-glossary__list { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-auto-flow: dense; }
  .imm-ra-glossary__list > li:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
  .imm-ra-glossary__list ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ 4 · figures */
.imm-ra-fig.imm-figure {
  position: relative; isolation: isolate;
  width: var(--imm-ra-col); max-width: none; min-width: 0;
  margin: 0 auto var(--imm-ra-gap); padding: var(--imm-ra-fig-pad);
  overflow: hidden; overflow: clip; /* clip, not hidden: sticky heads/hints keep following the stage */
  border-radius: var(--imm-r-lg);
  background:
    radial-gradient(70% 55% at 50% 0%, rgba(250, 172, 30, 0.07), rgba(250, 172, 30, 0) 70%),
    var(--imm-surface);
  box-shadow: var(--imm-shadow-2);
  animation: imm-ra-rise 0.9s var(--imm-ease-out) 0.16s backwards;
}
.imm-ra-fig::before { /* viewfinder corner ticks */
  content: ''; position: absolute; z-index: 0; inset: 12px; pointer-events: none;
  background:
    linear-gradient(var(--imm-gold-300), var(--imm-gold-300)) 0 0 / 18px 1.5px no-repeat,
    linear-gradient(var(--imm-gold-300), var(--imm-gold-300)) 0 0 / 1.5px 18px no-repeat,
    linear-gradient(var(--imm-gold-300), var(--imm-gold-300)) 100% 100% / 18px 1.5px no-repeat,
    linear-gradient(var(--imm-gold-300), var(--imm-gold-300)) 100% 100% / 1.5px 18px no-repeat;
  opacity: 0.75;
}
.imm-ra-fig > * { position: relative; z-index: 1; }

.imm-ra-fig__head.imm-figure__head { align-items: flex-end; margin: 0 0 clamp(10px, 1.6vw, 18px); }
.imm-ra-fig__titles { display: grid; gap: 2px; min-width: 0; flex: 1 1 18rem; }
.imm-ra-fig__eyebrow {
  margin: 0; font-size: var(--imm-fs-2xs); font-weight: 500; letter-spacing: var(--imm-track-eyebrow); text-transform: uppercase;
  line-height: 1.6; color: var(--imm-gold-600);
}
.imm-ra-fig__title.imm-ra-fig__title { margin: 0; width: auto; font-size: var(--imm-fs-lg); font-weight: 600; line-height: 1.4; color: var(--imm-ink); text-align: left; }
.imm-ra-fig__subtitle.imm-ra-fig__subtitle {
  /* #sunburstBC carries inline color:#333 / text-align:left — !important beats the inline colour */
  margin: 0; width: auto; font-size: var(--imm-fs-sm) !important; color: var(--imm-ink-3) !important; text-align: left !important;
}
.imm-ra-fig__toolbar { flex: 0 1 auto; justify-content: flex-end; }
.imm-ra-fig__body, .imm-ra-fig__scroll { position: relative; min-width: 0; }
.imm-ra-plot { position: relative; min-width: 100%; }
.imm-ra-fig__caption.imm-figure__caption {
  display: flex; gap: 0.6em; align-items: flex-start;
  margin: clamp(12px, 1.6vw, 18px) 0 0; padding-top: clamp(10px, 1.4vw, 14px); border-top: 1px solid var(--imm-line);
  font-size: var(--imm-fs-sm); line-height: 1.65; color: var(--imm-ink-3);
}
.imm-ra-fig__caption::before { content: ''; flex: none; width: 1.6em; height: 1px; margin-top: 0.85em; background: var(--imm-gold-400); }
.imm-ra-fig .chart-accessibility-panel { margin-top: clamp(12px, 1.8vw, 20px); background: rgba(255, 255, 255, 0.7); }
.imm-ra-fig__note {
  display: flex; align-items: flex-start; gap: 0.6em; margin: clamp(10px, 1.4vw, 14px) 0 0; padding: 0.7em 1em;
  border: 1px solid rgba(250, 172, 30, 0.42); border-radius: var(--imm-r-md); background: var(--imm-gold-50);
  font-size: var(--imm-fs-sm); line-height: 1.6; color: var(--imm-gold-700);
}
.imm-ra-fig__note svg { flex: none; width: 1.15em; height: 1.15em; margin-top: 0.2em; }

/* sticky heads (tall Sankeys): the column legend / focus status / back button follow the reader */
.imm-ra-fig__head.is-sticky {
  position: sticky; top: var(--imm-modal-sticky-top, 0px); z-index: 5;
  margin: calc(-1 * var(--imm-ra-fig-pad)) calc(-1 * var(--imm-ra-fig-pad)) clamp(10px, 1.6vw, 18px);
  padding: var(--imm-ra-fig-pad) var(--imm-ra-fig-pad) 12px;
  background: linear-gradient(180deg, var(--imm-surface) 0%, var(--imm-surface) 82%, rgba(255, 253, 248, 0.82) 100%);
  border-bottom: 1px solid var(--imm-line);
  border-radius: var(--imm-r-lg) var(--imm-r-lg) 0 0;
}

/* pinned under the tab bar (results-analysis.js: .is-pinned): an opaque band reaches up behind the tab bar's soft
   bottom fade, so the part of the chart scrolled above the head never shows between the tabs and the card */
.imm-ra-fig__head.is-sticky.is-pinned::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: calc(clamp(14px, 1.6vw, 20px) + 4px); /* the tab bar's bottom padding: never reaches the tabs */
  background: var(--imm-surface); pointer-events: none;
}

/* horizontal-scroll hint: zero-height sticky bar so it never pushes the plot */
.imm-ra-hintbar {
  /* --imm-ra-headh: height of a sticky figure head (published by results-analysis.js) */
  position: sticky; top: calc(var(--imm-modal-sticky-top, 0px) + var(--imm-ra-headh, 0px) + 10px); z-index: 6;
  height: 0; display: flex; align-items: flex-start; justify-content: flex-end; pointer-events: none;
}
.imm-ra-hint {
  display: none; align-items: center; gap: 0.45em; margin: 10px 8px 0 0; padding: 0.42em 0.95em 0.42em 0.8em; border-radius: var(--imm-r-pill);
  background: var(--imm-glass-dark-bg); color: #fff; font-size: var(--imm-fs-xs); line-height: 1.4; white-space: nowrap;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 8px 22px rgba(13, 11, 39, 0.28);
  animation: imm-ra-nudge 2.4s ease-in-out infinite;
}
.imm-ra-hint svg { order: 2; width: 1em; height: 1em; }
.imm-ra-fig.is-overflowing:not(.is-scrolled):not(.is-empty) .imm-ra-hint { display: inline-flex; }
.imm-ra-fig--flow > .imm-ra-hintbar { top: calc(var(--imm-modal-sticky-top, 0px) + 10px); }
.imm-ra-fig--flow > .imm-ra-hintbar .imm-ra-hint { margin-top: -4px; }
.imm-ra-hint { margin-top: 0; }
.imm-ra-fig__scroll.imm-figure__scroll { scrollbar-width: thin; scrollbar-color: var(--imm-violet-300) transparent; border-radius: var(--imm-r-md); }
.imm-ra-fig__scroll:focus-visible { outline: 2px solid var(--imm-gold-400); outline-offset: 4px; }

/* ------------------------------------------------------------------ 5 · sw0 — radar + ledger */
.imm-ra-fig--spider { width: min(100%, 64rem); }
.imm-ra-fig--spider .imm-ra-fig__head { justify-content: center; text-align: center; }
.imm-ra-fig--spider .imm-ra-fig__titles { justify-items: center; flex: none; }
#spiderChart {
  /* inline width:100vw / height:700px / padding 1em 5em (compass.js) — Highcharts follows the container */
  position: relative; width: 100% !important; height: clamp(500px, 30vw + 230px, 700px) !important; padding: 0 !important; margin: 0 auto;
}
.imm-ra-fig--spider .highcharts-container { margin: 0 auto; }
/* portrait tablets (owner 2026-11-19, iPad 820×1180: "the web looks squeezed"): the plot was height-bound (500px under a
   three-line legend) while the width had room to spare — give it a height that follows the width */
@media (min-width: 600px) and (max-width: 1023px) and (orientation: portrait) {
  #spiderChart { height: clamp(560px, 88vw, 780px) !important; }
}
.imm-ra-fig--spider.is-partial .imm-ra-fig__note { justify-content: center; text-align: left; }
.imm-ra-ledger.is-empty #tableContainer { margin-bottom: 0; }
.imm-ra-ledger > .imm-ra-empty { margin-top: clamp(12px, 2vw, 18px); }

/* ------------------------------------------------------------------ 6 · sw1 — packed bubble (full-bleed figure, legend chips) */
.imm-ra-fig--bleed.imm-ra-fig {
  /* full-bleed within the stage: the text column is <= 1200px, the stage (measured by results-analysis.js into
     --imm-ra-stage-w) is wider on large screens; without the measurement the figure simply keeps the column width */
  --_w: min(max(100%, calc(var(--imm-ra-stage-w, 0px) - 2 * var(--imm-ra-bleed-inset, 22px))), 1560px);
  width: var(--_w); margin-inline: calc((100% - var(--_w)) / 2);
  /* plain paper behind the plot: the translucent circle washes must sit on an even surface */
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(250, 172, 30, 0.06), rgba(250, 172, 30, 0) 70%),
    var(--imm-surface);
}
.imm-ra-fig--bubble .imm-ra-fig__head { align-items: flex-start; }
.imm-ra-fig--bubble .imm-ra-fig__title { font-size: var(--imm-fs-xl); }
#sunburst {
  /* inline height:100vh / width:90vw (compass.js). Width follows the figure; the chart is resized when its tab
     is revealed (it is created while hidden). Height stays viewport-based so the hidden-born size is right. */
  width: 100% !important; height: clamp(440px, 74vh, 880px) !important; margin: 0 auto;
}
.imm-ra-fig--bubble #sunburst { z-index: 1; }
/* pan / zoom (owner 2026-11-18, packedbubble.js): a drag pans, a phone pans after press-and-hold, two fingers pinch.
   pan-x pan-y: a one-finger swipe still scrolls the page, but the browser never pinch-zooms the page over the chart */
#sunburst { touch-action: pan-x pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#sunburst.is-zoomed { cursor: grab; touch-action: none; } /* zoomed in: a drag inside moves the chart, not the page */
#sunburst.is-panning, #sunburst.is-panning * { cursor: grabbing !important; }
#sunburst.is-holding { outline: 2px solid var(--imm-gold-400); outline-offset: -2px; border-radius: var(--imm-r-md); }
/* the zoom tube (owner 2026-11-19): a tall glass pill — + cap, a groove with a gold fill and a draggable thumb
   (1x at the bottom … 5x at the top; results-analysis.js sets --t 0…1), − cap. Top right: the floating guide /
   companion buttons own the bottom corners. */
.imm-ra-zoom {
  position: absolute; right: 10px; top: 10px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; width: 42px; padding: 3px 0;
  border: 1px solid var(--imm-line); border-radius: var(--imm-r-pill); background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--imm-shadow-1); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.imm-ra-zoom__cap {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--imm-violet-700); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s ease, transform 0.25s var(--imm-ease-out);
}
.imm-ra-zoom__cap svg { width: 18px; height: 18px; }
@media (hover: hover) { .imm-ra-zoom__cap:hover { background: rgba(104, 104, 172, 0.1); } }
.imm-ra-zoom__cap:active { transform: scale(0.92); }
.imm-ra-zoom__track {
  --t: 0;
  position: relative; width: 36px; height: clamp(120px, 24vh, 190px); margin: 2px 0;
  cursor: ns-resize; touch-action: none; outline: none; -webkit-tap-highlight-color: transparent;
}
.imm-ra-zoom__track::before { /* the groove */
  content: ''; position: absolute; left: 50%; top: 11px; bottom: 11px; width: 6px; margin-left: -3px;
  border-radius: 3px; background: rgba(104, 104, 172, 0.16);
}
.imm-ra-zoom__fill {
  position: absolute; left: 50%; bottom: 11px; width: 6px; margin-left: -3px; border-radius: 3px;
  height: calc(var(--t) * (100% - 22px)); background: var(--imm-grad-gold, linear-gradient(180deg, #f6c35b, #e09a1c));
}
.imm-ra-zoom__thumb {
  position: absolute; left: 50%; bottom: calc(var(--t) * (100% - 22px)); width: 22px; height: 22px; margin-left: -11px;
  border: 2px solid var(--imm-violet-500, #6868ac); border-radius: 50%; background: #fff;
  box-shadow: 0 2px 8px rgba(27, 24, 56, 0.22); transition: transform 0.2s var(--imm-ease-out);
}
.imm-ra-zoom__track.is-dragging .imm-ra-zoom__thumb, .imm-ra-zoom__track:active .imm-ra-zoom__thumb { transform: scale(1.15); }
.imm-ra-zoom__track:focus-visible .imm-ra-zoom__thumb, .imm-ra-zoom__cap:focus-visible { outline: 2px solid var(--imm-gold-400); outline-offset: 2px; }
.imm-ra-fig.is-empty .imm-ra-zoom { display: none; }
html.a11y-high-contrast .imm-ra-zoom { background: #fff; border: 2px solid #0b0b12; box-shadow: none; }
html.a11y-high-contrast .imm-ra-zoom__cap { color: #0b0b12; }
html.a11y-high-contrast .imm-ra-zoom__track::before { background: rgba(11, 11, 18, 0.25); }
html.a11y-high-contrast .imm-ra-zoom__fill { background: #0b0b12; }
html.a11y-high-contrast .imm-ra-zoom__thumb { border-color: #0b0b12; }
html.imm-reduced .imm-ra-zoom__cap, html.imm-reduced .imm-ra-zoom__thumb { transition: none; }

/* legend chips (replace the canvas legend; tap toggles a skill group) */
.imm-ra-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 clamp(8px, 1.4vw, 14px); }
.imm-ra-chips:empty { display: none; }
.imm-ra-chip {
  --imm-ra-dot: var(--imm-violet-500);
  display: inline-flex; align-items: center; gap: 0.55em; min-height: 40px; max-width: 100%; padding: 0.35em 0.95em 0.35em 0.6em;
  border: 1px solid var(--imm-line); border-radius: var(--imm-r-pill); background: rgba(255, 255, 255, 0.8);
  font: inherit; font-size: var(--imm-fs-xs); font-weight: 500; line-height: 1.35; color: var(--imm-ink-2); text-align: left;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}
.imm-ra-chip__dot { flex: none; width: 0.95em; height: 0.95em; border-radius: 50%; background: var(--imm-ra-dot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--imm-ra-dot) 22%, transparent); transition: transform 0.4s var(--imm-ease-spring); }
.imm-ra-chip__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imm-ra-chip[aria-pressed='true'] { border-color: color-mix(in srgb, var(--imm-ra-dot) 45%, var(--imm-line)); }
.imm-ra-chip.is-off { opacity: 0.55; background: transparent; color: var(--imm-ink-3); text-decoration: line-through; text-decoration-color: rgba(104, 104, 172, 0.4); }
.imm-ra-chip.is-off .imm-ra-chip__dot { background: transparent; box-shadow: inset 0 0 0 2px var(--imm-ra-dot); transform: scale(0.85); }
.imm-ra-chip:focus-visible { outline: 2px solid var(--imm-gold-400); outline-offset: 2px; }
@media (hover: hover) { .imm-ra-chip:hover { background: #fff; box-shadow: var(--imm-shadow-1); } }

/* drill breadcrumb */
.imm-ra-crumbs { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 2px; max-width: min(100%, 40rem); }
.imm-ra-crumb { display: inline-flex; align-items: center; gap: 0.4em; max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0.3em 0.6em; font-size: var(--imm-fs-xs); line-height: 1.4; color: var(--imm-ink-3); }
.imm-ra-crumb + .imm-ra-crumb::before { content: '›'; margin-right: 0.45em; color: var(--imm-gold-500); }
.imm-ra-crumb[aria-current='location'] { color: var(--imm-violet-800); font-weight: 500; }
.imm-ra-crumb--home {
  min-height: 40px; padding: 0.3em 0.95em 0.3em 0.7em; border: 1px solid var(--imm-line); border-radius: var(--imm-r-pill);
  background: rgba(255, 255, 255, 0.8); font: inherit; font-size: var(--imm-fs-xs); font-weight: 500; color: var(--imm-violet-700); cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.imm-ra-crumb--home svg { width: 1.15em; height: 1.15em; }
.imm-ra-fig--bubble.is-drilled .imm-ra-crumb--home { border-color: var(--imm-line-gold); background: var(--imm-gold-50); color: var(--imm-gold-700); animation: imm-ra-glow 2.4s ease-out 1; }
.imm-ra-crumb--home[aria-current] { cursor: default; border-color: transparent; background: none; color: var(--imm-ink-3); padding-inline: 0.2em; min-height: 32px; }
.imm-ra-crumb--home:focus-visible { outline: 2px solid var(--imm-gold-400); outline-offset: 2px; }
@media (hover: hover) { .imm-ra-fig--bubble.is-drilled .imm-ra-crumb--home:hover { background: #fff; box-shadow: var(--imm-shadow-1); } }
.imm-ra-crumb + .imm-ra-crumb { padding-left: 0; }

/* ------------------------------------------------------------------ 7 · flow chart ("แนวทางการวิเคราะห์", every menu) */
.imm-ra-fig--flow { width: var(--imm-ra-col); }
.imm-ra-fig--flow .imm-ra-plot { min-width: max(100%, var(--imm-ra-flow-min)); }
#flowChart {
  /* inline min-width:60vw / height:700px (compass.js); max-width / margin are legacy !important → §17 */
  min-width: 0 !important; width: 100%; height: clamp(600px, 52vw + 120px, 720px) !important;
}
#flowChart .highcharts-data-label h4 { margin: 0; font-family: 'Kanit', sans-serif; font-size: 0.84rem; line-height: 1.35; color: inherit; letter-spacing: 0; }
/* phones (≤767px, results-analysis.js buildCompactFlow): the same steps as one column of pills in level order, each
   sized to its own text — never wrapped (owner 2026-11-18) — in their level colours (--fc / --fw), linked by
   straight right-angled lines in a lane gutter on the left; the Highcharts chart hides. */
.imm-ra-flowc { display: none; }
.imm-ra-fig--flow.is-compact .imm-ra-plot { min-width: 0; }
.imm-ra-fig--flow.is-compact #flowChart { display: none !important; } /* inline height (compass.js) */
.imm-ra-fig--flow.is-compact .imm-ra-flowc { display: block; position: relative; padding: 2px 0 10px; }
.imm-ra-flowc__links { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
/* straight right-angled links in a lane gutter on the left (results-analysis.js sets the gutter as padding-left) */
.imm-ra-flowc__lines { fill: none; stroke: rgba(104, 104, 172, 0.55); stroke-width: 1.5; stroke-linejoin: round; }
.imm-ra-flowc__marks { fill: rgba(104, 104, 172, 0.8); stroke: none; }
.imm-ra-flowc__title { position: relative; margin: 0 0 18px; text-align: left; font-size: 1.05rem; font-weight: 600; line-height: 1.4; color: var(--imm-ink); }
/* one column in level order: a little more air between levels than inside one */
.imm-ra-flowc__levels { position: relative; display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.imm-ra-flowc__level { display: grid; justify-items: start; gap: 10px; }
.imm-ra-flowc__node {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0.45em 0.95em;
  border: 1.5px solid var(--fc, var(--imm-violet-500)); border-radius: 14px;
  background: linear-gradient(var(--fw, rgba(104, 104, 172, 0.12)), var(--fw, rgba(104, 104, 172, 0.12))), #fffdfa;
  font-size: calc(0.82rem * var(--fz, 1)); font-weight: 500; line-height: 1.35; color: var(--imm-ink); white-space: nowrap;
}
html.a11y-high-contrast .imm-ra-flowc__node { background: #fff; border: 2px solid #0b0b12; color: #0b0b12; }
html.a11y-high-contrast .imm-ra-flowc__lines { stroke: #0b0b12; stroke-width: 2; }
html.a11y-high-contrast .imm-ra-flowc__marks { fill: #0b0b12; }
/* Highcharts appends the outside tooltip to <body> at z-index 3 — under the results modal (1000) */
body > .highcharts-tooltip-container { z-index: 1001 !important; } /* inline z-index written by Highcharts */

/* ------------------------------------------------------------------ 8 · oc0 — header, reading guide, control deck */
.imm-ra-maphead { /* #matchTresholdContainer — inline width:90% / margin / padding-bottom */
  width: var(--imm-ra-col) !important; margin: 0 auto !important; padding: 0 !important;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.imm-ra-maphead > .imm-eyebrow { margin: clamp(6px, 1.4vw, 16px) 0 6px; }
.imm-ra-maphead__title.imm-ra-maphead__title { width: min(100%, 48rem); margin: 0 0 clamp(16px, 2.6vw, 28px); font-size: var(--imm-fs-xl); font-weight: 600; line-height: var(--imm-lh-snug); color: var(--imm-ink); text-align: center; text-wrap: balance; }

/* reading guide: numbered, two columns on desktop, "คู่มือการอ่านกราฟ" fold on phones */
.imm-ra-guide.imm-fold { width: 100%; text-align: left; }
.imm-ra-guide .instructions { font-size: inherit; line-height: inherit; color: inherit; }
.imm-ra-guide .imm-ra-guide__h { display: none; } /* its text is the fold title */
.imm-ra-guide .instructions > ol { counter-reset: imm-ra-step; margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.imm-ra-guide .instructions > ol > li {
  counter-increment: imm-ra-step; position: relative;
  margin: 0; padding: 0.95em 1.1em 0.95em 3.6em; border: 1px solid var(--imm-line); border-radius: var(--imm-r-md);
  background: var(--imm-surface); font-size: var(--imm-fs-sm); font-weight: 300; line-height: 1.7; color: var(--imm-ink-2);
}
.imm-ra-guide .instructions > ol > li::before {
  content: counter(imm-ra-step); position: absolute; left: 0.9em; top: 0.85em;
  display: grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%;
  font-size: var(--imm-fs-sm); font-weight: 500; line-height: 1; color: var(--imm-gold-700);
  background: var(--imm-gold-50); border: 1px solid var(--imm-line-gold);
}
.imm-ra-guide .instructions > ol > li > strong { display: inline-block; margin-bottom: 0.1em; font-size: var(--imm-fs-md); font-weight: 600; color: var(--imm-violet-800); }
.imm-ra-guide .instructions > ol > li > br:first-of-type { content: ''; }
@media (min-width: 768px) {
  .imm-ra-guide.imm-fold:not(.is-collapsible) { border-color: transparent; background: none; box-shadow: none; }
  .imm-ra-guide.imm-fold:not(.is-collapsible) > .imm-fold__toggle { justify-content: center; padding: 0 0 0.9em; min-height: 0; font-size: var(--imm-fs-sm); color: var(--imm-violet-700); }
  .imm-ra-guide.imm-fold:not(.is-collapsible) .imm-fold__title { flex: none; }
  .imm-ra-guide .imm-fold__panel > .imm-ra-fold__body { padding-inline: 0; }
  .imm-ra-guide .imm-fold__panel > .imm-ra-fold__body::after { display: none; }
  .imm-ra-guide .instructions > ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
  .imm-ra-guide .instructions > ol > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 1180px) {
  .imm-ra-guide .instructions > ol { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .imm-ra-guide .instructions > ol > li { grid-column: span 2; }
  .imm-ra-guide .instructions > ol > li:nth-child(4), .imm-ra-guide .instructions > ol > li:nth-child(5) { grid-column: span 3; }
  .imm-ra-guide .instructions > ol > li:last-child:nth-child(odd) { grid-column: span 3; }
}

/* control deck: Simple/Detailed segmented control · Top-N pills · threshold slider */
.imm-ra-deck {
  position: relative; display: grid; gap: clamp(12px, 1.8vw, 18px);
  width: min(100%, 52rem); margin: clamp(16px, 2.6vw, 26px) auto var(--imm-ra-gap); padding: clamp(14px, 2vw, 22px);
  border: 1px solid var(--imm-line); border-radius: var(--imm-r-lg);
  background: linear-gradient(160deg, rgba(104, 104, 172, 0.07), rgba(250, 172, 30, 0.06) 70%), var(--imm-surface);
  box-shadow: var(--imm-shadow-1);
}
.imm-ra-modes.sankey-simple-mode-wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px;
  width: 100%; max-width: none; margin: 0; padding: 0;
}
.imm-ra-modes .sankey-mode-toggle {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  width: min(100%, 380px); min-height: 52px; padding: 5px;
  border: 1px solid var(--imm-line); border-radius: var(--imm-r-pill);
  background: rgba(104, 104, 172, 0.09); box-shadow: inset 0 1px 3px rgba(27, 24, 56, 0.08);
  font: inherit; cursor: pointer; overflow: hidden; -webkit-tap-highlight-color: transparent;
}
.imm-ra-modes .sankey-mode-label { position: relative; z-index: 2; padding: 0 0.6em; font-family: inherit; font-size: var(--imm-fs-sm); font-weight: 500; line-height: 1.3; color: var(--imm-ink-2); transition: color 0.35s ease; }
.imm-ra-modes .sankey-mode-toggle:not(.is-simple) .sankey-mode-label--detailed,
.imm-ra-modes .sankey-mode-toggle.is-simple .sankey-mode-label--simple { color: #fff; }
.imm-ra-modes .sankey-mode-toggle:not(.is-simple) .sankey-mode-label--simple,
.imm-ra-modes .sankey-mode-toggle.is-simple .sankey-mode-label--detailed { color: var(--imm-ink-2); }
.imm-ra-modes .sankey-mode-thumb {
  position: absolute; z-index: 1; top: 5px; left: 5px; width: calc(50% - 5px); height: calc(100% - 10px);
  border-radius: var(--imm-r-pill); background: var(--imm-grad-brand);
  box-shadow: 0 6px 16px rgba(104, 104, 172, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translate3d(100%, 0, 0); transition: transform 0.6s var(--imm-ease-spring), background 0.4s ease;
}
.imm-ra-modes .sankey-mode-toggle.is-simple .sankey-mode-thumb { left: 5px; transform: none; background: var(--imm-grad-gold); box-shadow: 0 6px 16px rgba(250, 172, 30, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.imm-ra-modes .sankey-mode-toggle.is-simple .sankey-mode-label--simple { color: #2b1d00; }
.imm-ra-modes .sankey-mode-toggle:focus-visible { outline: 2px solid var(--imm-gold-400); outline-offset: 3px; box-shadow: none; }
.imm-ra-modes .sankey-top-limit-wrap { width: auto; gap: 4px; padding: 4px; border: 1px solid var(--imm-line); border-radius: var(--imm-r-pill); background: rgba(255, 255, 255, 0.7); }
.imm-ra-modes .sankey-top-limit-btn {
  min-height: 40px; padding: 0.3em 1.05em; border: 0; border-radius: var(--imm-r-pill); background: transparent;
  font: inherit; font-size: var(--imm-fs-sm); font-weight: 500; color: var(--imm-ink-2); cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.imm-ra-modes .sankey-top-limit-btn.is-on { background: var(--imm-gold-100); color: var(--imm-gold-700); box-shadow: inset 0 0 0 1px var(--imm-line-gold); }
.imm-ra-modes .sankey-top-limit-btn:focus-visible { outline: 2px solid var(--imm-gold-400); outline-offset: 2px; }
.imm-ra-modes .sankey-simple-mode-note { flex: 1 1 100%; font-size: var(--imm-fs-xs); line-height: 1.5; color: var(--imm-ink-3); text-align: center; }

/* threshold slider — .match-treshold-parent (inline display:none in Simple mode; never forced) */
.imm-ra-threshold.match-treshold-parent {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: 'label label label' 'range num unit' 'scale . .';
  align-items: center; column-gap: clamp(12px, 2vw, 22px); row-gap: 2px;
  width: 100%; max-width: none; margin: 0; padding: clamp(12px, 1.6vw, 16px) clamp(4px, 1vw, 10px) 0;
  border: 0; border-top: 1px solid var(--imm-line); border-radius: 0; background: none; box-shadow: none; text-align: left;
}
.imm-ra-threshold > label { grid-area: label; margin-bottom: 4px; }
.imm-ra-threshold > label h1 { margin: 0; width: auto; font-size: var(--imm-fs-sm); font-weight: 500; line-height: 1.5; color: var(--imm-violet-700); text-align: left; }
.imm-ra-threshold .match-treshold-range { grid-area: range; }
.imm-ra-threshold .imm-ra-numeral { grid-area: num; }
.imm-ra-threshold .imm-ra-unit { grid-area: unit; align-self: end; padding-bottom: 0.55em; font-size: var(--imm-fs-sm); color: var(--imm-ink-3); }
.imm-ra-threshold .imm-ra-scale { grid-area: scale; display: flex; justify-content: space-between; padding: 0 2px; font-size: var(--imm-fs-2xs); line-height: 1.4; color: var(--imm-ink-3); font-variant-numeric: tabular-nums; }
.imm-ra-threshold #tresholdValueDescription:empty { display: none; }

.imm-ra-threshold .match-treshold-range {
  --imm-ra-fill: 50%;
  width: 100%; height: 44px; margin: 0; padding: 0; background: transparent; cursor: pointer; accent-color: var(--imm-gold-400);
  -webkit-appearance: none; appearance: none;
}
.imm-ra-threshold .match-treshold-range::-webkit-slider-runnable-track {
  height: 10px; border: 0; border-radius: var(--imm-r-pill);
  background:
    linear-gradient(90deg, var(--imm-violet-500), var(--imm-gold-400)) 0 0 / var(--imm-ra-fill) 100% no-repeat,
    rgba(104, 104, 172, 0.16);
  box-shadow: inset 0 1px 2px rgba(27, 24, 56, 0.16);
}
.imm-ra-threshold .match-treshold-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 30px; height: 30px; margin-top: -10px; border-radius: 50%;
  border: 3px solid #fff; background: var(--imm-grad-gold);
  box-shadow: 0 4px 12px rgba(224, 138, 6, 0.45), 0 0 0 1px rgba(140, 84, 7, 0.25);
  transition: transform 0.35s var(--imm-ease-spring), box-shadow 0.3s ease;
}
.imm-ra-threshold .match-treshold-range::-moz-range-track { height: 10px; border: 0; border-radius: var(--imm-r-pill); background: rgba(104, 104, 172, 0.16); box-shadow: inset 0 1px 2px rgba(27, 24, 56, 0.16); }
.imm-ra-threshold .match-treshold-range::-moz-range-progress { height: 10px; border-radius: var(--imm-r-pill); background: linear-gradient(90deg, var(--imm-violet-500), var(--imm-gold-400)); }
.imm-ra-threshold .match-treshold-range::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; border: 3px solid #fff; background: var(--imm-grad-gold);
  box-shadow: 0 4px 12px rgba(224, 138, 6, 0.45), 0 0 0 1px rgba(140, 84, 7, 0.25);
}
@media (hover: hover) { .imm-ra-threshold .match-treshold-range:hover::-webkit-slider-thumb { transform: scale(1.1); } }
.imm-ra-threshold .match-treshold-range:active::-webkit-slider-thumb { transform: scale(1.16); box-shadow: 0 0 0 8px rgba(250, 172, 30, 0.18), 0 4px 12px rgba(224, 138, 6, 0.45); }
.imm-ra-threshold .match-treshold-range:focus { outline: none; }
.imm-ra-threshold .match-treshold-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--imm-gold-500), 0 4px 12px rgba(224, 138, 6, 0.45); }
.imm-ra-threshold .match-treshold-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--imm-gold-500); }

/* the live value as a big numeral (the <output> skill_mapping.js writes) */
.imm-ra-threshold .imm-ra-numeral {
  display: block; min-width: 2.2ch; height: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  font-family: inherit; font-size: clamp(2.6rem, 2rem + 2.2vw, 3.6rem); font-weight: 300; line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; text-align: right;
  color: var(--imm-gold-600);
  background-image: linear-gradient(160deg, var(--imm-violet-600) 0%, var(--imm-gold-500) 70%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ------------------------------------------------------------------ 9 · oc0 — skill → career map figure */
.imm-ra-fig--map, .imm-ra-fig--occ { width: var(--imm-ra-col); }
.imm-ra-fig--map .imm-ra-plot, .imm-ra-fig--occ .imm-ra-plot { min-width: max(100%, var(--imm-ra-map-min)); }
#skillMapping {
  /* inline width:100vw / padding 1em 5em (compass.js); height + min-height are written by skill_mapping.js */
  width: 100% !important; padding: 0 !important; margin: 0;
}
.imm-ra-panel--oc0:has(.sankey-mode-toggle.is-simple) .imm-ra-fig--map .imm-ra-plot { min-width: 100%; } /* the bar chart fits any screen */
.imm-ra-panel--oc0:has(.sankey-mode-toggle.is-simple) .imm-ra-route { display: none; } /* the column route only describes the Sankey */
@media (max-width: 767px) {
  .imm-ra-panel--oc0:has(.sankey-mode-toggle.is-simple) .imm-ra-fig--map > .imm-ra-fig__head { display: none; }
}
.imm-ra-route { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 4px 0 0; padding: 0; list-style: none; }
.imm-ra-route__step { --imm-ra-dot: var(--imm-violet-500); display: inline-flex; align-items: center; gap: 0.5em; font-size: var(--imm-fs-xs); font-weight: 500; line-height: 1.5; color: var(--imm-ink-2); }
.imm-ra-route__step + .imm-ra-route__step::before { content: ''; width: clamp(14px, 2.4vw, 30px); height: 1px; margin: 0 0.6em; background: linear-gradient(90deg, var(--imm-line-strong), var(--imm-gold-400)); }
.imm-ra-route__dot { width: 0.7em; height: 1.15em; border-radius: 3px; background: var(--imm-ra-dot); }

/* drill focus status + back (moved here from the slider block by results-analysis.js) */
.imm-ra-fig__toolbar .skill-mapping-focus-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; width: auto; margin: 0; padding: 0; border: 0; }
.imm-ra-fig__toolbar .skill-mapping-focus-status { font-size: var(--imm-fs-xs); line-height: 1.5; color: var(--imm-gold-700); }
.imm-ra-fig__toolbar .skill-mapping-focus-status:empty { display: none; }
.imm-ra-fig__toolbar .skill-mapping-focus-status:not(:empty) {
  display: inline-flex; align-items: center; gap: 0.5em; max-width: 32rem; padding: 0.35em 0.9em; border-radius: var(--imm-r-pill);
  background: var(--imm-gold-50); border: 1px solid var(--imm-line-gold); word-break: normal; overflow-wrap: anywhere;
}
.imm-ra-fig__toolbar .skill-mapping-focus-status:not(:empty)::before { content: ''; flex: none; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--imm-gold-500); box-shadow: 0 0 0 3px rgba(250, 172, 30, 0.25); }
.imm-ra-fig__toolbar .skill-mapping-focus-actions { width: auto; flex: none; }

/* both legacy back buttons → a quiet pill with a chevron (inline display none/block stays in charge) */
.imm-ra-fig__toolbar #skillMappingBackButton, .imm-ra-fig__toolbar .imm-ra-occ-back {
  min-height: 42px; padding: 0.4em 1.1em 0.4em 2.2em; border: 1px solid var(--imm-line-strong); border-radius: var(--imm-r-pill);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23525094' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 6 9 12l6 6'/%3E%3C/svg%3E") no-repeat 0.85em 50% / 1em;
  font-size: var(--imm-fs-sm); line-height: 1.3; color: var(--imm-violet-700); white-space: nowrap; cursor: pointer;
  box-shadow: var(--imm-shadow-1); transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  animation: imm-ra-rise 0.5s var(--imm-ease-out) backwards;
}
@media (hover: hover) {
  .imm-ra-fig__toolbar #skillMappingBackButton:hover, .imm-ra-fig__toolbar .imm-ra-occ-back:hover { border-color: var(--imm-line-gold); box-shadow: var(--imm-shadow-2); }
}
.imm-ra-fig__toolbar #skillMappingBackButton:focus-visible, .imm-ra-fig__toolbar .imm-ra-occ-back:focus-visible { outline: 2px solid var(--imm-gold-400); outline-offset: 3px; }
/* the occupation back button is created position:fixed on <body>; inside the toolbar it is a normal pill.
   !important: beats the inline position/top/right/z-index written by occupation_mapping.js */
.imm-ra-occ-back { position: static !important; inset: auto !important; z-index: auto !important; margin: 0 !important; }
.imm-ra-occ-back--stale { display: none !important; } /* superseded copies left on <body> by earlier searches */

/* ------------------------------------------------------------------ 10 · oc1 — "ฉันอยากจะเป็น" destination search */
.imm-ra-seek.occupation-mapping-container {
  /* #occupationMapping — inline width:100vw */
  position: relative; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: clamp(12px, 2vw, 20px);
  width: min(100%, 46rem) !important; margin: clamp(10px, 3vh, 34px) auto clamp(16px, 2.6vw, 26px); padding: 0;
}
.imm-ra-seek__label { display: grid; justify-items: center; gap: 2px; text-align: center; }
.imm-ra-seek__label > .imm-eyebrow { margin: 0 0 4px; }
.imm-ra-seek__label > h1 {
  margin: 0; width: auto; font-size: var(--imm-fs-3xl); font-weight: 600; line-height: 1.15; letter-spacing: -0.005em; text-wrap: balance;
  background: var(--imm-grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--imm-violet-800);
  padding-bottom: 0.08em;
}
.imm-ra-seek__form.occupation-mapping-form {
  position: relative; z-index: 30;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px;
  width: 100%; padding: 6px 6px 6px 8px;
  border: 1px solid var(--imm-line-strong); border-radius: var(--imm-r-pill);
  background: rgba(255, 255, 255, 0.92); box-shadow: var(--imm-shadow-2), inset 0 1px 0 #fff;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.imm-ra-seek__form:focus-within { border-color: var(--imm-gold-400); box-shadow: 0 0 0 4px rgba(250, 172, 30, 0.2), var(--imm-shadow-2); }
.imm-ra-seek__lens { display: grid; place-items: center; width: 40px; height: 40px; color: var(--imm-violet-500); }
.imm-ra-seek__lens svg { width: 22px; height: 22px; }
.imm-ra-seek__form #q {
  grid-column: 2; grid-row: 1; min-width: 0; min-height: 48px; padding: 0.4em 0.4em; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  font: inherit; font-size: var(--imm-fs-md); color: var(--imm-ink); -webkit-appearance: none; appearance: none; outline: none;
}
.imm-ra-seek__form #q::placeholder { color: var(--imm-ink-3); opacity: 0.85; }
.imm-ra-seek__form #q::-webkit-search-cancel-button { -webkit-appearance: none; width: 18px; height: 18px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6b90' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / 14px no-repeat; }
.imm-ra-seek__form #search_from_occupation {
  grid-column: 3; grid-row: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.45em;
  min-height: 48px; padding: 0.55em 1.5em; border: 0; border-radius: var(--imm-r-pill);
  background: var(--imm-grad-gold); color: #2b1d00; font: inherit; font-size: var(--imm-fs-md); font-weight: 600; line-height: 1.2; white-space: nowrap;
  box-shadow: 0 10px 26px rgba(250, 172, 30, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.45); cursor: pointer;
  transition: transform 0.4s var(--imm-ease-out), box-shadow 0.4s var(--imm-ease-out), filter 0.3s ease, opacity 0.3s ease;
}
.imm-ra-seek__form #search_from_occupation::after { /* arrow — the label itself is rewritten by compass.js */
  content: ''; width: 1em; height: 1em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.imm-ra-seek__form #search_from_occupation[aria-busy='true']::after { display: none; }
.imm-ra-seek__form #search_from_occupation:disabled { background: rgba(104, 104, 172, 0.14); color: var(--imm-ink-3); box-shadow: none; opacity: 1; cursor: not-allowed; }
@media (hover: hover) { .imm-ra-seek__form #search_from_occupation:not(:disabled):hover { transform: translate3d(0, -1px, 0); box-shadow: 0 14px 32px rgba(250, 172, 30, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.45); } }
.imm-ra-seek__form #search_from_occupation:focus-visible { outline: 2px solid var(--imm-violet-600); outline-offset: 3px; }
.imm-ra-seek__form .spinner-border { width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: imm-spin 0.8s linear infinite; }

/* suggestions: a floating paper menu under the pill (static-position absolute in legacy → explicit offsets) */
.imm-ra-seek__form #results {
  top: calc(100% + 10px); left: 0; right: 0; width: auto; max-width: none;
  margin: 0; padding: 6px; list-style: none;
  border: 1px solid var(--imm-line); border-radius: var(--imm-r-md);
  background: var(--imm-surface); box-shadow: var(--imm-shadow-3);
  overscroll-behavior: contain; scrollbar-width: thin;
  animation: imm-ra-rise 0.35s var(--imm-ease-out) backwards;
}
.imm-ra-seek__form #results > li {
  width: auto; max-width: none; margin: 0; padding: 0.7em 0.95em 0.7em 2.4em; border: 0; border-radius: var(--imm-r-sm);
  position: relative; font-size: var(--imm-fs-sm); line-height: 1.5; color: var(--imm-ink-2); cursor: pointer; text-align: left;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.imm-ra-seek__form #results > li::before {
  content: ''; position: absolute; left: 0.95em; top: 50%; width: 0.75em; height: 0.75em; translate: 0 -50%; border-radius: 50%;
  border: 1.5px solid var(--imm-violet-300); transition: background-color 0.2s ease, border-color 0.2s ease;
}
.imm-ra-seek__form #results > li:first-child { background: rgba(104, 104, 172, 0.06); } /* Enter picks the first item */
@media (hover: hover) {
  .imm-ra-seek__form #results > li:hover { background: var(--imm-gold-50); color: var(--imm-ink); }
  .imm-ra-seek__form #results > li:hover::before { border-color: var(--imm-gold-500); background: var(--imm-gold-400); }
}

/* the display-advice + AI note under the search: quiet framed note, a fold on phones */
.imm-ra-advice.imm-fold { width: min(100%, 46rem); }
.imm-ra-advice .warning-occupation-sankey { text-align: left; }
.imm-ra-advice .warning-occupation-sankey > p { margin: 0 0 0.5em; font-size: var(--imm-fs-sm); line-height: 1.7; color: var(--imm-ink-2); }
.imm-ra-advice .warning-occupation-sankey > .warning-text { margin: 0; font-size: var(--imm-fs-xs); color: var(--imm-ink-3); }
@media (min-width: 768px) {
  .imm-ra-advice.imm-fold:not(.is-collapsible) > .imm-fold__toggle { display: none; }
  .imm-ra-advice .imm-fold__panel > .imm-ra-fold__body { padding-inline: 0; }
  .imm-ra-advice .imm-fold__panel > .imm-ra-fold__body::after { display: none; }
  .imm-ra-advice .warning-occupation-sankey { text-align: center; }
  .imm-ra-advice .warning-occupation-sankey > p:first-child::before {
    content: ''; display: inline-block; width: 1em; height: 1em; margin-right: 0.45em; vertical-align: -0.15em;
    background: var(--imm-violet-400);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E") center / contain no-repeat;
  }
}

/* ------------------------------------------------------------------ 11 · oc1 — occupation figure */
#occupationMappingChart { width: 100% !important; margin: 0; } /* legacy .occupationMappingChart is 100vw (normal rule, but keeps parity with the id) */
.imm-ra-fig--occ .imm-ra-occ__title { font-size: var(--imm-fs-xl); background: var(--imm-grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.imm-ra-fig--occ.is-waiting > .imm-ra-fig__head, .imm-ra-fig--occ.is-waiting > .imm-ra-hintbar, .imm-ra-fig--occ.is-waiting > .imm-ra-fig__scroll { display: none; }
.imm-ra-fig--occ:not(.is-waiting) > .imm-ra-wait { display: none; }
.imm-ra-wait { display: grid; justify-items: center; gap: 6px; padding: clamp(28px, 6vh, 64px) clamp(12px, 3vw, 28px); text-align: center; }
.imm-ra-wait__dial { /* the glass elephant guide waiting for a destination (art direction v2: no compass imagery) */
  position: relative; width: 96px; height: 100px; margin-bottom: 8px;
  background:
    url("../../images/immersive/elephant-glass-420.webp") center 38% / contain no-repeat,
    radial-gradient(closest-side at 50% 90%, rgba(250, 172, 30, 0.34), rgba(250, 172, 30, 0) 100%) center bottom / 100% 32% no-repeat;
  filter: drop-shadow(0 10px 16px rgba(43, 39, 91, 0.2));
  animation: imm-float 5.5s var(--imm-ease-in-out) infinite;
}
.imm-ra-wait__title { margin: 0; font-size: var(--imm-fs-lg); font-weight: 600; line-height: 1.45; color: var(--imm-ink); }
.imm-ra-wait__text { margin: 0; max-width: 28rem; font-size: var(--imm-fs-sm); font-weight: 300; line-height: 1.65; color: var(--imm-ink-3); }

/* ------------------------------------------------------------------ 12 · supporting notes (methodology tabs) */
.imm-ra-notes { display: grid; gap: clamp(12px, 2vw, 18px); width: var(--imm-ra-col); margin: 0 auto; }
@media (min-width: 900px) { .imm-ra-notes { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); } }
.imm-ra-notecard {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start;
  padding: clamp(16px, 2.2vw, 24px); border: 1px solid var(--imm-line); border-radius: var(--imm-r-lg);
  background: linear-gradient(150deg, rgba(104, 104, 172, 0.06), rgba(250, 172, 30, 0.04) 70%), var(--imm-surface);
}
.imm-ra-notecard__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--imm-violet-600); background: var(--imm-violet-50); border: 1px solid var(--imm-line); }
.imm-ra-notecard__icon svg { width: 22px; height: 22px; }
.imm-ra-notecard__text.imm-ra-notecard__text {
  /* the 21st-century paragraph carries inline text-align:right */
  width: auto; margin: 0; text-align: left !important; font-size: var(--imm-fs-sm); line-height: 1.85; color: var(--imm-ink-2);
}
.imm-ra-notecard__text > b:first-child { display: inline-block; margin-bottom: 0.2em; font-size: var(--imm-fs-md); color: var(--imm-violet-800); }

/* ------------------------------------------------------------------ 13 · empty states */
/* overlay inside a figure: the chart box keeps a calm, small footprint (help targets stay visible) */
.imm-ra-fig.is-empty { padding-bottom: var(--imm-ra-fig-pad); }
.imm-ra-fig.is-empty .imm-ra-plot { min-width: 100%; }
.imm-ra-fig.is-empty #sunburst { height: 380px !important; opacity: 0; } /* stays laid out: help-assistant target */
.imm-ra-fig.is-empty #skillMapping { height: 380px !important; min-height: 0 !important; opacity: 0; } /* never rewritten while empty; stays laid out for the help assistant */
.imm-ra-fig.is-empty #occupationMappingChart { height: 340px !important; min-height: 0 !important; opacity: 0; } /* JS height (vh) restored + chart resized when data shows again */
.imm-ra-fig.is-empty > .imm-ra-chips, .imm-ra-fig.is-empty .imm-ra-crumbs, .imm-ra-fig.is-empty .imm-ra-route,
.imm-ra-fig.is-empty > .chart-accessibility-panel, .imm-ra-fig.is-empty > .imm-ra-fig__caption { display: none; }
.imm-ra-fig__body > .imm-ra-empty, .imm-ra-fig__scroll > .imm-ra-empty {
  position: absolute; z-index: 3; left: 50%; top: 50%; translate: -50% -50%; margin: 0;
  width: min(calc(100% - 24px), 34rem); background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--imm-shadow-2); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.imm-ra-fig--occ.is-empty .imm-ra-fig__scroll { min-height: 340px; }
.imm-ra-fig.is-empty > .imm-ra-fig__head.is-sticky { position: relative; top: auto; border-bottom: 0; background: none; }
@media (max-width: 767px) { .imm-ra-fig--map.is-empty > .imm-ra-fig__head { display: none; } }
.imm-ra-empty .imm-ra-empty__action { margin-top: 10px; min-height: 46px; font-size: var(--imm-fs-sm); }
.imm-ra-ledger > .imm-ra-empty { width: 100%; margin-inline: 0; }
/* oc0 without a map: nothing to filter — keep the guide, hide the inert controls */
.imm-ra-panel--oc0.is-map-empty .imm-ra-deck { display: none; }
/* the generic error card compass.js appends when createTable() trips over a "no grades" message string;
   each tab already shows a precise empty state (results-analysis.js only adds this class in that case) */
.error-message.imm-ra-explained { display: none; }

/* ------------------------------------------------------------------ 14 · responsive */
@media (max-width: 1023px) {
  #resultsModal { --imm-ra-map-min: 860px; --imm-ra-flow-min: 720px; }
}
@media (max-width: 767px) {
  #resultsModal { --imm-ra-fig-pad: 14px; --imm-ra-gap: 26px; }
  .imm-ra-fig.imm-figure { border-radius: var(--imm-r-md); }
  .imm-ra-fig::before { inset: 8px; }
  .imm-ra-fig__head.imm-figure__head { flex-direction: column; align-items: stretch; }
  .imm-ra-fig__toolbar { justify-content: flex-start; }
  .imm-ra-fig--spider .imm-ra-fig__head { align-items: center; }
  #spiderChart { height: clamp(470px, 118vw, 560px) !important; } /* inline height:700px (compass.js) */
  #resultsModal { --imm-ra-bleed-inset: 6px; }
  #sunburst { height: min(calc(100vw - 38px), 560px) !important; } /* the pack is a circle: a square plot wastes nothing */
  .imm-ra-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: calc(-1 * var(--imm-ra-fig-pad)); padding: 2px var(--imm-ra-fig-pad) 6px; scrollbar-width: none; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent); }
  .imm-ra-chips::-webkit-scrollbar { display: none; }
  .imm-ra-chip { flex: none; scroll-snap-align: start; max-width: 15em; }
  .imm-ra-crumbs { justify-content: flex-start; }
  #flowChart { height: 640px !important; } /* inline height:700px (compass.js) */
  .imm-ra-callout.imm-fold { border-radius: var(--imm-r-md); }
  .imm-ra-callout .imm-fold__toggle { min-height: 64px; padding: 0.7em 1em 0.7em 0.8em; }
  .imm-ra-callout .imm-fold__icon { width: 40px; height: 40px; }
  .imm-ra-callout .imm-fold__panel > .imm-ra-fold__body::before { content: ''; display: block; height: 14px; } /* spacer, not padding: the 0fr row must reach 0 */
  .imm-ra-deck { padding: 14px; border-radius: var(--imm-r-md); }
  .imm-ra-modes .sankey-mode-toggle { width: 100%; }
  .imm-ra-threshold.match-treshold-parent { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 12px; }
  .imm-ra-seek__label > h1 { font-size: var(--imm-fs-2xl); }
  .imm-ra-seek__form #search_from_occupation { padding-inline: 1.1em; }
  .imm-ra-fig__titles, .imm-ra-fig__toolbar { flex: none; } /* the head is a column here: no height basis */
  .imm-ra-fig__head.is-sticky { padding-top: 12px; padding-bottom: 10px; margin-bottom: 12px; }
  .imm-ra-fig__head.is-sticky .imm-ra-fig__eyebrow { display: none; }
  .imm-ra-fig--occ .imm-ra-fig__head.is-sticky .imm-ra-fig__eyebrow { display: block; }
  .imm-ra-route__step { font-size: var(--imm-fs-2xs); }
  .imm-ra-guide .instructions > ol > li { padding-left: 3.2em; }
}
@media (max-width: 380px) {
  .imm-ra-seek__form.occupation-mapping-form { grid-template-columns: auto minmax(0, 1fr); border-radius: var(--imm-r-lg); }
  .imm-ra-seek__form #search_from_occupation { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .imm-ra-seek__lens { width: 32px; }
  .imm-ra-threshold .imm-ra-numeral { font-size: 2.4rem; }
}
/* landscape phones: the stage is short — lower plots, the tab bar is not sticky (modal.css) */
@media (max-height: 520px) and (min-width: 560px) {
  #spiderChart { height: 470px !important; }
  #sunburst { height: clamp(360px, 88vh, 460px) !important; }
  #flowChart { height: 600px !important; }
}
/* ultrawide / 4K: the radar and notes stay readable, the bubble band grows */
@media (min-width: 1920px) {
  #resultsModal { --imm-ra-col: min(100%, 72rem); }
  #spiderChart { height: 720px !important; }
}

/* ------------------------------------------------------------------ 15 · reduced motion */
html.imm-reduced .imm-ra-callout.imm-fold,
html.imm-reduced .imm-ra-fig.imm-figure,
html.imm-reduced .imm-ra-callout__rings,
html.imm-reduced .imm-ra-hint,
html.imm-reduced .imm-ra-fig--bubble.is-drilled .imm-ra-crumb--home,
html.imm-reduced .imm-ra-seek__form #results,
html.imm-reduced .imm-ra-fig__toolbar #skillMappingBackButton,
html.imm-reduced .imm-ra-fig__toolbar .imm-ra-occ-back,
html.imm-reduced .imm-ra-wait__dial { animation: none; }
html.imm-reduced .imm-ra-modes .sankey-mode-thumb,
html.imm-reduced .imm-ra-modes .sankey-mode-label,
html.imm-reduced .imm-ra-chip,
html.imm-reduced .imm-ra-chip__dot,
html.imm-reduced .imm-ra-threshold .match-treshold-range::-webkit-slider-thumb,
html.imm-reduced .imm-ra-seek__form,
html.imm-reduced .imm-ra-seek__form #search_from_occupation { transition: none; }

/* ------------------------------------------------------------------ 16 · high contrast · large text */
html.a11y-high-contrast .imm-ra-fig.imm-figure,
html.a11y-high-contrast .imm-ra-deck,
html.a11y-high-contrast .imm-ra-notecard,
html.a11y-high-contrast .imm-ra-glossary__list > li,
html.a11y-high-contrast .imm-ra-guide .instructions > ol > li { background: #fff; border: 2px solid var(--imm-ink); box-shadow: none; }
html.a11y-high-contrast .imm-ra-fig::before,
html.a11y-high-contrast .imm-ra-callout__rings { display: none; }
html.a11y-high-contrast .imm-ra-callout.imm-fold { border: 2px solid var(--imm-ink); box-shadow: none; }
html.a11y-high-contrast .imm-ra-callout .imm-fold__toggle::before { background: var(--imm-accent-strong); }
html.a11y-high-contrast .imm-ra-callout .imm-fold__icon { background: #fff; color: var(--imm-ink); border: 2px solid var(--imm-ink); box-shadow: none; }
html.a11y-high-contrast .imm-ra-fig__eyebrow,
html.a11y-high-contrast .imm-ra-fold__eyebrow,
html.a11y-high-contrast .imm-ra-fig__caption { color: var(--imm-ink-2); }
html.a11y-high-contrast .imm-ra-callout .imm-ra-fold__eyebrow { color: #fff; }
html.a11y-high-contrast .imm-ra-fig__subtitle.imm-ra-fig__subtitle { color: var(--imm-ink-2) !important; } /* #sunburstBC inline colour */
html.a11y-high-contrast .imm-ra-fig__note { background: #fff; border: 2px solid var(--imm-highlight); color: var(--imm-ink); }
html.a11y-high-contrast .imm-ra-fig__head.is-sticky { background: #fff; border-bottom: 2px solid var(--imm-ink); }
html.a11y-high-contrast .imm-ra-chip { background: #fff; border: 2px solid var(--imm-ink); color: var(--imm-ink); }
html.a11y-high-contrast .imm-ra-chip.is-off { color: var(--imm-ink-2); }
html.a11y-high-contrast .imm-ra-crumb--home { background: #fff; border: 2px solid var(--imm-ink); color: var(--imm-ink); }
html.a11y-high-contrast .imm-ra-modes .sankey-mode-toggle { background: #fff; border: 2px solid var(--imm-ink); box-shadow: none; }
html.a11y-high-contrast .imm-ra-modes .sankey-mode-thumb,
html.a11y-high-contrast .imm-ra-modes .sankey-mode-toggle.is-simple .sankey-mode-thumb { background: var(--imm-accent-strong); box-shadow: none; }
html.a11y-high-contrast .imm-ra-modes .sankey-mode-toggle.is-simple .sankey-mode-label--simple { color: #fff; }
html.a11y-high-contrast .imm-ra-modes .sankey-top-limit-btn.is-on { background: var(--imm-accent-strong); color: #fff; box-shadow: none; }
html.a11y-high-contrast .imm-ra-threshold .match-treshold-range::-webkit-slider-runnable-track { background: linear-gradient(var(--imm-accent-strong), var(--imm-accent-strong)) 0 0 / var(--imm-ra-fill) 100% no-repeat, #fff; box-shadow: inset 0 0 0 2px var(--imm-ink); }
html.a11y-high-contrast .imm-ra-threshold .match-treshold-range::-webkit-slider-thumb { background: var(--imm-highlight); border-color: var(--imm-ink); box-shadow: none; }
html.a11y-high-contrast .imm-ra-threshold .imm-ra-numeral { background: none; -webkit-text-fill-color: currentColor; color: var(--imm-ink); font-weight: 500; }
html.a11y-high-contrast .imm-ra-seek__label > h1,
html.a11y-high-contrast .imm-ra-fig--occ .imm-ra-occ__title { background: none; -webkit-text-fill-color: currentColor; color: var(--imm-ink); }
html.a11y-high-contrast .imm-ra-seek__form.occupation-mapping-form { background: #fff; border: 2px solid var(--imm-ink); box-shadow: none; }
html.a11y-high-contrast .imm-ra-seek__form #search_from_occupation:not(:disabled) { background: var(--imm-accent-strong); color: #fff; box-shadow: none; }
html.a11y-high-contrast .imm-ra-seek__form #results { background: #fff; border: 2px solid var(--imm-ink); }
html.a11y-high-contrast .imm-ra-fig__toolbar #skillMappingBackButton,
html.a11y-high-contrast .imm-ra-fig__toolbar .imm-ra-occ-back { border: 2px solid var(--imm-ink); color: var(--imm-ink); box-shadow: none; }
html.a11y-high-contrast .imm-ra-fig__toolbar .skill-mapping-focus-status:not(:empty) { background: #fff; border: 2px solid var(--imm-ink); color: var(--imm-ink); }
html.a11y-high-contrast .imm-ra-fig__body > .imm-ra-empty,
html.a11y-high-contrast .imm-ra-fig__scroll > .imm-ra-empty { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.a11y-high-contrast .imm-ra-hint { background: #05050c; -webkit-backdrop-filter: none; backdrop-filter: none; }

html.a11y-font-xlarge .imm-ra-callout.imm-fold { grid-template-columns: minmax(220px, 34%) minmax(0, 1fr); }
html.a11y-font-xlarge .imm-ra-modes .sankey-mode-toggle { width: min(100%, 440px); }
html.a11y-font-xlarge .imm-ra-chip { max-width: 18em; }

/* ------------------------------------------------------------------ 17 · imm-force — beats legacy !important */
@layer imm-force {
  /* compass.css: #flowChart { max-width: 400px !important; margin: 1em auto !important } */
  #flowChart { max-width: none !important; margin: 0 !important; }
  /* compass.css: .w-100 / .mt-2 utilities on the search controls (layout now comes from the pill grid) */
  .imm-ra-seek__form #q, .imm-ra-seek__form #search_from_occupation { width: auto !important; margin-top: 0 !important; }
  /* compass.css: .kanit4 forces weight 400 on the back buttons */
  .imm-ra-fig__toolbar #skillMappingBackButton, .imm-ra-fig__toolbar .imm-ra-occ-back { font-weight: 500 !important; }
  /* compass.css: #flowChart h4 { font-weight: normal !important } */
  #flowChart .highcharts-data-label h4 { font-weight: 500 !important; }
}
