/* IMSL design system — shared component styles. Loaded after tokens.css in every preview and consumer. */
@import url("https://fonts.googleapis.com/css2?family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,700;1,7..72,400&family=Barlow:wght@400;500;600;700&family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,300..600,0..1,0&display=swap");

:root { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

/* App shell: one screen, never a scrolling page (decision 41). The shell root carries
   .imsl-shell; the document is locked to the viewport and only the shell's own regions
   (main, rail list, side panels) scroll. overflow: clip, unlike hidden, cannot be scrolled
   by focus() or scrollIntoView(), so the rail and topbar can never slide up and leave a
   blank band below. */
html:has(.imsl-shell), html:has(.imsl-shell) body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
/* position: relative makes the shell the containing block of every absolutely positioned descendant (the skip link, .imsl-sr-only text deep inside main), so overflow: clip clips them too and the document gets no scrollable overflow of its own. */
.imsl-shell { position: relative; height: 100vh; height: 100dvh; overflow: clip; }

/* Logo swap. Place both lock-ups; the nearest theme ancestor decides which one shows,
   so a light-only document inside a dark page still shows the navy lock-up. */
:root, [data-theme="light"] { --logo-light: block; --logo-dark: none; }
[data-theme="dark"] { --logo-light: none; --logo-dark: block; }
.imsl-logo--on-light { display: var(--logo-light); }
.imsl-logo--on-dark { display: var(--logo-dark); }

html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; } }

/* Visually hidden, still read by assistive tech: table captions, column names for icon-only columns. */
.imsl-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.imsl-icon { font-family: 'Material Symbols Outlined'; font-weight: 300; font-style: normal; font-size: var(--icon-md); line-height: 1; display: inline-block; vertical-align: middle; font-variation-settings: 'wght' 300, 'FILL' 0, 'GRAD' 0, 'opsz' 24; }
.imsl-icon.is-sm { font-size: var(--icon-sm); } .imsl-icon.is-lg { font-size: var(--icon-lg); }

/* Buttons */
.imsl-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--field-h); padding: 0 var(--space-6); border-radius: var(--radius-full); border: 1px solid transparent; font: 600 15px/1 var(--font-body); white-space: nowrap; cursor: pointer; text-decoration: none; position: relative; overflow: hidden; isolation: isolate; transition: transform var(--dur-base) var(--ease-out), background-color var(--dur-base), border-color var(--dur-base), box-shadow var(--dur-base), color var(--dur-base); }
.imsl-btn--primary { background: var(--orange-fill); color: var(--on-orange); box-shadow: var(--shadow-glow-orange); }
@media (hover: hover) { .imsl-btn--primary:hover { background: var(--orange-hover); } }
.imsl-btn--secondary { background: var(--navy-fill); color: var(--on-navy); }
@media (hover: hover) { .imsl-btn--secondary:hover { background: var(--navy-hover); } }
.imsl-btn--outline { background: var(--glass-strong); color: var(--ink); border-color: var(--line); }
@media (hover: hover) { .imsl-btn--outline:hover { background: var(--surface); border-color: var(--ink); } }
.imsl-btn--ghost { background: transparent; color: var(--navy); }
@media (hover: hover) { .imsl-btn--ghost:hover { background: var(--navy-soft); } }
.imsl-btn--danger { background: var(--error); color: var(--on-error); }
.imsl-btn--reverse { background: var(--on-navy); color: var(--navy-fill); }
.imsl-btn--sm { min-height: var(--space-10); padding: 0 var(--space-4); font-size: 14px; }
/* Disabled: a flat grey-blue fill with a legible label (the --btn-disabled-* tokens, decision 47), not a faded copy of the variant, so a
   disabled primary no longer looks like a ghost of the orange one. Outline and ghost keep the page ground. */
.imsl-btn[disabled], .imsl-btn.is-disabled, .imsl-btn[aria-disabled="true"] { background: var(--btn-disabled-bg); border-color: var(--btn-disabled-bg); color: var(--btn-disabled-text); cursor: not-allowed; pointer-events: none; }
.imsl-btn--outline[disabled], .imsl-btn--outline.is-disabled, .imsl-btn--outline[aria-disabled="true"] { background: transparent; border-color: var(--btn-disabled-border); }
.imsl-btn--ghost[disabled], .imsl-btn--ghost.is-disabled, .imsl-btn--ghost[aria-disabled="true"] { background: transparent; border-color: transparent; }

/* Eyebrow + headings */
.imsl-eyebrow { font: 600 var(--text-xs)/1.3 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--orange-text); display: block; margin-bottom: var(--space-2); }
.imsl-eyebrow--muted { color: var(--text-muted); }
.imsl-h1, .imsl-h2, .imsl-h3, .imsl-display { font-family: var(--font-display); font-weight: 700; color: var(--navy); margin: 0; }
/* One display size, fluid (--display-lg); on a band it keeps on-navy (the band rules below). */
.imsl-display { font-size: var(--display-lg); line-height: 1.04; letter-spacing: -0.025em; color: var(--ink); }
.imsl-h1 { font-size: 32px; line-height: var(--lh-heading); letter-spacing: -0.015em; }
.imsl-h2 { font-size: 25px; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); }
.imsl-h3 { font-size: 20px; line-height: 1.4; color: var(--ink); }
.imsl-lead { font-size: 19px; line-height: 1.5; color: var(--text); margin: 0; }
.imsl-body { font-size: 17px; line-height: 1.5; color: var(--text); margin: 0; }
.imsl-small { font-size: 14px; line-height: 1.45; color: var(--text-muted); margin: 0; }
.imsl-caption { font-size: 13px; line-height: 1.4; color: var(--text-muted); margin: 0; }
.imsl-ui { font: 500 15px/1.45 var(--font-body); color: var(--text); margin: 0; }
.imsl-doc-small { font: 400 11px/1.4 var(--font-body); color: var(--text-muted); margin: 0; }
.imsl-link { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.imsl-link:hover { color: var(--orange-text); }

/* Surfaces */
.imsl-card { position: relative; isolation: isolate; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-card); padding: var(--space-6); box-shadow: var(--shadow-lift); transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base); }
/* A soft light follows the pointer over a card (motion.js writes --mx and --my). */
.imsl-card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity var(--dur-base); background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--sky-glow) 60%, transparent), transparent 60%); }
@media (hover: hover) {
  .imsl-card:hover::before { opacity: 1; }
  .imsl-card--hover:hover, a.imsl-card:hover { transform: translateY(calc(-1 * var(--space-1))); box-shadow: var(--shadow-hover); border-color: transparent; }
}
.imsl-band { background: var(--band); color: var(--on-navy); }
.imsl-band .imsl-h1, .imsl-band .imsl-h2, .imsl-band .imsl-h3, .imsl-band .imsl-display, .imsl-band .imsl-body, .imsl-band .imsl-lead, .imsl-band .imsl-small { color: var(--on-navy); }
.imsl-band .imsl-eyebrow { color: var(--on-navy); opacity: .85; }
.imsl-section { padding: clamp(var(--space-12), 7vw, var(--space-24)) var(--gutter); }
.imsl-section--alt { background: var(--bg-alt); }
.imsl-container { max-width: var(--container); margin: 0 auto; }
.imsl-accent-bar { width: 48px; height: var(--bar); background: var(--orange); border-radius: var(--radius-full); margin: var(--space-3) 0 var(--space-4); }

/* Badge / status */
.imsl-badge { display: inline-flex; align-items: center; gap: var(--space-1); padding: 3px var(--space-3); border-radius: var(--r-chip); font: 600 var(--text-xs)/1.3 var(--font-body); letter-spacing: .05em; text-transform: uppercase; }
.imsl-badge--navy { background: var(--navy-soft); color: var(--navy); }
.imsl-badge--orange { background: var(--orange-soft); color: var(--orange-text); }
.imsl-badge--success { background: var(--success-soft); color: var(--success-text); }
.imsl-badge--warn { background: var(--warn-soft); color: var(--warn-text); }
.imsl-badge--error { background: var(--error-soft); color: var(--error-text); }
.imsl-badge--neutral { background: var(--surface-2); color: var(--text); }
.imsl-badge--solid { background: var(--navy-fill); color: var(--on-navy); }
.imsl-dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: currentColor; display: inline-block; }

/* Forms */
.imsl-field { display: flex; flex-direction: column; gap: var(--space-1); }
.imsl-label { font: 600 14px/1.4 var(--font-body); color: var(--ink); }
.imsl-label .req { color: var(--orange-text); }
.imsl-input, .imsl-select, .imsl-textarea { width: 100%; height: var(--field-h); padding: 0 var(--space-4); border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface); color: var(--ink); font: 400 16px/1.5 var(--font-body); transition: border-color var(--dur-base), box-shadow var(--dur-base); }
@media (hover: hover) { .imsl-input:hover, .imsl-select:hover, .imsl-textarea:hover { border-color: var(--line-strong); } }
.imsl-textarea { height: auto; min-height: 120px; padding: var(--space-3) var(--space-4); resize: vertical; }
.imsl-input::placeholder, .imsl-textarea::placeholder { color: var(--text-muted); }
.imsl-input:focus-visible, .imsl-select:focus-visible, .imsl-textarea:focus-visible { border-color: var(--navy); outline: var(--focus-width) solid var(--focus); outline-offset: 0; box-shadow: var(--shadow-glow-navy); }
.imsl-input[aria-invalid="true"] { border-color: var(--error); }
.imsl-hint { font: 400 13px/1.4 var(--font-body); color: var(--text-muted); }
.imsl-error { font: 500 13px/1.4 var(--font-body); color: var(--error-text); display: flex; gap: var(--space-1); align-items: center; }
.imsl-check { display: flex; gap: var(--space-2); align-items: flex-start; font: 400 15px/1.45 var(--font-body); color: var(--text); }
.imsl-check input { width: var(--icon-md); height: var(--icon-md); margin: 1px 0 0; accent-color: var(--navy-fill); }

/* Table */
.imsl-table { width: 100%; border-collapse: collapse; font: 500 15px/1.45 var(--font-body); color: var(--text); }
.imsl-table th { text-align: left; font: 600 var(--text-xs)/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); background: var(--glass-strong); -webkit-backdrop-filter: var(--blur-sm); backdrop-filter: var(--blur-sm); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
.imsl-table:where(:not(.imsl-table--doc)) th:first-child { border-top-left-radius: var(--r-control); }
.imsl-table:where(:not(.imsl-table--doc)) th:last-child { border-top-right-radius: var(--r-control); }
.imsl-table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.imsl-table td.num, .imsl-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.imsl-table tbody tr { transition: background-color var(--dur-fast); }
@media (hover: hover) { .imsl-table tbody tr:hover > td { background: color-mix(in srgb, var(--navy-soft) 55%, transparent); } .imsl-table tbody tr:hover > td:first-child { box-shadow: inset var(--bar) 0 0 var(--orange); } }

/* Callout */
.imsl-callout { display: flex; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 400 15px/1.5 var(--font-body); }
.imsl-callout--info { background: var(--info-soft); color: var(--navy); border-color: transparent; }
.imsl-callout--highlight { background: var(--orange-soft); color: var(--orange-text); border-color: transparent; }
.imsl-callout--success { background: var(--success-soft); color: var(--success-text); border-color: transparent; }
.imsl-callout--warn { background: var(--warn-soft); color: var(--warn-text); border-color: transparent; }
.imsl-callout--error { background: var(--error-soft); color: var(--error-text); border-color: transparent; }
.imsl-callout strong { font-weight: 600; }

/* Accordion: each item is a rounded, lifted row; the summary is a 48px control. */
.imsl-acc { border: 1px solid var(--line-soft); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); overflow: hidden; }
.imsl-acc + .imsl-acc { margin-top: var(--space-3); }
.imsl-acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); min-height: var(--field-h); padding: var(--space-3) var(--space-5); font: 600 17px/1.4 var(--font-body); color: var(--ink); transition: background-color var(--dur-fast); }
@media (hover: hover) { .imsl-acc summary:hover { background: color-mix(in srgb, var(--navy-soft) 55%, transparent); } }
.imsl-acc summary:focus-visible { outline-offset: calc(var(--focus-width) * -1); }
.imsl-acc summary::-webkit-details-marker { display: none; }
.imsl-acc summary .imsl-icon { color: var(--navy); transition: transform var(--dur-base) var(--ease); }
.imsl-acc[open] summary .imsl-icon { transform: rotate(180deg); }
.imsl-acc[open] summary { box-shadow: inset 0 calc(-1 * var(--bar)) 0 var(--orange); }
.imsl-acc .body { padding: var(--space-4) var(--space-5) var(--space-5); font: 400 16px/1.55 var(--font-body); color: var(--text); }

/* Tabs: a pill track with a lifted pill for the selected tab (website .tabs). Same roles and keys: tablist, tab, aria-selected. */
.imsl-tabs { display: inline-flex; flex-wrap: wrap; gap: var(--space-1); width: fit-content; max-width: 100%; padding: var(--space-1); border: 1px solid var(--line-soft); border-radius: var(--radius-full); background: var(--surface-2); }
.imsl-tab { min-height: var(--space-10); padding: 0 var(--space-5); border: 0; border-radius: var(--radius-full); background: transparent; font: 600 15px/1 var(--font-body); color: var(--text); cursor: pointer; transition: background-color var(--dur-base), color var(--dur-base), box-shadow var(--dur-base); }
@media (hover: hover) { .imsl-tab:not([aria-selected="true"]):hover { color: var(--ink); background: color-mix(in srgb, var(--navy-soft) 70%, transparent); } }
.imsl-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lift); }
.imsl-tab:focus-visible { outline-offset: calc(var(--focus-width) * -1); }

/* App shell */
.imsl-topbar { height: var(--topbar-h); display: flex; align-items: center; gap: var(--space-4); padding: 0 var(--space-6); background: var(--surface); border-bottom: 1px solid var(--line); }
.imsl-rail { width: var(--rail-w); background: var(--bg-alt); border-right: 1px solid var(--line); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-1); }
.imsl-rail a { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--text); font: 500 15px/1.4 var(--font-body); text-decoration: none; }
.imsl-rail a[aria-current="page"] { background: var(--navy-soft); color: var(--navy); font-weight: 600; }
.imsl-rail a[aria-current="page"] .imsl-icon { font-variation-settings: 'wght' 300, 'FILL' 1, 'GRAD' 0, 'opsz' 24; }

/* Toast & dialog */
.imsl-toast { display: flex; align-items: flex-start; gap: var(--space-3); width: 360px; padding: var(--space-4); background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); border-left: var(--stroke-emphasis) solid var(--navy); border-radius: var(--r-card); box-shadow: var(--shadow-ui); font: 400 15px/1.45 var(--font-body); color: var(--text); animation: imsl-pop var(--dur-pop) var(--ease-spring) both; }
.imsl-toast--success { border-left-color: var(--success); } .imsl-toast--error { border-left-color: var(--error); } .imsl-toast--warn { border-left-color: var(--warn); }
.imsl-toast strong { display: block; font-weight: 600; color: var(--ink); }
.imsl-dialog { width: var(--dialog-md); max-width: 100%; background: var(--surface); border: 1px solid var(--glass-line); border-radius: var(--r-card); box-shadow: var(--shadow-ui); padding: var(--space-6); }
.imsl-dialog__actions { display: flex; justify-content: flex-end; gap: var(--space-3); margin-top: var(--space-6); }

/* Site header / footer */
/* Header: glass over the page, as the live site. Nav items are pills; the current one has the navy tint and a 3px orange bar. */
.imsl-header { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-bottom: 1px solid var(--glass-line); }
.imsl-nav { display: flex; gap: var(--space-1); }
.imsl-nav a { display: inline-flex; align-items: center; min-height: var(--space-10); padding: 0 var(--space-4); font: 600 16px/1 var(--font-body); color: var(--navy); text-decoration: none; border-radius: var(--radius-full); position: relative; white-space: nowrap; transition: background-color var(--dur-base), color var(--dur-base); }
@media (hover: hover) { .imsl-nav a:hover { background: var(--navy-soft); } }
.imsl-nav a[aria-current="page"] { color: var(--ink); background: var(--navy-soft); }
.imsl-nav a[aria-current="page"]::after { content: ""; position: absolute; left: var(--space-5); right: var(--space-5); bottom: var(--space-1); height: var(--bar); border-radius: var(--radius-full); background: var(--orange); }
/* Footer: a rounded navy band with the website gradient and dot grid (the live .ftr-box). */
.imsl-footer { position: relative; overflow: hidden; isolation: isolate; margin: var(--space-6) var(--gutter) var(--space-8); padding: clamp(var(--space-8), 5vw, var(--space-16)) clamp(var(--space-6), 5vw, var(--space-16)) var(--space-6); border-radius: var(--r-hero); background: var(--grad-band); color: var(--on-navy); box-shadow: var(--shadow-ui); }
.imsl-footer::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(var(--grid-dot) 1px, transparent 1.5px) 0 0 / var(--grid-size) var(--grid-size); -webkit-mask-image: radial-gradient(120% 90% at 85% 0%, var(--ink) 0%, transparent 70%); mask-image: radial-gradient(120% 90% at 85% 0%, var(--ink) 0%, transparent 70%); }
.imsl-footer h4 { font: 600 var(--text-xs)/1.3 var(--font-body); letter-spacing: .1em; text-transform: uppercase; margin: 0 0 var(--space-3); opacity: .8; }
.imsl-footer a { color: var(--on-navy); text-decoration: none; font: 400 15px/1.9 var(--font-body); }
.imsl-footer__list { list-style: none; margin: 0; padding: 0; }
.imsl-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.imsl-footer__bar { margin: var(--space-10) 0 0; padding: var(--space-5) 0 0; border-top: 1px solid var(--glass-on-band-line); font: 400 13px/1.4 var(--font-body); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); }

/* Course card & event row */
.imsl-course { display: flex; flex-direction: column; gap: var(--space-4); }
.imsl-course__meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font: 500 14px/1.4 var(--font-body); color: var(--text-muted); }
.imsl-course__meta span { display: inline-flex; align-items: center; gap: var(--space-1); }
.imsl-course__foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--line-soft); }
.imsl-price { font: 600 20px/1.2 var(--font-body); color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.imsl-price small { font: 400 13px/1.2 var(--font-body); color: var(--text-muted); margin-left: var(--space-1); }
.imsl-event { display: grid; grid-template-columns: 88px 1fr auto; gap: var(--space-6); padding: var(--space-5) var(--space-6); border: 1px solid var(--line-soft); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); align-items: start; transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.imsl-event + .imsl-event { margin-top: var(--space-3); }
@media (max-width: 639px) { .imsl-event { grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4); } .imsl-event > :nth-child(3) { grid-column: 1 / -1; } }
@media (hover: hover) { .imsl-event:hover { transform: translateY(calc(-1 * var(--space-1))); box-shadow: var(--shadow-hover); } }
.imsl-date { text-align: center; border: 1px solid var(--line); border-radius: var(--r-control); overflow: hidden; background: var(--surface); }
.imsl-date b { display: block; background: var(--navy-fill); color: var(--on-navy); font: 600 11px/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; padding: 3px 0; }
.imsl-date span { display: block; font: 700 26px/1.2 var(--font-display); color: var(--ink); padding: var(--space-2) 0 var(--space-1); }
.imsl-date i { display: block; font: 500 var(--text-xs)/1.2 var(--font-body); color: var(--text-muted); font-style: normal; padding-bottom: var(--space-2); }

/* Testimonial, stat, accreditation */
/* Quote: Literata italic with a 3px orange bar and the opening mark; the cite lines up under it. */
.imsl-quote { font: italic 400 22px/1.45 var(--font-display); color: var(--ink); margin: 0; padding-left: var(--space-5); border-left: var(--bar) solid var(--orange); }
.imsl-quote::before { content: "\201C"; color: var(--orange); font-size: 48px; line-height: 0; vertical-align: -18px; margin-right: var(--space-1); font-style: normal; }
.imsl-cite { display: block; margin-top: var(--space-4); font: 600 14px/1.4 var(--font-body); color: var(--navy); font-style: normal; }
.imsl-cite span { display: block; font-weight: 400; color: var(--text-muted); }
.imsl-quote ~ .imsl-cite { padding-left: calc(var(--space-5) + var(--bar)); }
/* Stat: one rule set for both markups. The website StatBand uses <b> and <span>; the app stats use __n and __l (counted up by motion.js). */
.imsl-stat { display: grid; gap: var(--space-2); }
.imsl-stat__n, .imsl-stat > b { display: block; font: 700 var(--display-sm)/1 var(--font-display); letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.imsl-stat > b { font-size: var(--display-md); }
.imsl-stat__l, .imsl-stat > span { font: 500 var(--text-sm)/1.3 var(--font-body); color: var(--text-muted); }
:is(.imsl-band, .imsl-shell__head) :is(.imsl-stat__n, .imsl-stat > b) { color: var(--on-navy); }
:is(.imsl-band, .imsl-shell__head) :is(.imsl-stat__l, .imsl-stat > span) { color: color-mix(in srgb, var(--on-navy) 92%, transparent); }
.imsl-accred { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.imsl-accred span { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--space-10); padding: 0 var(--space-4); border: 1px solid var(--line-soft); border-radius: var(--r-chip); font: 600 13px/1.3 var(--font-body); color: var(--navy); background: var(--surface); box-shadow: var(--shadow-lift); }

/* Breadcrumb, empty state */
.imsl-crumbs { display: flex; gap: var(--space-2); font: 500 14px/1.4 var(--font-body); color: var(--text-muted); }
.imsl-crumbs a { color: var(--navy); text-decoration: none; } .imsl-crumbs a:hover { text-decoration: underline; }
.imsl-empty { text-align: center; padding: var(--space-12) var(--space-6); border: 1px dashed var(--line); border-radius: var(--r-card); background: var(--glass-strong); color: var(--text-muted); }
/* The empty state's own icon only: not the icon inside its action button (VesselIntel's "Go to Search" grew a disc).
   v1's `.imsl-empty .imsl-icon` (32px, navy, a bottom margin) also reaches that button icon, so it is reset here. */
.imsl-empty .imsl-btn .imsl-icon { font-size: var(--icon-md); color: inherit; margin: 0; }
.imsl-empty .imsl-icon:not(.imsl-btn .imsl-icon) { display: inline-grid; place-items: center; width: var(--space-16); height: var(--space-16); border-radius: 50%; background: var(--navy-soft); position: relative; margin-bottom: var(--space-4); }
/* The bottom margin clears the orbit ring (space-2 outside the disc) from an eyebrow or heading that follows. */
.imsl-empty .imsl-icon:not(.imsl-btn .imsl-icon)::after { content: ""; position: absolute; inset: calc(-1 * var(--space-2)); border-radius: 50%; border: 1px dashed var(--line-strong); animation: imsl-orbit 14s linear infinite; }
@keyframes imsl-orbit { to { rotate: 360deg; } }
.imsl-empty h3 { font: 700 20px/1.4 var(--font-display); color: var(--ink); margin: 0 0 var(--space-1); }


/* Slide */
.imsl-slide { width: var(--slide-w); height: var(--slide-h); padding: var(--slide-pad); background: var(--bg); color: var(--text); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.imsl-slide--band { background: var(--band); color: var(--on-navy); }
.imsl-slide--deep { background: var(--band-deep); color: var(--on-navy); }
.imsl-slide--band .imsl-h1, .imsl-slide--band .imsl-display, .imsl-slide--band .imsl-lead, .imsl-slide--deep .imsl-h1, .imsl-slide--deep .imsl-display, .imsl-slide--deep .imsl-lead { color: var(--on-navy); }
.imsl-slide--band .imsl-eyebrow, .imsl-slide--deep .imsl-eyebrow { color: var(--on-navy); opacity: .85; }
.imsl-slide__num { position: absolute; right: var(--slide-pad); bottom: var(--space-8); font: 500 13px/1 var(--font-body); color: var(--text-muted); }
.imsl-slide--band .imsl-slide__num, .imsl-slide--deep .imsl-slide__num { color: var(--on-navy); opacity: .7; }
.imsl-slide .imsl-display { font-size: 56px; }
.imsl-slide .imsl-lead { font-size: 24px; }


/* ---- CompanyFinder proposals (decision 37, branch companyfinder-assets): AppTag, Strip, Plate, Mark, Console ---- */
/* AppTag: the product name beside the lock-up; the lock-up stays the mark (I10). */
.imsl-apptag { display: inline-flex; align-items: center; gap: var(--space-3); min-height: var(--control-h-sm); }
.imsl-apptag__rule { width: 1px; align-self: stretch; background: var(--line-strong); }
.imsl-apptag__name { display: inline-flex; align-items: center; gap: var(--space-2); font: 600 16px/1.2 var(--font-body); color: var(--ink); white-space: nowrap; }
.imsl-apptag__name .imsl-icon { color: var(--navy); }
/* SecureBuildTag: chip after the AppTag; secure-build tokens (red), no orange. Not dismissible. */
.imsl-sbtag { display: inline-flex; align-items: center; gap: var(--space-1); padding: 0 var(--space-3); min-height: var(--space-6); border: 1px solid var(--secure-build); border-radius: var(--radius-full); background: var(--secure-build-soft); color: var(--secure-build-on); font: 600 13px/1 var(--font-body); white-space: nowrap; }
.imsl-sbtag .imsl-icon { color: var(--secure-build); font-size: var(--text-sm); }
.imsl-split { display: flex; flex: 1; min-height: 0; align-items: flex-start; }
.imsl-split > main { flex: 1; min-width: 0; }
.imsl-howitworks { flex: none; width: calc(var(--rail-w) + var(--space-10) + var(--space-10)); position: sticky; top: var(--topbar-h); max-height: calc(100dvh - var(--topbar-h)); overflow-y: auto; box-sizing: border-box; padding: var(--space-6); background: var(--bg-alt); border-left: 1px solid var(--line); color: var(--text); }
.imsl-howitworks h2 { font: 700 var(--title-xs)/1.25 var(--font-display); color: var(--ink); margin: 0 0 var(--space-4); }
.imsl-howitworks dl { margin: 0; }
.imsl-howitworks dt { font: 600 var(--text-xs)/1.3 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-top: var(--space-4); }
.imsl-howitworks dd { margin: var(--space-1) 0 0; font: 400 var(--text-sm)/1.5 var(--font-body); color: var(--text); overflow-wrap: anywhere; }
.imsl-howitworks code { font-family: var(--font-mono); font-size: var(--text-xs); }
@media (max-width: 900px) { .imsl-split { flex-direction: column; align-items: stretch; } .imsl-howitworks { width: auto; position: static; max-height: none; border-left: 0; border-top: 1px solid var(--line); } }
/* Strip: a handling caveat across the top of every screen. Constant colours: band + on-navy, with the word in the text. */
.imsl-strip { display: flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--space-6); padding: 0 var(--space-4); background: var(--band); color: var(--on-navy); border-bottom: 1px solid var(--line); font: 600 13px/1.3 var(--font-body); overflow: hidden; }
.imsl-strip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Plate: a constant light ground for third-party artwork (registry logo, flag, favicon). */
.imsl-plate { display: inline-flex; align-items: center; justify-content: center; background: var(--logo-plate); border: 1px solid var(--line-strong); border-radius: var(--r-control); padding: var(--space-1); overflow: hidden; flex: none; }
.imsl-plate img, .imsl-plate svg { display: block; max-width: 100%; max-height: 100%; }
.imsl-plate--logo { height: var(--control-h-sm); padding: var(--space-1) var(--space-2); }
.imsl-plate--logo img { height: 100%; width: auto; }
.imsl-plate--flag { width: 32px; height: 24px; padding: 0; }
.imsl-plate--flag img, .imsl-plate--flag svg { width: 100%; height: 100%; object-fit: cover; }
/* Mark: a verification, confidence or agreement state. Always icon + word; tone from the state colours. */
.imsl-mark { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px var(--space-3) 2px var(--space-2); border-radius: var(--r-chip); background: color-mix(in srgb, currentColor 10%, transparent); font: 600 13px/1.3 var(--font-body); color: var(--text); }
.imsl-mark .imsl-icon { font-size: 16px; }
.imsl-mark--success { color: var(--success-text); }
.imsl-mark--warn { color: var(--warn-text); }
.imsl-mark--error { color: var(--error-text); }
.imsl-mark--neutral { color: var(--text-muted); }
.imsl-mark__pips { display: inline-flex; gap: 2px; }
.imsl-mark__pips i { width: 8px; height: 8px; border-radius: var(--radius-full); border: 1px solid currentColor; }
.imsl-mark__pips i.is-on { background: currentColor; }
/* Console: a trace of what the agents did, a dark live log as on the website hero (typeConsole() in motion.js types new lines in). Every line names its level. */
.imsl-console { background: var(--band-deep); border: 1px solid transparent; border-radius: var(--r-card); padding: var(--space-4) var(--space-5); font: 400 var(--text-sm)/1.6 var(--font-mono); color: color-mix(in srgb, var(--on-navy) 88%, transparent); box-shadow: var(--shadow-ui); max-height: 320px; overflow: auto; }
.imsl-console__bar { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-3); font: 600 var(--text-xs)/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--on-navy) 70%, transparent); }
.imsl-console .imsl-live { color: var(--on-navy); }
.imsl-console__line { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: var(--space-3); align-items: baseline; }
.imsl-console__time { color: color-mix(in srgb, var(--on-navy) 55%, transparent); font-variant-numeric: tabular-nums; }
.imsl-console__level { font-weight: 600; }
.imsl-console__level--info { color: color-mix(in srgb, var(--on-navy) 72%, var(--navy)); }
.imsl-console__level--ok { color: color-mix(in srgb, var(--success) 45%, var(--on-navy)); }
.imsl-console__level--warn { color: var(--warn); }
.imsl-console__level--error { color: color-mix(in srgb, var(--error) 45%, var(--on-navy)); }
.imsl-console__line:last-child .imsl-console__msg::after { content: ""; display: inline-block; width: .55em; height: 1.1em; margin-left: 2px; vertical-align: -0.2em; background: var(--orange); animation: imsl-caret 1s steps(1) infinite; }
@keyframes imsl-caret { 50% { opacity: 0; } }

/* ================================================================================================
   Runtime layer: the classes design/runtime/*.js emit (datatable, ui, shell, guide, theme).
   Hand-edited here, never generated. Tokens only; px only for layout sizes no token names.
   Documented class by class in design/runtime/README.md.
   ================================================================================================ */

/* The hidden attribute always wins over a component's own display (a button, a flex row). */
[hidden] { display: none !important; }

/* Icon-only button: square, the icon carries no text, the name is on aria-label. */
.imsl-btn--icon { padding-inline: 0; min-width: var(--field-h); }
.imsl-btn--icon.imsl-btn--sm { min-width: var(--space-10); }

/* ---- Shell (shell.js): topbar over rail + main, one screen, never a scrolling page (decision 41) ---- */
.imsl-shell--stack { display: flex; flex-direction: column; background: var(--bg); color: var(--text); }
.imsl-shell--stack > .imsl-topbar { flex: none; }
.imsl-shell__body { flex: 1; display: flex; min-height: 0; }
.imsl-shell__body > .imsl-rail { flex: none; overflow-x: hidden; overflow-y: auto; transition: width var(--dur-base) var(--ease); }
.imsl-shell__main { flex: 1; min-width: 0; min-height: 0; overflow: auto; padding: var(--space-8); }
/* Full width in every app, skinned or not (decisions 73 and 78): no --container cap on the content column. */
.imsl-shell__content { max-width: none; display: flex; flex-direction: column; gap: var(--space-6); }
.imsl-shell__content > * { min-width: 0; }
.imsl-shell__head { display: flex; flex-direction: column; gap: var(--space-2); }
.imsl-shell__head .imsl-eyebrow { margin-bottom: 0; }
.imsl-shell__head h1 { align-self: flex-start; max-width: 100%; }
/* The h1 takes programmatic focus after a route change (tabindex="-1", so Tab can never reach it) for screen readers. It is
   not a control, so it draws no ring, for pointer or keyboard; no keyboard ring is lost because nothing can Tab to it. */
.imsl-shell__head h1:focus, .imsl-shell__head h1:focus-visible { outline: none; }
.imsl-shell__view { min-width: 0; }
.imsl-skip { position: absolute; left: var(--space-4); top: calc(-1 * var(--topbar-h)); z-index: var(--z-toast); padding: var(--space-2) var(--space-3); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.imsl-skip:focus { top: var(--space-2); }

.imsl-topbar__brand, .imsl-topbar__brand:visited, .imsl-topbar__brand:hover { flex: none; color: var(--ink); text-decoration: none; }
.imsl-topbar__brand:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; border-radius: var(--radius-xs); }
.imsl-topbar__brand img { width: 120px; height: auto; }
.imsl-topbar__spacer { flex: 1; }
.imsl-topbar__viewer { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }

.imsl-rail__label { margin: var(--space-4) var(--space-3) var(--space-1); }
.imsl-rail__label:first-child { margin-top: var(--space-2); }
.imsl-rail__text { min-width: 0; }
.imsl-rail a .imsl-rail__badge { margin-left: auto; }
/* The rail count badge is a soft badge again (decision 48, the parity reference): a warn count is a warm tinted ground (--warn-soft) with
   --warn-text, held to 4.5:1 in both themes by npm run contrast; a neutral count is quiet, plain muted text with no ground. */
.imsl-rail__badge.imsl-badge--warn { background: var(--warn-soft); color: var(--warn-text); }
.imsl-rail__badge.imsl-badge--neutral { background: transparent; color: var(--text-muted); padding-inline: var(--space-1); }
/* The Guide group is pinned last, above the foot, whatever the item count. */
.imsl-rail__guide { margin-top: auto; display: flex; flex-direction: column; gap: var(--space-1); }
.imsl-rail__guide .imsl-rail__label:first-child { margin-top: var(--space-4); }
.imsl-rail__foot { margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.imsl-rail__guide + .imsl-rail__foot { margin-top: var(--space-1); }
.imsl-rail[data-collapsed] { width: var(--topbar-h); padding-inline: var(--space-2); }
.imsl-rail[data-collapsed] .imsl-rail__label, .imsl-rail[data-collapsed] .imsl-rail__badge { display: none; }
.imsl-rail[data-collapsed] a { justify-content: center; padding-inline: 0; }
.imsl-rail[data-collapsed] .imsl-rail__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.imsl-rail[data-collapsed] .imsl-rail__foot { justify-content: center; }

@media (max-width: 1023px) {
  .imsl-shell__body { flex-direction: column; }
  /* The rail becomes a scrolling strip under the topbar; the Guide item stays last in it. */
  .imsl-shell__body > .imsl-rail, .imsl-shell__body > .imsl-rail[data-collapsed] { width: auto; flex-direction: row; align-items: center; gap: var(--space-1); overflow-x: auto; overflow-y: hidden; padding: var(--space-2) var(--space-4); border-right: 0; border-bottom: 1px solid var(--line); }
  .imsl-rail a, .imsl-rail[data-collapsed] a { flex: none; justify-content: flex-start; padding-inline: var(--space-3); white-space: nowrap; }
  .imsl-rail[data-collapsed] .imsl-rail__text { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .imsl-rail[data-collapsed] .imsl-rail__badge { display: inline-flex; }
  /* When the labels do not fit, shell.js sets data-icons: icons only, the names stay for assistive tech (and as titles). */
  .imsl-rail[data-icons] .imsl-rail__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .imsl-rail[data-icons] a { padding-inline: var(--space-3); }
  .imsl-rail__label, .imsl-rail__foot { display: none; }
  /* Guide stays in view at the strip's right edge, icon only (its name is still read out). */
  /* A sticky item is held inside the scroller's padding, so with right: 0 the strip showed a 16px sliver of scrolled items to the right of the Guide.
     The Guide takes that padding over (negative right margin and offset, the same padding inside), so it is flush with the strip's edge at every scroll position. */
  .imsl-rail__guide { margin: 0 calc(var(--space-4) * -1) 0 auto; flex: none; flex-direction: row; position: sticky; right: calc(var(--space-4) * -1); z-index: var(--z-sticky); padding-left: var(--space-2); padding-right: var(--space-4); background: var(--bg-alt); border-left: 1px solid var(--line); }
  /* The strip scrolls behind the Guide divider. A scrolled-to item stops short of it (shell.js / AppShell measure the Guide's width into --imsl-rail-guide-w). */
  .imsl-shell__body > .imsl-rail { scroll-padding-inline: var(--space-4) calc(var(--imsl-rail-guide-w, 64px) + var(--space-2)); }
  .imsl-rail__guide .imsl-rail__text, .imsl-rail[data-collapsed] .imsl-rail__guide .imsl-rail__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .imsl-shell__main { padding: var(--space-4); }
}
@media (max-width: 639px) {
  .imsl-topbar { padding: 0 var(--space-4); gap: var(--space-2); }
  .imsl-topbar__viewer { display: none; }
  .imsl-topbar__brand img { width: 96px; }
  /* The topbar's controls always stay on screen (decision 67): the brand gives way first. The app glyph drops and a long app name ends in an ellipsis; the lock-up keeps its size. */
  .imsl-topbar > .imsl-topbar__brand { flex: 0 1 auto; min-width: 0; margin-inline-end: auto; gap: var(--space-2); }
  .imsl-topbar__spacer { display: none; }
  .imsl-topbar__brand img, .imsl-topbar__brand .imsl-apptag__rule { flex: none; }
  .imsl-topbar__brand .imsl-apptag__name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .imsl-topbar__brand .imsl-apptag__name .imsl-icon { display: none; }
}

/* ---- Toasts (ui.js toast): a manual popover host in the top layer, three toasts at most ---- */
/* Bottom right of the main column (decision 47): never over the page head or the rail. The host measures `main` and any drawer or
   sheet and writes --imsl-toast-end and --imsl-toast-bottom on itself, so an open in-flow side panel moves the toasts left of it. An app
   that draws its own overlay can set --imsl-toast-extra-end or --imsl-toast-extra-bottom on :root. */
.imsl-toasts { position: fixed; inset: auto calc(var(--imsl-toast-end, 0px) + var(--imsl-toast-extra-end, 0px) + var(--space-4)) calc(var(--imsl-toast-bottom, 0px) + var(--imsl-toast-extra-bottom, 0px) + var(--space-4)) auto; z-index: var(--z-toast); margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; width: auto; height: auto; display: flex; flex-direction: column; gap: var(--space-2); pointer-events: none; }
.imsl-toasts > * { pointer-events: auto; }
.imsl-toasts[popover]:not(:popover-open) { display: none; }
.imsl-toast { max-width: calc(100vw - var(--space-8)); }
/* A phone: full width less the gutters, sitting above any bottom bar (main ends where the bar starts). */
@media (max-width: 639px) { .imsl-toasts { left: var(--space-4); } .imsl-toast { width: 100%; max-width: none; } }
.imsl-toast > .imsl-icon { flex: none; color: var(--navy); }
.imsl-toast--success > .imsl-icon { color: var(--success-text); }
.imsl-toast--warn > .imsl-icon { color: var(--warn-text); }
.imsl-toast--error > .imsl-icon { color: var(--error-text); }
.imsl-toast__body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.imsl-toast__action { display: inline-block; margin-top: var(--space-1); padding: 0; border: 0; background: none; font: 600 var(--text-sm)/1.4 var(--font-body); cursor: pointer; }
.imsl-toast__close { flex: none; margin: calc(-1 * var(--space-2)) calc(-1 * var(--space-2)) 0 0; }

/* ---- Dialog (ui.js openDialog): the native <dialog> on .imsl-dialog ---- */
dialog.imsl-dialog { margin: auto; max-width: calc(100vw - var(--space-8)); max-height: calc(100vh - var(--space-16)); max-height: calc(100dvh - var(--space-16)); overflow: auto; color: var(--text); }
dialog.imsl-dialog::backdrop { background: var(--scrim); }
dialog.imsl-dialog > .imsl-h3 { margin-bottom: var(--space-4); }
.imsl-dialog--wide, .imsl-dialog--lg { width: var(--dialog-lg); }
.imsl-dialog--sm { width: var(--dialog-sm); }
@media (max-width: 639px) { .imsl-dialog--wide, .imsl-dialog--lg { width: 100%; } }
/* `closeButton`: the title and an icon button share one head row. The title keeps its own spacing; the row carries the gap below. */
.imsl-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.imsl-dialog__titles { flex: 1; min-width: 0; }
.imsl-dialog__close { flex: none; margin: calc(-1 * var(--space-2)) calc(-1 * var(--space-2)) 0 0; }

/* ---- Callout, empty and loading states (ui.js callout, errorCallout, emptyState, loadingState) ---- */
.imsl-callout > .imsl-icon { flex: none; }
.imsl-callout__body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.imsl-callout__text { margin: 0; }
.imsl-callout__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.imsl-empty__text { margin-bottom: var(--space-4); }
.imsl-loading { display: flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-8) var(--space-4); color: var(--text-muted); font: 500 var(--text-md)/1.4 var(--font-body); }
.imsl-loading__icon { color: var(--navy); animation: imsl-spin calc(var(--dur-slow) * 1.5) linear infinite; }
@keyframes imsl-spin { to { transform: rotate(360deg); } }

/* ---- Translated (decision 67): a value under the translation lens. "Both" puts the English under a navy rule; inline puts it in brackets ---- */
.imsl-translated__en { display: block; margin-top: var(--space-1); padding-left: var(--space-2); border-left: var(--bar) solid var(--orange); color: var(--navy); font-size: var(--text-sm); }
/* The space before the bracket is real text, so a long pair can wrap between the original and its English. */
.imsl-translated--inline .imsl-translated__en { display: inline; margin: 0; padding: 0; border: 0; font-size: inherit; }
.imsl-translated--inline .imsl-translated__en::before { content: " ("; }
.imsl-translated--inline .imsl-translated__en::after { content: ")"; }

/* ---- DataTable (datatable.js): one compact toolbar row, popovers, chips, sortable headers, group rows. On top of .imsl-table ---- */
.dt { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; container: dt / inline-size; }
.dt .imsl-input, .dt .imsl-select { height: var(--space-10); font-size: var(--text-sm); }

/* Toolbar: search, Group, Filter, your actions, the count at the right. One row; on a phone the search takes line 1. */
.dt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
/* In a flush panel the table runs edge to edge, but its toolbar keeps the panel's own inset. */
.imsl-panel--flush .dt-toolbar { padding: var(--space-3) var(--space-4) 0; }
.dt-search { position: relative; flex: 0 1 320px; min-width: 0; }
.dt-search > .imsl-icon { position: absolute; left: var(--space-4); top: 50%; transform: translateY(-50%); color: var(--navy); pointer-events: none; }
.dt-search > .imsl-input { padding-left: calc(var(--space-4) + var(--icon-lg) + var(--space-2)); border-radius: var(--radius-full); }
.dt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); order: 2; }
.dt-count { margin: 0 0 0 auto; order: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Group: a pill of two buttons. With a group active it reads "Group: Course" and the x inside clears it. */
.dt-groupbtn { display: inline-flex; align-items: stretch; height: var(--space-10); border: 1px solid var(--line); border-radius: var(--radius-full); background: transparent; color: var(--navy); transition: background-color var(--dur-fast) var(--ease); }
.dt-groupbtn.is-active { background: var(--navy-soft); }
@media (hover: hover) { .dt-groupbtn:hover { background: var(--navy-soft); } }
.dt-groupbtn-main, .dt-groupbtn-clear { display: inline-flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-4); border: 0; border-radius: var(--radius-full); background: none; color: inherit; font: 600 var(--text-sm)/1 var(--font-body); white-space: nowrap; cursor: pointer; }
.dt-groupbtn.is-active .dt-groupbtn-main { padding-right: var(--space-2); }
.dt-groupbtn-clear { padding: 0 var(--space-3) 0 var(--space-1); }
.dt-groupbtn-clear:hover { color: var(--ink); }
.dt-filterbtn[aria-expanded="true"], .dt-colsbtn[aria-expanded="true"] { background: var(--navy-soft); }
.dt-filterbtn-count { padding: 0 var(--space-2); letter-spacing: 0; font-variant-numeric: tabular-nums; }

/* Popovers (the Group menu and the Filter panel): top layer, placed under their button and kept on screen by the runtime. */
.dt-popover { position: fixed; inset: auto; margin: 0; padding: 0; border: 1px solid var(--glass-line); border-radius: var(--r-card); background: var(--surface); color: var(--text); box-shadow: var(--shadow-ui); overflow: auto; max-width: calc(100vw - var(--space-4)); }
/* The runtime moves focus to the popover itself so Tab starts inside it; the container is not a control, so it draws no ring. */
.dt-popover:focus, .dt-popover:focus-visible { outline: none; }
.dt-popover--menu { min-width: 200px; padding: var(--space-1); max-height: calc(100dvh - var(--space-4)); }
.dt-popover--menu:popover-open { display: flex; flex-direction: column; }
/* Never taller than the viewport: the runtime sets max-height from the room on the open side; this is the fallback. The head and the Clear filters foot stay put and the body scrolls. */
.dt-popover--filters { width: min(560px, calc(100vw - var(--space-4))); max-height: calc(100dvh - var(--space-4)); overflow: hidden; }
.dt-popover--filters:popover-open { display: flex; flex-direction: column; }
.dt-popover-head { flex: none; position: sticky; top: 0; z-index: var(--z-sticky); display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-1) var(--space-1) var(--space-1) var(--space-4); border-bottom: 1px solid var(--line-soft); background: var(--surface); }
.dt-popover-title { margin: 0; font: 600 var(--text-md)/1.3 var(--font-body); color: var(--ink); }
.dt-popover-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: var(--space-3); padding: var(--space-4); }
.dt-popover-foot { flex: none; position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding: var(--space-2) var(--space-4); border-top: 1px solid var(--line-soft); background: var(--surface); }
/* The kit Menu (decision 48): .imsl-menu is the panel, .imsl-menu__item a menuitem / menuitemradio / menuitemcheckbox. DataTable's Group menu and
   Columns picker are built from it (they keep the older dt-popover classes as hooks and add none of their own). */
.imsl-menu { min-width: 200px; padding: var(--space-1); border: 1px solid var(--glass-line); border-radius: var(--r-card); background: var(--surface); color: var(--text); box-shadow: var(--shadow-ui); }
.imsl-menu--inline, .imsl-menu:popover-open, .imsl-menu.imsl-floating:not([popover]) { display: flex; flex-direction: column; }
.imsl-menu--inline { box-shadow: none; }
.imsl-menu.imsl-floating { position: fixed; inset: auto; margin: 0; overflow: auto; overscroll-behavior: contain; max-width: calc(100vw - var(--space-4)); max-height: calc(100dvh - var(--space-4)); }
.imsl-menu.imsl-floating:focus, .imsl-menu.imsl-floating:focus-visible { outline: none; }
.imsl-menu__hint { padding: var(--space-2) var(--space-3) var(--space-1); color: var(--text-muted); font: 500 var(--text-xs)/1.3 var(--font-body); }
.imsl-menu__sep { height: 1px; margin: var(--space-1) 0; background: var(--line-soft); }
.imsl-menu__item { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: var(--control-h-sm); padding: 0 var(--space-3); border: 0; border-radius: var(--r-control); background: none; color: var(--ink); font: 500 var(--text-sm)/1.2 var(--font-body); text-align: left; cursor: pointer; }
.imsl-menu__item > .imsl-icon { flex: none; color: var(--navy); }
.imsl-menu__text { flex: 1 1 auto; min-width: 0; }
@media (hover: hover) { .imsl-menu__item:hover { background: var(--navy-soft); } }
.imsl-menu__item:focus-visible { background: var(--navy-soft); outline: var(--focus-width) solid var(--focus); outline-offset: calc(var(--focus-width) * -1); }
.imsl-menu__item:active { background: var(--navy-soft); box-shadow: inset 0 0 0 1px var(--navy); }
.imsl-menu__item[aria-disabled="true"] { color: var(--btn-disabled-text); cursor: not-allowed; background: none; box-shadow: none; }
.imsl-menu__item[role="menuitemradio"][aria-checked="true"] { color: var(--navy); font-weight: 600; }
/* The mark: a tick for the chosen radio item; for a checkbox item an empty box (off) or a ticked navy box (on), so the state is never colour alone. */
.imsl-menu__mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--space-5); height: var(--space-5); box-sizing: border-box; }
.imsl-menu__mark > .imsl-icon { visibility: hidden; color: var(--navy); }
.imsl-menu__item[aria-checked="true"] .imsl-menu__mark > .imsl-icon { visibility: visible; }
.imsl-menu__mark--checkbox { border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface); }
.imsl-menu__item[aria-checked="true"] .imsl-menu__mark--checkbox { border-color: var(--navy-fill); background: var(--navy-fill); }
.imsl-menu__item[aria-checked="true"] .imsl-menu__mark--checkbox > .imsl-icon { color: var(--on-navy); }
.dt__f { min-width: 0; }
.dt__range { display: flex; align-items: center; gap: var(--space-2); }
.dt__range .imsl-input { min-width: 0; flex: 1 1 0; }
/* A date input needs more room than a number: From and To stack, each with its word, so "dd/mm/yyyy" is never clipped. */
.dt__range--date { flex-direction: column; align-items: stretch; }
.dt__rangeitem { display: flex; align-items: center; gap: var(--space-2); }
.dt__rangeitem > .muted { flex: none; min-width: var(--space-10); font-size: var(--text-sm); }
.dt__rangeitem .imsl-input { flex: 1 1 0; min-width: 0; }
.dt__chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.dt__chip { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control-h-sm); padding: 0 var(--space-3); border: 1px solid var(--line); border-radius: var(--r-chip); background: transparent; color: var(--navy); font: 600 var(--text-sm)/1 var(--font-body); white-space: nowrap; cursor: pointer; transition: background-color var(--dur-fast) var(--ease); }
@media (hover: hover) { .dt__chip:hover { background: var(--navy-soft); } }
.dt__chip[aria-pressed="true"] { background: var(--navy-fill); border-color: var(--navy-fill); color: var(--on-navy); }
@media (hover: hover) { .dt__chip[aria-pressed="true"]:hover { background: var(--navy-hover); } }
.dt .table-wrap { overflow: auto; border: 1px solid var(--line-soft); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.dt .muted { color: var(--text-muted); }
/* A blank cell: a muted word for the eye and a visually hidden "No value" for assistive tech (the system has no dash convention; "Not set" is the word the filters and group rows already use). */
.imsl-blank { color: var(--text-muted); }
.dt .chip__n { font-weight: 500; font-variant-numeric: tabular-nums; }
/* Dense rows: the system has no dense-table token, so the two smallest row steps of the space scale. */
.dt .imsl-table th, .dt .imsl-table td { padding: var(--space-2) var(--space-3); }
.dt .imsl-badge { white-space: nowrap; }
/* Headers never wrap mid-phrase; ids, dates and figures never wrap and use tabular figures; each type has a floor width
   so columns do not jump as rows are filtered. A long header may opt in to wrapping at spaces with className 'dt-wraphead'. */
.dt__table th { vertical-align: middle; white-space: nowrap; }
.dt__table th.dt-wraphead, .dt__table th.dt-wraphead .dt__sort { white-space: normal; }
.dt-nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dt-type-number { min-width: 112px; }
.dt-type-date { min-width: 152px; }
/* The press target is the toolbar floor (control-h-sm, 36px). The negative block margin hands the extra height back to the cell's padding, so the header row is no taller (1.3 is the head's line height). */
.dt__sort { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--control-h-sm); margin-block: calc((var(--text-xs) * 1.3 - var(--control-h-sm)) / 2); padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; white-space: nowrap; cursor: pointer; border-radius: var(--radius-xs); }
.dt__sort:hover { color: var(--navy); }
.dt__sort:focus-visible, .dt-group-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dt__arrow { display: inline-flex; align-items: center; color: var(--text-muted); }
th[aria-sort] .dt__arrow { color: var(--navy); }
.dt__rank { font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
/* Numeric headers: right-aligned (th.num), the sort icon after the label. */
th.num .dt__sort { justify-content: flex-end; }
/* Group rows: the value is the label, the column is a muted eyebrow, the count a small neutral badge. */
.dt-group-row th { padding: var(--space-1) var(--space-3); background: var(--bg-alt); border-bottom: 1px solid var(--line); text-transform: none; letter-spacing: normal; }
.dt-group-toggle { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control-h-sm); padding: 0; border: 0; background: none; color: var(--ink); font: 600 var(--text-sm)/1.2 var(--font-body); cursor: pointer; }
.dt-group-toggle .dt-group-col { display: inline; margin: 0; }
.dt-group-name { color: var(--ink); }
/* The neutral badge sits on a group row that is already surface-2, so it takes the surface ground and a hairline to stay visible. */
.dt-group-count { background: var(--surface); border: 1px solid var(--line); font-variant-numeric: tabular-nums; letter-spacing: 0; }
/* The empty row's td spans every column, so on a table wider than its scroll wrapper the message would centre across the full scroll width and clip. The wrapper is a size container; the inner block is as wide as the visible area and sticks to its left edge. */
.dt .table-wrap { container-type: inline-size; }
.dt .dt__empty td { padding: 0; text-align: center; }
.dt__empty-inner { position: sticky; left: 0; box-sizing: border-box; width: 100cqw; padding: var(--space-6); }
.dt__empty-text { margin: 0 0 var(--space-3); }
.dt__cellstack { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
/* Enum cells wrap at word boundaries (a long value in a badge too), unless the column says nowrap. */
.dt td.dt-type-enum:not(.dt-nowrap), .dt td.dt-type-enum:not(.dt-nowrap) .imsl-badge { white-space: normal; overflow-wrap: break-word; word-break: normal; }
.dt td.dt-type-enum:not(.dt-nowrap) .imsl-badge { max-width: 100%; text-align: left; }
/* The toolbar answers to the table's own width, not the viewport (container query on .dt, decision 48): a table in a 575px column beside a
   side panel is as narrow as a phone. Under 640px the search shrinks (no fixed 320px basis) and Group, Filter and Columns become icon pills,
   their names kept as aria-label; the count stays. Two rows at most. */
@container dt (max-width: 639px) {
  .dt-search { flex: 1 1 140px; min-width: 120px; max-width: 320px; }
  .dt-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .dt-groupbtn-main { padding-inline: var(--space-3); }
  .dt-groupbtn.is-active .dt-groupbtn-main { padding-right: var(--space-1); }
  .dt-filterbtn, .dt-colsbtn { min-width: var(--control-h-sm); justify-content: center; padding-inline: var(--space-3); }
  .dt-filterbtn-count { position: static; }
}

/* Stacked mode (stack="phone", root class dt--stack): under 640px of the table's own width each row is a labelled card. The head row stays, as a wrapped strip of sort buttons, so sorting still works; no sideways scroll. Cells take their label from data-label. */
@container dt (max-width: 639px) {
  .dt--stack .table-wrap { overflow: visible; border: 0; background: none; }
  .dt--stack .dt__table, .dt--stack .dt__table :is(thead, tbody, tr, th, td) { display: block; }
  .dt--stack .dt__table thead tr { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); padding: var(--space-1) var(--space-3); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-2); }
  .dt--stack .dt__table thead th { padding: 0; border: 0; background: none; }
  .dt--stack .dt__table tbody tr:not(.dt-group-row):not(.dt__empty) { margin-top: var(--space-3); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
  .dt--stack .dt__table tbody tr.is-selected { box-shadow: inset 2px 0 0 var(--navy); }
  .dt--stack .dt__table tbody td { display: grid; grid-template-columns: minmax(var(--space-24), 36%) minmax(0, 1fr); gap: var(--space-3); align-items: baseline; padding: var(--space-2) var(--space-3); border: 0; border-top: 1px solid var(--line-soft); text-align: left; white-space: normal; min-width: 0; }
  .dt--stack .dt__table tbody td:first-child { border-top: 0; }
  .dt--stack .dt__table tbody td[data-label]::before { content: attr(data-label); color: var(--text-muted); font: 600 var(--text-xs)/1.3 var(--font-body); letter-spacing: .06em; text-transform: uppercase; }
  .dt--stack .dt__table tbody td.dt-nowrap { white-space: normal; }
  .dt--stack .dt__table tbody .dt-group-row { margin-top: var(--space-3); }
  .dt--stack .dt__table tbody .dt-group-row th { border: 1px solid var(--line); border-radius: var(--r-card); }
  .dt--stack .dt__table tbody .dt__empty td { display: block; border: 1px solid var(--line); border-radius: var(--r-card); }
  .dt--stack .dt__table th.dt-type-number, .dt--stack .dt__table td.dt-type-number, .dt--stack .dt__table td.dt-type-date { min-width: 0; }
}

/* ---- Guide page (guide.js renderGuide): the pack, the step strip, numbered panels ---- */
.guide { display: flex; flex-direction: column; gap: var(--space-6); padding-bottom: var(--space-12); }
.guide__head { display: flex; flex-direction: column; gap: var(--space-2); }
.guide__head .imsl-eyebrow { margin-bottom: 0; }
.guide__pack { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-6); align-items: start; }
.guide__video { aspect-ratio: 16 / 9; border: 1px solid var(--line-soft); border-radius: var(--r-card); box-shadow: var(--shadow-lift); overflow: hidden; background: var(--bg-alt); }
.guide__video video { display: block; width: 100%; height: 100%; background: var(--band-deep); }
.guide__video-placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); color: var(--text-muted); text-align: center; padding: var(--space-4); }
.guide__video-placeholder .imsl-icon { font-size: var(--title-2xl); color: var(--navy); }
.guide__downloads { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.guide__downloads .imsl-body { margin: 0; }
.guide__pending { opacity: .55; pointer-events: none; }
.guide__note { margin: 0; }
.guide__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.guide__step { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); border: 1px solid var(--line-soft); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.guide__step p { margin: 0; flex: 1; }
.guide__stephead { display: flex; align-items: center; gap: var(--space-2); }
.guide__stephead .imsl-icon { color: var(--navy); }
.guide__num { display: inline-flex; align-items: center; justify-content: center; width: var(--space-6); height: var(--space-6); border-radius: var(--radius-full); background: var(--navy-soft); color: var(--navy); font: 600 var(--text-xs)/1 var(--font-body); }
.guide__steptitle { margin: 0; font: 700 var(--text-md)/1.3 var(--font-display); color: var(--ink); }
.guide__panel { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); border: 1px solid var(--line-soft); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.guide__panel > .imsl-eyebrow { margin: 0; }
.guide__title { margin: 0; }
.guide__panel .imsl-body, .guide__panel .imsl-small { margin: 0; max-width: 72ch; }
.guide__facts { margin: 0; padding-left: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); max-width: 72ch; color: var(--text); }
.guide__facts strong { color: var(--ink); }
.guide__table { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.guide__table th[scope="row"] { white-space: nowrap; }
.guide__screen { display: inline-flex; align-items: center; gap: var(--space-2); }
.guide__screen .imsl-icon { color: var(--navy); }
@media (max-width: 1100px) { .guide__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .guide__pack { grid-template-columns: minmax(0, 1fr); }
  .guide__steps { grid-template-columns: minmax(0, 1fr); }
  .guide__table th[scope="row"] { white-space: normal; }
}

/* ==== React kit additions (design/react): the classes only the React components emit ====================================
   Everything the vanilla runtime draws (the shell, toasts, dialog, callout, empty and loading states, the Guide page,
   the data table) is styled by the runtime layer above, and the React kit emits the SAME DOM for them, so none of that
   is repeated here. This block holds the React-only extras: panels, cards, stat tiles, tabs, segmented, timeline, switch,
   progress, console, drawer, side panel, bottom nav, the full-bleed page and small modifiers. Documented in
   design/react/README.md. Tokens only; px or rem only for layout sizes no token names. ================================ */

/* ---- helpers ---- */
.imsl-nowrap { white-space: nowrap; }
.imsl-mono { font-family: var(--font-mono); font-size: var(--text-sm); }
.imsl-muted { color: var(--text-muted); }
.imsl-strong { font-weight: 600; }

/* ---- icon sizes and fill (md is the 20px default, sm 16px and lg 24px already exist) ---- */
.imsl-icon.is-xs { font-size: var(--icon-xs); }
.imsl-icon.is-md { font-size: var(--icon-md); }
.imsl-icon.is-xl { font-size: var(--icon-xl); }
.imsl-icon.is-2xl { font-size: var(--icon-2xl); }
.imsl-icon.is-fill { font-variation-settings: 'wght' 300, 'FILL' 1, 'GRAD' 0, 'opsz' 24; }
.imsl-logo { display: inline-flex; flex: none; }

/* ---- buttons: a selected icon button, a pressed toggle ---- */
.imsl-btn--icon.is-active { background: var(--navy-soft); }
@media (hover: hover) { .imsl-btn--icon.is-danger:hover { background: var(--error-soft); color: var(--error-text); } }
.imsl-btn--outline[aria-pressed="true"] { background: var(--navy-soft); border-color: var(--navy); }
.imsl-btn--ghost[aria-pressed="true"]:not(.imsl-btn--icon) { background: var(--navy-soft); }

/* ---- headings, cards, panels ---- */
.imsl-eyebrow--flush { margin-bottom: 0; }
.imsl-sectionhead { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); }
.imsl-sectionhead__text { min-width: 0; }
.imsl-sectionhead .imsl-eyebrow--flush { margin-bottom: var(--space-1); }
.imsl-sectionhead__title { overflow-wrap: anywhere; }
.imsl-sectionhead__meta { flex: none; display: flex; align-items: center; gap: var(--space-2); }
.imsl-card--sm { padding: var(--space-4); }
.imsl-card--flush { padding: 0; }
.imsl-card--selected { background: var(--navy-soft); border-color: var(--navy); }
.imsl-card--clickable { cursor: pointer; }
.imsl-card__icon { display: inline-flex; align-items: center; justify-content: center; width: var(--control-h-sm); height: var(--control-h-sm); margin-bottom: var(--space-4); border-radius: var(--radius-sm); background: var(--navy-soft); color: var(--navy); }
.imsl-card__title { font: 700 var(--title-xs)/1.3 var(--font-display); color: var(--ink); margin-bottom: var(--space-2); }
.imsl-panel { border: 1px solid var(--line-soft); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); color: var(--text); overflow: hidden; }
.imsl-panel__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--control-h-sm); padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--line-soft); }
.imsl-panel__title { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 var(--title-xs)/1.3 var(--font-display); color: var(--ink); }
.imsl-panel__tools { flex: none; display: flex; align-items: center; gap: var(--space-2); }
.imsl-panel__meta { display: inline-flex; align-items: center; gap: var(--space-2); font: 500 var(--text-sm)/1.3 var(--font-body); color: var(--text-muted); }
.imsl-panel__body { padding: var(--space-4); font: 400 15px/1.45 var(--font-body); color: var(--text); }
.imsl-panel--flush > .imsl-panel__body { padding: 0; }

/* ---- badges and dots ---- */
.imsl-badge__x { display: inline-flex; align-items: center; justify-content: center; width: var(--space-6); height: var(--space-6); margin-right: calc(var(--space-1) * -1); padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; }
.imsl-badge__x:hover { color: var(--ink); }
.imsl-badge--count { min-width: var(--space-5); justify-content: center; border-radius: var(--radius-full); text-transform: none; letter-spacing: 0; }
.imsl-badge--count-error { background: var(--error); color: var(--on-error); }
.imsl-dot--muted { color: var(--text-muted); }
.imsl-dot--navy { color: var(--navy); }
.imsl-dot--success { color: var(--success); }
.imsl-dot--warn { color: var(--warn); }
.imsl-dot--error { color: var(--error); }
.imsl-dot--orange { color: var(--orange); }
@keyframes imsl-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.imsl-pulse { animation: imsl-pulse calc(var(--dur-slow) * 2) var(--ease) infinite; }
@media (prefers-reduced-motion: reduce) { .imsl-pulse { animation: none; } }

/* ---- stat tiles, meta list ---- */
.imsl-statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, max(150px, calc((100% - (var(--imsl-cols, 4) - 1) * 1px) / var(--imsl-cols, 4)))), 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line-soft); border-radius: var(--r-card); box-shadow: var(--shadow-lift); overflow: hidden; }
/* StatGrid keeps whole rows itself (decision 48): it measures its own width and tile count and writes --imsl-fit (columns) and --imsl-last-span
   (cells the last tile takes), so a short last row never leaves a ruled hole. Until measured, the auto-fit rule above applies. */
.imsl-statgrid--fit { grid-template-columns: repeat(var(--imsl-fit), minmax(0, 1fr)); }
.imsl-statgrid--fit > .imsl-statgrid__tile:last-child { grid-column: span var(--imsl-last-span, 1); }
.imsl-statgrid__tile { background: var(--surface); padding: var(--space-4); }
.imsl-statgrid__tile dt { margin: 0; font: 600 var(--text-sm)/1.3 var(--font-body); color: var(--text-muted); }
.imsl-statgrid__tile dd { display: flex; align-items: baseline; gap: var(--space-3); margin: var(--space-2) 0 0; }
.imsl-statgrid__value { font: 700 var(--title-sm)/1 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.imsl-statgrid__delta { font: 600 var(--text-sm)/1.3 var(--font-body); color: var(--text-muted); }
.imsl-statgrid__delta--good { color: var(--success-text); }
.imsl-statgrid__delta--bad { color: var(--error-text); }
.imsl-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-1) var(--space-4); margin: 0; font: 400 var(--text-sm)/1.5 var(--font-body); }
.imsl-meta dt { color: var(--text-muted); font-weight: 600; }
.imsl-meta dd { margin: 0; color: var(--text); font-family: var(--font-mono); overflow-wrap: anywhere; }
.imsl-meta--plain dd { font-family: var(--font-body); }

/* ---- tabs (with a count, an icon, scrolling), segmented ---- */
.imsl-tabs--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
/* On a phone the strip wraps onto a second line, so no tab is cut off at the edge (the user's choice, 13 November 2026).
   A wrapped track takes the card radius: a full pill around two lines reads as a blob. */
@media (max-width: 639px) {
  .imsl-tabs--scroll { flex-wrap: wrap; overflow-x: visible; border-radius: var(--r-card); }
  .imsl-tabs--scroll > .imsl-tab { flex: 1 1 auto; justify-content: center; }
}
.imsl-tab--rich { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--space-10); flex: none; white-space: nowrap; }
.imsl-tab__count { font: 500 var(--text-sm)/1 var(--font-body); color: var(--text-muted); }
.imsl-tab__attention { font: 600 var(--text-sm)/1 var(--font-body); color: var(--warn-text); }
.imsl-segmented { display: inline-flex; gap: var(--space-1); min-height: var(--field-h); padding: var(--space-1); border: 1px solid var(--line); border-radius: var(--radius-full); background: var(--surface-2); }
.imsl-segmented button { padding: 0 var(--space-5); border: 0; border-radius: var(--radius-full); background: transparent; color: var(--navy); font: 600 15px/1 var(--font-body); cursor: pointer; transition: background-color var(--dur-base), color var(--dur-base); }
@media (hover: hover) { .imsl-segmented button:hover { background: var(--navy-soft); } }
.imsl-segmented button[aria-pressed="true"] { background: var(--navy-fill); color: var(--on-navy); }
.imsl-segmented button:focus-visible { outline-offset: calc(var(--focus-width) * -1); }

/* ---- the plain table ---- */
.imsl-table-wrap { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; border: 1px solid var(--line-soft); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.imsl-table-wrap .imsl-table th, .dt .imsl-table th { border-radius: 0; }
.imsl-table tbody tr.is-clickable { cursor: pointer; }
.imsl-table tbody tr.is-clickable:focus-visible { outline-offset: -2px; }
.imsl-table tbody tr.is-selected td { background: var(--navy-soft); }
.imsl-table tbody tr.is-selected td:first-child { box-shadow: inset 2px 0 0 var(--navy); }

/* ---- forms ---- */
.imsl-field--inline { flex-direction: row; align-items: center; gap: var(--space-3); }
.imsl-fieldset { display: flex; flex-direction: column; gap: var(--space-1); border: 0; margin: 0; padding: 0; min-width: 0; }
/* A legend is not a flex item (the browser draws it on the fieldset's border), so a gap, flex or grid never reached it and the first
   control sat flush under it. Floating it makes it an ordinary item of the fieldset (the HTML spec: a floated legend is not "rendered"),
   so the gap works in block, flex and grid layouts. */
.imsl-fieldset > legend { float: left; width: 100%; margin: 0; padding: 0; font: 600 14px/1.4 var(--font-body); color: var(--ink); }
.imsl-input:disabled, .imsl-select:disabled, .imsl-textarea:disabled { opacity: .5; cursor: not-allowed; }
.imsl-select[aria-invalid="true"], .imsl-textarea[aria-invalid="true"] { border-color: var(--error); }
.imsl-input--mono { font-family: var(--font-mono); }
.imsl-input--lg { height: var(--topbar-h); padding-inline: var(--space-5); border-radius: var(--radius-md); font-size: var(--text-lg); }
.imsl-input-wrap { position: relative; display: flex; align-items: center; }
.imsl-input-wrap > .imsl-icon { position: absolute; left: var(--space-3); color: var(--text-muted); pointer-events: none; }
.imsl-input-wrap > .imsl-input--icon { padding-left: calc(var(--space-3) + var(--space-6) + var(--space-2)); }
.imsl-input-wrap--lg > .imsl-icon { left: var(--space-5); }
.imsl-input-wrap--lg > .imsl-input--icon { padding-left: calc(var(--space-5) + var(--title-md) + var(--space-3)); }
.imsl-check.is-disabled { opacity: .5; cursor: not-allowed; }
.imsl-check--bare { align-items: center; justify-content: center; min-width: var(--space-6); min-height: var(--space-6); }
.imsl-check--bare input { margin: 0; }
.imsl-checkgroup { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-6); }
.imsl-switchrow { display: flex; flex-direction: column; gap: var(--space-1); }
.imsl-switch { display: inline-flex; align-items: center; gap: var(--space-3); min-height: var(--space-10); font: 400 15px/1.45 var(--font-body); color: var(--text); cursor: pointer; }
.imsl-switch.is-disabled { opacity: .5; cursor: not-allowed; }
.imsl-switch__track { position: relative; flex: none; width: var(--space-10); height: var(--space-6); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-full); background: var(--surface-2); cursor: inherit; transition: background-color var(--dur-base), border-color var(--dur-base), box-shadow var(--dur-base); }
.imsl-switch__track:focus-visible { box-shadow: var(--shadow-glow-navy); }
.imsl-switch__track[aria-checked="true"] { background: var(--navy-fill); border-color: var(--navy-fill); }
.imsl-switch__thumb { position: absolute; top: 0; left: 0; width: var(--space-4); height: var(--space-4); margin: var(--space-1); border-radius: var(--radius-full); background: var(--text-muted); box-shadow: var(--shadow-lift); transition: left var(--dur-base) var(--ease-spring), background-color var(--dur-base); }
.imsl-switch__track[aria-checked="true"] .imsl-switch__thumb { left: calc(100% - var(--space-4) - var(--space-2)); background: var(--on-navy); }

/* ---- empty state and loading modifiers, error boundary ---- */
.imsl-empty--compact { padding: var(--space-6) var(--space-4); }
.imsl-empty__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-3); }
.imsl-loading--inline { justify-content: flex-start; padding: 0; font-size: var(--text-sm); }
.imsl-errorboundary { display: flex; justify-content: center; padding: var(--space-8) var(--space-4); }
.imsl-errorboundary > .imsl-empty { width: 100%; max-width: 560px; }
.imsl-errorboundary--compact { padding: var(--space-4); }

/* ---- progress ---- */
.imsl-progress { display: flex; flex-direction: column; gap: var(--space-1); }
.imsl-progress__head { display: flex; justify-content: space-between; gap: var(--space-3); font: 600 var(--text-sm)/1.3 var(--font-body); color: var(--text-muted); }
.imsl-progress__detail { font-weight: 500; color: var(--text); }
.imsl-progress__track { position: relative; height: var(--space-2); border: 1px solid var(--line-soft); border-radius: var(--radius-full); background: var(--surface-2); overflow: hidden; }
.imsl-progress__fill { position: absolute; inset: 0 auto 0 0; border-radius: var(--radius-full); background: var(--navy); transition: width var(--dur-base) var(--ease); }
.imsl-progress__fill.is-warn { background: var(--warn); }
.imsl-progress__fill.is-error { background: var(--error); }

/* ---- timeline ---- */
.imsl-timeline { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.imsl-timeline__item { --tl-node: var(--text-muted); --tl-text: var(--text-muted); position: relative; display: grid; grid-template-columns: auto var(--space-4) minmax(0, 1fr); column-gap: var(--space-3); padding-bottom: var(--space-5); }
.imsl-timeline--dense .imsl-timeline__item { padding-bottom: var(--space-3); }
.imsl-timeline__item.is-last { padding-bottom: 0; }
.imsl-timeline__item--accent, .imsl-timeline__item--info { --tl-node: var(--navy); --tl-text: var(--navy); }
.imsl-timeline__item--warn { --tl-node: var(--warn); --tl-text: var(--warn-text); }
.imsl-timeline__item--danger { --tl-node: var(--error); --tl-text: var(--error-text); }
.imsl-timeline__time { text-align: right; white-space: nowrap; font: 400 var(--text-sm)/1.45 var(--font-mono); color: var(--text-muted); }
.imsl-timeline__spine { position: relative; display: flex; justify-content: center; }
.imsl-timeline__item:not(.is-last) .imsl-timeline__spine::before { content: ""; position: absolute; top: var(--space-4); bottom: calc(var(--space-5) * -1); width: var(--bar); border-radius: var(--radius-full); background: var(--line); }
.imsl-timeline--dense .imsl-timeline__item:not(.is-last) .imsl-timeline__spine::before { bottom: calc(var(--space-3) * -1); }
.imsl-timeline__node { position: relative; flex: none; width: var(--space-2); height: var(--space-2); margin-top: var(--space-2); border: 2px solid var(--tl-node); border-radius: var(--radius-full); background: var(--tl-node); box-sizing: content-box; box-shadow: 0 0 0 var(--space-1) var(--surface); }
.imsl-timeline__item.is-major .imsl-timeline__node { width: var(--space-3); height: var(--space-3); margin-top: var(--space-1); }
.imsl-timeline__item.is-hollow .imsl-timeline__node { background: var(--surface); }
.imsl-timeline__item.is-square .imsl-timeline__node { border-radius: 0; }
.imsl-timeline__body { min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.imsl-timeline__kind { font: 600 var(--text-xs)/1.3 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--tl-text); }
.imsl-timeline__title { font: 600 15px/1.45 var(--font-body); color: var(--ink); }
.imsl-timeline__text { font: 400 15px/1.45 var(--font-body); color: var(--text); }
.imsl-timeline__meta { font: 400 var(--text-sm)/1.4 var(--font-mono); color: var(--text-muted); }

/* ---- console bar and the ok level ---- */
.imsl-consolebox__bar { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); font: 600 var(--text-sm)/1.3 var(--font-body); color: var(--ink); }
.imsl-consolebox__spacer { flex: 1; }
.imsl-console__msg { min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.imsl-console__empty { color: var(--text-muted); }

/* ---- dialog modifiers (the dialog itself is the runtime layer's) and the drawer ---- */
.imsl-dialog--danger { border-color: var(--error); }
.imsl-dialog--danger > .imsl-h3 { color: var(--error-text); }
dialog.imsl-dialog > .imsl-eyebrow--flush, .imsl-dialog__titles > .imsl-eyebrow--flush { margin-bottom: var(--space-1); }
.imsl-drawer { position: fixed; inset: 0; z-index: var(--z-overlay); }
.imsl-drawer__scrim { position: absolute; inset: 0; background: var(--scrim); }
.imsl-drawer__panel { position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; width: min(100%, var(--drawer-md)); background: var(--surface); color: var(--text); border: 0 solid var(--line); box-shadow: var(--shadow-ui); }
.imsl-drawer__panel--right { right: 0; border-left-width: 1px; border-radius: var(--r-card) 0 0 var(--r-card); }
.imsl-drawer__panel--left { left: 0; border-right-width: 1px; border-radius: 0 var(--r-card) var(--r-card) 0; }
.imsl-drawer__panel--sm { width: min(100%, var(--drawer-sm)); }
.imsl-drawer__panel--lg { width: min(100%, var(--drawer-lg)); }
.imsl-drawer__head { flex: none; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--line-soft); }
.imsl-drawer__heading { flex: 1; min-width: 0; }
.imsl-drawer__heading .imsl-eyebrow--flush { margin-bottom: var(--space-1); }
.imsl-drawer__title { margin: 0; font: 700 var(--title-xs)/1.3 var(--font-display); color: var(--ink); }
.imsl-drawer__body { flex: 1; min-height: 0; overflow: auto; padding: var(--space-5); }
.imsl-drawer__body.is-flush { padding: 0; }
.imsl-drawer__foot { flex: none; display: flex; justify-content: flex-end; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--line-soft); background: var(--bg-alt); }

/* ---- side panel (non-modal, in flow beside main) and its resizer ---- */
.imsl-sidepanel { flex: none; align-self: stretch; display: flex; flex-direction: column; min-height: 0; width: var(--panel-md); background: var(--surface); color: var(--text); border-left: 1px solid var(--line); }
.imsl-sidepanel--lg { width: var(--panel-lg); }
.imsl-sidepanel--sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-overlay); width: auto; align-self: auto; max-height: var(--sheet-max-h); border-left: 0; border-top: 1px solid var(--line); border-radius: var(--r-card) var(--r-card) 0 0; box-shadow: var(--shadow-ui); }
.imsl-sidepanel__head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--topbar-h); padding: 0 var(--space-4); border-bottom: 1px solid var(--line-soft); }
.imsl-sidepanel__heading { min-width: 0; margin: 0; }
.imsl-sidepanel__heading:focus { outline: none; }
.imsl-sidepanel__title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 var(--title-xs)/1.3 var(--font-display); color: var(--ink); }
.imsl-sidepanel__tools { flex: none; display: flex; align-items: center; gap: var(--space-2); }
.imsl-sidepanel__body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; padding: var(--space-4); font: 500 15px/1.45 var(--font-body); }
.imsl-sidepanel__body.is-flush { padding: 0; }
.imsl-resizer { position: relative; flex: none; align-self: stretch; width: 1px; background: var(--line); cursor: col-resize; touch-action: none; transition: background-color var(--dur-fast) var(--ease); }
.imsl-resizer::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--space-3) * -1); right: calc(var(--space-3) * -1); }
.imsl-resizer.is-dragging, .imsl-resizer:focus-visible { background: var(--navy); }
@media (hover: hover) { .imsl-resizer:hover { background: var(--navy); } }
.imsl-resizer + .imsl-sidepanel { border-left: 0; }
/* Under 1024px the shell body stacks (the rail becomes a strip): a panel sits under main instead of beside it. */
@media (max-width: 1023px) {
  .imsl-sidepanel:not(.imsl-sidepanel--sheet) { width: auto; max-height: 50%; border-left: 0; border-top: 1px solid var(--line); }
  .imsl-resizer { display: none; }
}

/* ---- the shell: a readout, the full-bleed page, a panel column, the opt-in bottom nav ---- */
.imsl-status { display: inline-flex; align-items: center; gap: var(--space-2); font: 600 var(--text-sm)/1.3 var(--font-body); color: var(--text); white-space: nowrap; }
@media (max-width: 639px) { .imsl-status { display: none; } }
.imsl-shell__main--bleed { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.imsl-shell__main--bleed > .imsl-shell__view { flex: 1; min-height: 0; }
/* The Secure Build panel shares .imsl-split with main inside the shell body: both stretch, only main scrolls. */
.imsl-shell__body > .imsl-split { flex: 1; min-width: 0; align-items: stretch; }
.imsl-split > .imsl-howitworks { top: 0; max-height: 100%; }
@media (max-width: 900px) {
  .imsl-shell__body > .imsl-split { overflow-y: auto; }
  .imsl-shell__body > .imsl-split > .imsl-shell__main { flex: none; overflow: visible; }
}
.imsl-bottomnav { display: none; flex: none; gap: var(--space-1); padding: var(--space-1); overflow-x: auto; background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-top: 1px solid var(--glass-line); }
@media (max-width: 639px) { .imsl-bottomnav { display: flex; } .imsl-shell--bottomnav .imsl-rail { display: none; } }
.imsl-bottomnav a { flex: 1 0 auto; min-width: var(--field-h); min-height: var(--field-h); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--space-1); border-radius: var(--r-control); color: var(--text); text-decoration: none; font: 600 var(--text-xs)/1.2 var(--font-body); white-space: nowrap; position: relative; transition: background-color var(--dur-base), color var(--dur-base); }
@media (hover: hover) { .imsl-bottomnav a:hover { background: var(--navy-soft); color: var(--navy); } }
.imsl-bottomnav a[aria-current="page"] { background: var(--navy-soft); color: var(--navy); }
.imsl-bottomnav a[aria-current="page"]::after { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: var(--bar); border-radius: var(--radius-full); background: var(--orange); }
/* ---- API reference page (decision 76): intro, tabs row, Swagger iframe, JSON view ---- */
.imsl-apiref { display: flex; flex-direction: column; gap: var(--space-6); }
.imsl-apiref__intro { max-width: 72ch; }
.imsl-apiref__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
/* The iframe is the CSS boundary for Swagger's literal styles. Its height is measured in apireference.tsx (useFitToViewport) so it ends at the bottom of the view in every shell; this calc() is the first-paint fallback. */
.imsl-apiref__frame { display: block; width: 100%; height: calc(100dvh - var(--topbar-h) - var(--space-24)); min-height: 320px; border: 0; }
@media (max-width: 767px) { .imsl-apiref__frame { min-height: 480px; } }
.imsl-apiref__spec { margin: 0; padding: var(--space-4); max-height: calc(100dvh - var(--topbar-h) - var(--space-24)); overflow: auto; font: 400 var(--text-sm)/1.5 var(--font-mono); color: var(--text); white-space: pre; }
/* ==== end of React kit additions ==== */


/* ==== Slide library (scripts/slides/*.js, docs/slide-library.md) ==================================================
   Each family writes only inside its own begin/end markers. Slides are .imsl-slide at 1280x720; tokens only. ==== */
/* SLIDES:shared:begin */
.imsl-slide--alt { background: var(--bg-alt); }
.imsl-slide__logo { position: absolute; left: var(--slide-pad); bottom: var(--space-8); line-height: 0; }
.imsl-slide__logo--top { top: var(--slide-pad); bottom: auto; }
.imsl-slide__title { font: 700 var(--title-xl)/1.15 var(--font-display); color: var(--navy); margin: 0; }
.imsl-slide--band .imsl-slide__title, .imsl-slide--deep .imsl-slide__title { color: var(--on-navy); }
.imsl-slide__body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.imsl-slide__pic { background: var(--surface-2); border: 1px solid var(--line); color: var(--text-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); font: 500 var(--text-sm)/1.3 var(--font-body); }
/* The v2 look on slides (decision 74, ADR 0005). The :root prefix keeps these ahead of the v2 screen layer's shared classes
   (.imsl-card, .imsl-badge, .imsl-eyebrow, tables), which also reach a slide. Cards are 20px and lifted, badges and number
   chips are pills, the accent bar is the 3px --bar, navy slides carry the dot grid faded at the edges. */
.imsl-slide { isolation: isolate; }
.imsl-slide--band::before, .imsl-slide--deep::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(var(--grid-dot) 1px, transparent 1.5px) 0 0 / var(--grid-size) var(--grid-size);
  -webkit-mask-image: radial-gradient(120% 90% at 85% 0%, var(--ink) 0%, transparent 70%); mask-image: radial-gradient(120% 90% at 85% 0%, var(--ink) 0%, transparent 70%); }
/* a slide is a still: no hover light, no lift, no transition */
.imsl-slide .imsl-card { border-radius: var(--r-card); border-color: var(--line-soft); box-shadow: var(--shadow-lift); transition: none; }
.imsl-slide .imsl-card::before { display: none; }
.imsl-slide .imsl-card--hover:hover, .imsl-slide a.imsl-card:hover { transform: none; box-shadow: var(--shadow-lift); border-color: var(--line-soft); }
.imsl-slide .imsl-accent-bar { height: var(--bar); border-radius: var(--radius-full); }
.imsl-slide__num { font-size: var(--text-xs); }
.imsl-slide .imsl-slide__pic { border-radius: var(--r-card); }
/* tables on a slide: the frame is rounded and lifted like a card; headers stay the slide's own flat style */
.imsl-slide .imsl-table th, .imsl-slide .imsl-table thead th { -webkit-backdrop-filter: none; backdrop-filter: none; }
.imsl-slide .imsl-table tbody tr:hover > td, .imsl-slide .imsl-table tbody tr:hover > td:first-child { background: transparent; box-shadow: none; }
.imsl-slide .imsl-btn { box-shadow: none; transform: none; }
/* SLIDES:shared:end */



/* SLIDES:openers:begin */
.imsl-s-openers-open { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: calc(var(--space-24) * 8); padding-top: var(--space-12); }
.imsl-s-openers-open--img { max-width: calc(var(--space-24) * 5.5); }
.imsl-s-openers-open--img .imsl-display { font-size: var(--title-2xl); }
.imsl-s-openers-open .imsl-accent-bar { margin: var(--space-6) 0; }
.imsl-s-openers-lead { margin: 0; }
.imsl-s-openers-meta { margin: var(--space-8) 0 0; font: 500 var(--text-sm)/1.3 var(--font-body); color: var(--on-navy); opacity: .85; }
.imsl-s-openers-tri { position: absolute; right: 0; bottom: 0; width: calc(var(--space-24) * 2); height: calc(var(--space-24) * 2); background: var(--orange); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.imsl-s-openers-ag { list-style: none; margin: var(--space-6) 0 0; padding: 0; }
.imsl-s-openers-ag__row { display: grid; grid-template-columns: var(--space-12) calc(var(--space-24) * 3) 1fr auto; column-gap: var(--space-6); align-items: center; padding: var(--space-2) 0; }
.imsl-s-openers-ag__row + .imsl-s-openers-ag__row { border-top: 1px solid var(--line); }
.imsl-s-openers-ag__no { width: var(--space-12); height: var(--space-12); display: flex; align-items: center; justify-content: center; background: var(--navy-fill); color: var(--on-navy); border-radius: var(--radius-sm); font: 700 var(--text-lg)/1 var(--font-display); }
.imsl-s-openers-ag__h { font: 700 var(--title-xs)/1.2 var(--font-display); color: var(--navy); }
.imsl-s-openers-ag__note { font: 400 var(--text-lg)/1.3 var(--font-body); color: var(--text-muted); }
.imsl-s-openers-ag__time { font: 600 var(--text-lg)/1 var(--font-body); color: var(--navy); font-variant-numeric: tabular-nums; }
.imsl-s-openers-numrow { flex: 1; display: flex; align-items: center; gap: var(--space-12); }
.imsl-s-openers-num { font: 700 var(--icon-display)/1 var(--font-display); color: var(--orange); }
.imsl-s-openers-numtext { max-width: calc(var(--space-24) * 6.5); }
.imsl-s-openers-numtext .imsl-s-openers-lead { margin-top: var(--space-4); }
.imsl-slide--band:has(.imsl-s-openers-open--img) .imsl-slide__num { color: var(--on-navy); opacity: 1; background: var(--band); padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); }
/* v2: number chips are pills */
.imsl-s-openers-ag__no { border-radius: var(--r-chip); }
.imsl-slide--band:has(.imsl-s-openers-open--img) .imsl-slide__num { border-radius: var(--r-chip); padding: var(--space-1) var(--space-3); }
/* SLIDES:openers:end */



/* SLIDES:statements:begin */
.imsl-s-statements-statement .imsl-display { max-width: 960px; }
.imsl-s-statements-source { font: 500 var(--text-sm)/1.3 var(--font-body); color: var(--text-muted); margin: 0; }
.imsl-s-statements-figure { display: grid; grid-template-columns: 5fr 7fr; align-items: center; gap: var(--space-12); }
.imsl-s-statements-figure__n { font: 700 var(--icon-display)/1 var(--font-display); color: var(--orange); letter-spacing: -.02em; }
.imsl-s-statements-context { font: 400 var(--text-lg)/1.45 var(--font-body); color: var(--text); margin: 0 0 var(--space-2); }
.imsl-s-statements-figure .imsl-s-statements-source { margin-top: var(--space-10); }
.imsl-s-statements-quote { max-width: 960px; }
.imsl-s-statements-quote__mark { font: 700 var(--icon-display)/.8 var(--font-display); color: var(--orange); height: var(--space-16); margin-bottom: var(--space-4); }
.imsl-s-statements-quote__text { font: italic 400 var(--title-lg)/1.4 var(--font-display); color: var(--ink); margin: 0 0 var(--space-8); }
.imsl-s-statements-quote__who { font: 700 var(--text-lg)/1.3 var(--font-body); color: var(--navy); margin: 0; }
.imsl-s-statements-quote__org { font: 400 var(--text-lg)/1.3 var(--font-body); color: var(--text-muted); margin: 0; }
.imsl-s-statements-takeaway .imsl-display, .imsl-s-statements-takeaway .imsl-lead { max-width: 960px; }
.imsl-s-statements-takeaway .imsl-lead { margin: 0; }/* SLIDES:statements:end */



/* SLIDES:boxes:begin */
.imsl-s-boxes-boxes { flex: 1; min-height: 0; margin-bottom: var(--space-12); padding-top: var(--space-6); display: grid; align-content: center; gap: var(--space-8); }
.imsl-s-boxes--2 { grid-template-columns: repeat(2, 1fr); }
.imsl-s-boxes--3 { grid-template-columns: repeat(3, 1fr); }
.imsl-s-boxes--4 { grid-template-columns: repeat(2, 1fr); gap: var(--space-6) var(--space-8); }
.imsl-s-boxes--row { grid-template-columns: repeat(4, 1fr); }
.imsl-s-boxes--5 { grid-template-columns: repeat(5, 1fr); gap: var(--space-6); }
.imsl-s-boxes--6 { grid-template-columns: repeat(3, 1fr); gap: var(--space-6) var(--space-8); }
.imsl-s-boxes-box { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.imsl-s-boxes-box--strip { padding: 0; gap: 0; overflow: hidden; align-items: stretch; }
.imsl-s-boxes-box--strip .imsl-s-boxes-b { padding: var(--space-8); }
.imsl-s-boxes-box--row { gap: var(--space-3); padding-top: var(--space-6); border-top: 1px solid var(--line-strong); }
.imsl-s-boxes--5 .imsl-card { padding: var(--space-5) var(--space-4); }
.imsl-s-boxes-head { display: flex; align-items: center; gap: var(--space-4); }
.imsl-s-boxes-strip { display: flex; align-items: center; gap: var(--space-5); padding: var(--space-5) var(--space-8); background: var(--navy-fill); }
.imsl-s-boxes-strip .imsl-s-boxes-h { color: var(--on-navy); }
.imsl-s-boxes-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--space-12); height: var(--space-12); background: var(--navy-fill); color: var(--on-navy); border-radius: var(--radius-sm); font: 700 var(--title-xs)/1 var(--font-display); }
.imsl-s-boxes--5 .imsl-s-boxes-mark { width: var(--space-10); height: var(--space-10); font-size: var(--text-lg); }
.imsl-s-boxes-mark .imsl-icon { color: var(--on-navy); }
.imsl-s-boxes-num { font: 700 var(--title-xl)/1 var(--font-display); color: var(--on-navy); }
.imsl-s-boxes-box--row .imsl-s-boxes-num { font-size: var(--title-3xl); color: var(--navy); }
.imsl-s-boxes-h { margin: 0; font: 700 var(--title-sm)/1.25 var(--font-display); color: var(--ink); }
.imsl-s-boxes--5 .imsl-s-boxes-h, .imsl-s-boxes--6 .imsl-s-boxes-h { font-size: var(--title-xs); }
.imsl-s-boxes-b { margin: 0; font: 400 var(--text-lg)/1.45 var(--font-body); color: var(--text); }
.imsl-s-boxes-mark { border-radius: var(--r-chip); }
/* SLIDES:boxes:end */



/* SLIDES:time:begin */
.imsl-s-time-body { margin-bottom: var(--space-12); padding-top: var(--space-6); }
/* timeline, horizontal */
.imsl-s-time-th { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.imsl-s-time-th__item { display: grid; grid-template-rows: var(--space-10) var(--space-12) auto; text-align: center; }
.imsl-s-time-th__date { align-self: end; font: 600 var(--text-lg)/1.3 var(--font-body); color: var(--navy); font-variant-numeric: tabular-nums; }
.imsl-s-time-th__track { position: relative; display: flex; align-items: center; justify-content: center; }
.imsl-s-time-th__track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--line-strong); }
.imsl-s-time-th__item:first-child .imsl-s-time-th__track::before { left: 50%; }
.imsl-s-time-th__item:last-child .imsl-s-time-th__track::before { right: 50%; }
.imsl-s-time-th__dot { position: relative; box-sizing: border-box; width: var(--space-4); height: var(--space-4); border-radius: var(--radius-full); background: var(--navy-fill); border: 2px solid var(--navy); }
.imsl-s-time-th__item.is-now .imsl-s-time-th__dot { width: var(--space-6); height: var(--space-6); background: var(--orange); border: 2px solid var(--bg); }
.imsl-s-time-th__now { position: absolute; left: calc(50% + var(--space-4)); background: var(--bg); padding: 0 var(--space-2); font: 700 var(--text-sm)/1.3 var(--font-body); color: var(--orange-text); }
.imsl-s-time-th__text { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4) var(--space-3) 0; }
.imsl-s-time-th__title { font: 700 var(--title-xs)/1.3 var(--font-display); color: var(--ink); }
.imsl-s-time-th__note { font: 400 var(--text-lg)/1.4 var(--font-body); color: var(--text); }
/* timeline, vertical */
.imsl-s-time-tv { --imsl-s-time-date: calc(var(--space-24) + var(--space-8)); list-style: none; margin: 0; padding: 0; }
.imsl-s-time-tv__item { position: relative; display: grid; grid-template-columns: var(--imsl-s-time-date) var(--space-10) minmax(0, 1fr); padding-bottom: var(--space-6); }
.imsl-s-time-tv__item:last-child { padding-bottom: 0; }
.imsl-s-time-tv__item:not(:last-child)::before { content: ""; position: absolute; top: calc(var(--space-2) + var(--space-4)); bottom: calc(var(--space-2) * -1); left: calc(var(--imsl-s-time-date) + var(--space-5) - 1px); width: 2px; background: var(--line-strong); }
.imsl-s-time-tv__date { text-align: right; font: 500 var(--text-lg)/var(--space-8) var(--font-body); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.imsl-s-time-tv__spine { display: flex; justify-content: center; }
.imsl-s-time-tv__dot { position: relative; box-sizing: border-box; margin-top: var(--space-2); width: var(--space-4); height: var(--space-4); border-radius: var(--radius-full); background: var(--navy-fill); border: 2px solid var(--navy); }
.imsl-s-time-tv__body { display: flex; flex-direction: column; }
.imsl-s-time-tv__title { font: 700 var(--title-xs)/var(--space-8) var(--font-display); color: var(--ink); }
.imsl-s-time-tv__note { font: 400 var(--text-lg)/1.4 var(--font-body); color: var(--text); }
/* roadmap and programme plan: shared grid parts */
.imsl-s-time-rm, .imsl-s-time-gantt { --imsl-s-time-label: calc(var(--space-24) + var(--space-16)); border-right: 1px solid var(--line-soft); }
.imsl-s-time-rm { --imsl-s-time-cols: var(--imsl-s-time-label) repeat(4, minmax(0, 1fr)); }
.imsl-s-time-gantt { --imsl-s-time-cols: var(--imsl-s-time-label) repeat(10, minmax(0, 1fr)); }
.imsl-s-time-row { display: grid; grid-template-columns: var(--imsl-s-time-cols); align-items: stretch; border-top: 1px solid var(--line); min-height: var(--space-24); }
.imsl-s-time-gantt .imsl-s-time-row { min-height: var(--space-12); }
.imsl-s-time-row:last-child { border-bottom: 1px solid var(--line); }
.imsl-s-time-row--head { min-height: 0; border-top: 0; }
.imsl-s-time-row > * { grid-row: 1; }
.imsl-s-time-lane { grid-column: 1; display: flex; align-items: center; font: 600 var(--text-lg)/1.3 var(--font-body); color: var(--ink); }
.imsl-s-time-row--head .imsl-s-time-lane { font: 600 var(--text-sm)/1.3 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); padding-bottom: var(--space-3); align-items: flex-end; }
.imsl-s-time-colhead { padding: 0 var(--space-3) var(--space-3); display: flex; align-items: flex-end; font: 600 var(--text-sm)/1.3 var(--font-body); letter-spacing: .1em; color: var(--text-muted); border-left: 1px solid var(--line-soft); }
.imsl-s-time-colhead--num { justify-content: center; padding: 0 0 var(--space-3); font-variant-numeric: tabular-nums; }
.imsl-s-time-cell { border-left: 1px solid var(--line-soft); }
/* roadmap bars */
.imsl-s-time-bar { position: relative; z-index: 1; align-self: center; margin: 0 var(--space-2); padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); font: 600 var(--text-lg)/1.25 var(--font-body); }
.imsl-s-time-bar--core { background: var(--navy-fill); border-color: var(--navy-fill); color: var(--on-navy); }
.imsl-s-time-bar--soft { background: var(--navy-soft); border-color: var(--navy); color: var(--navy); }
.imsl-s-time-bar--plain { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.imsl-s-time-legend { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: flex; gap: var(--space-8); font: 400 var(--text-lg)/1.3 var(--font-body); color: var(--text); }
.imsl-s-time-legend li { display: flex; align-items: center; gap: var(--space-2); }
.imsl-s-time-swatch { box-sizing: border-box; width: var(--space-6); height: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-xs); }
/* programme plan */
.imsl-s-time-gbar { position: relative; z-index: 1; align-self: center; height: var(--space-6); background: var(--navy-fill); border-radius: var(--r-chip); }
.imsl-s-time-diamond { position: relative; z-index: 2; align-self: center; justify-self: start; box-sizing: border-box; width: var(--space-4); height: var(--space-4); background: var(--orange); border: 2px solid var(--bg); outline: 1px solid var(--orange); transform: translateX(-50%) rotate(45deg); }
.imsl-s-time-ms { align-self: center; padding-left: var(--space-5); font: 600 var(--text-lg)/1.3 var(--font-body); color: var(--ink); }
/* SLIDES:time:end */



/* SLIDES:process:begin */
.imsl-s-process-flow { position: relative; width: 100%; height: 440px; }
.imsl-s-process-flow__track { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--line); }
.imsl-s-process-flow__link { position: absolute; height: 0; border-top: 3px solid var(--orange); transform-origin: left; transform: scaleX(0); }
.imsl-s-process-flow__link--on { transform: none; }
.imsl-s-process-flow__link--on::after { content: ""; position: absolute; right: -2px; top: -8px; border: 6.5px solid transparent; border-left: 9px solid var(--orange); border-right: 0; }
.imsl-s-process-flow__card { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) var(--space-4); background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-card); box-shadow: var(--shadow-lift); color: var(--navy); }
.imsl-s-process-flow__card b { font: 700 var(--title-xs)/1.25 var(--font-display); color: inherit; }
.imsl-s-process-flow__card span:last-child { font: 400 var(--text-sm)/1.4 var(--font-body); color: var(--text); }
.imsl-s-process-flow__n { font: 700 var(--text-xs)/1 var(--font-body); letter-spacing: .1em; color: var(--orange-text); }
.imsl-s-process-flow__card--done, .imsl-s-process-flow__card--current { background: var(--navy-fill); border-color: var(--navy-fill); color: var(--on-navy); }
.imsl-s-process-flow__card--done span, .imsl-s-process-flow__card--current span, .imsl-s-process-flow__card--done span:last-child, .imsl-s-process-flow__card--current span:last-child { color: var(--on-navy); }
.imsl-s-process-flow__focus { position: absolute; height: var(--space-1); background: var(--orange); border-radius: var(--radius-full); }
.imsl-s-process-flow__token { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--orange); }
.imsl-s-process-flow__detail { position: absolute; left: 0; right: 0; top: 270px; padding-left: var(--space-6); border-left: 6px solid var(--orange); }
.imsl-s-process-flow__detail .imsl-eyebrow { color: var(--orange-text); }
.imsl-s-process-flow__detail p { margin: var(--space-2) 0 0; font: 400 var(--title-sm)/1.35 var(--font-display); color: var(--ink); max-width: 980px; }
.imsl-s-process-cycle { position: relative; width: 1136px; height: 430px; }
.imsl-s-process-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.imsl-s-process-arc { fill: none; stroke: var(--navy); stroke-width: 3; }
.imsl-s-process-arrowhead { fill: var(--navy); }
.imsl-s-process-tile { fill: var(--navy-fill); }
.imsl-s-process-tile__n { fill: var(--on-navy); font: 700 var(--title-xs)/1 var(--font-display); text-anchor: middle; dominant-baseline: central; }
.imsl-s-process-cy { position: absolute; display: flex; flex-direction: column; gap: var(--space-1); }
.imsl-s-process-cy--l { text-align: right; }
.imsl-s-process-cy b { font: 700 var(--title-xs)/1.3 var(--font-display); color: var(--navy); }
.imsl-s-process-cy span { font: 400 var(--text-lg)/1.4 var(--font-body); color: var(--text); }
.imsl-s-process-cycle__centre { position: absolute; left: 468px; top: 175px; width: 200px; text-align: center; font: 600 var(--text-md)/1.35 var(--font-display); color: var(--ink); }/* SLIDES:process:end */



/* SLIDES:data:begin */
/* Body zone: starts below the title, ends at y = 600 so content stays clear of the lock-up and the number. */
.imsl-s-data-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: var(--space-8) 0 var(--space-12); }
.imsl-s-data-note { margin: auto 0 0; padding-top: var(--space-3); font: 500 var(--text-sm)/1.4 var(--font-body); color: var(--text-muted); }
.imsl-s-data-h { margin: 0; font: 700 var(--title-xs)/1.3 var(--font-display); color: var(--ink); }
.imsl-s-data-p { margin: 0; font: 500 var(--text-lg)/1.45 var(--font-body); color: var(--text); }
.imsl-s-data-grid { display: grid; gap: var(--space-6); margin: auto 0; }
.imsl-s-data-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.imsl-s-data-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* stats: display figures in orange, labels in body text */
.imsl-s-data-stats .imsl-stat b { font: 700 var(--title-3xl)/1 var(--font-display); }
.imsl-s-data-stats .imsl-stat span { font: 500 var(--text-lg)/1.4 var(--font-body); color: var(--text); }
.imsl-s-data-grid--4 .imsl-stat { gap: var(--space-4); padding-top: var(--space-6); border-top: 1px solid var(--line-strong); }
.imsl-s-data-bigstat { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-8); }
/* chart with takeaway */
.imsl-s-data-chartrow { flex-direction: row; gap: var(--space-12); }
.imsl-s-data-chartcol { flex: 2; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.imsl-s-data-legend { display: flex; align-items: center; justify-content: space-between; font: 500 var(--text-sm)/1.3 var(--font-body); color: var(--text-muted); }
.imsl-s-data-legend ul { display: flex; gap: var(--space-6); list-style: none; margin: 0; padding: 0; color: var(--text); font-weight: 600; }
.imsl-s-data-legend li { display: flex; align-items: center; gap: var(--space-2); }
.imsl-s-data-swatch { width: var(--space-4); height: var(--space-4); border-radius: var(--radius-xs); }
.imsl-s-data-svg { display: block; max-width: 100%; }
.imsl-s-data-svg text { font: 500 var(--text-sm)/1 var(--font-body); fill: var(--text-muted); }
.imsl-s-data-svg text.val { font-weight: 700; fill: var(--ink); }
.imsl-s-data-svg line.grid { stroke: var(--chart-grid); stroke-width: 1; }
.imsl-s-data-svg line.axis { stroke: var(--line-strong); stroke-width: 1; }
.s-b0 { fill: var(--chart-3); background: var(--chart-3); }
.s-b1 { fill: var(--chart-1); background: var(--chart-1); }
.imsl-s-data-take { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: var(--space-4); padding: var(--space-8); background: var(--navy-soft); border-radius: var(--r-card); }
.imsl-s-data-take .imsl-stat b { font: 700 var(--title-3xl)/1 var(--font-display); }
/* table and comparison matrix: hairline rows, no zebra */
.imsl-table.imsl-s-data-table { margin: auto 0; }
.imsl-table.imsl-s-data-table th, .imsl-table.imsl-s-data-table td { font: 500 var(--text-lg)/1.3 var(--font-body); padding: var(--space-3) var(--space-4); text-transform: none; letter-spacing: 0; }
.imsl-table.imsl-s-data-table thead th { font-size: var(--text-sm); font-weight: 600; }
.imsl-table.imsl-s-data-table tbody th { text-align: left; font-weight: 600; color: var(--ink); background: transparent; border-bottom: 1px solid var(--line-soft); }
.imsl-table.imsl-s-data-table th.num, .imsl-table.imsl-s-data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.imsl-s-data-matrix { width: 100%; border-collapse: collapse; margin: auto 0; color: var(--text); }
.imsl-s-data-matrix th, .imsl-s-data-matrix td { text-align: left; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line-soft); font: 500 var(--text-lg)/1.3 var(--font-body); }
.imsl-s-data-matrix thead th { font: 700 var(--title-xs)/1.3 var(--font-display); color: var(--ink); vertical-align: bottom; border-bottom: 1px solid var(--line-strong); }
.imsl-s-data-matrix thead th:first-child { font: 600 var(--text-sm)/1.3 var(--font-body); color: var(--text-muted); }
.imsl-s-data-matrix thead th.is-rec { background: var(--navy-soft); color: var(--navy); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.imsl-s-data-recd { display: block; font: 600 var(--text-sm)/1.3 var(--font-body); color: var(--navy); }
.imsl-s-data-matrix tbody th { font-weight: 600; color: var(--ink); }
.imsl-s-data-matrix tbody th, .imsl-s-data-matrix td { width: 25%; }
.imsl-s-data-state { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--navy); font-weight: 600; }
.imsl-s-data-state.is-no { color: var(--text-muted); font-weight: 500; }
/* before and after */
.imsl-s-data-ba { display: grid; grid-template-columns: minmax(0, 1fr) var(--space-16) minmax(0, 1fr); margin: auto 0; align-items: stretch; }
.imsl-s-data-ba__col { display: flex; flex-direction: column; gap: var(--space-6); padding: var(--space-4) 0; }
.imsl-s-data-ba__col .imsl-s-data-h { font-size: var(--title-md); }
.imsl-s-data-ba__col--before .imsl-s-data-h { color: var(--text-muted); }
.imsl-s-data-ba__col--after .imsl-s-data-h { color: var(--navy); }
.imsl-s-data-ba__arrow { position: relative; display: flex; align-items: center; justify-content: center; }
.imsl-s-data-ba__arrow::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--line-strong); }
.imsl-s-data-ba__arrow .imsl-icon { position: relative; padding: var(--space-2) 0; background: var(--bg); color: var(--navy); font-size: var(--title-lg); }
.imsl-s-data-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.imsl-s-data-list li { position: relative; padding-left: var(--space-6); font: 500 var(--title-xs)/1.4 var(--font-body); }
.imsl-s-data-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: var(--space-2); height: var(--space-2); background: currentColor; }
.imsl-s-data-ba__col--before .imsl-s-data-list li { color: var(--text-muted); }
.imsl-s-data-ba__col--after .imsl-s-data-list li { color: var(--ink); }
.imsl-s-data-ba__col--after .imsl-s-data-list li::before { background: var(--navy); }
.imsl-s-data-take .imsl-stat b { color: var(--navy); } /* orange on navy-soft is 2.9:1, below 3:1 for large text */
/* SLIDES:data:end */



/* SLIDES:content:begin */
.imsl-s-content-top { justify-content: flex-start; }
.imsl-s-content-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); font: 400 var(--text-lg)/1.4 var(--font-body); color: var(--text); }
.imsl-s-content-list li { position: relative; padding-left: var(--space-6); }
.imsl-s-content-list li::before { content: ""; position: absolute; left: 0; top: .5em; width: var(--space-2); height: var(--space-2); background: var(--navy); border-radius: var(--radius-xs); }
.imsl-s-content-list--lg { gap: var(--space-5); font-size: var(--title-md); line-height: var(--lh-heading); max-width: 960px; }
.imsl-s-content-list--lg li { padding-left: var(--space-8); }
.imsl-s-content-list--lg li::before { top: .45em; width: var(--space-3); height: var(--space-3); }
.imsl-s-content-list--sm { gap: var(--space-2); }
.imsl-s-content-h { font: 700 var(--title-sm)/1.2 var(--font-display); color: var(--navy); margin: 0 0 var(--space-3); }
.imsl-s-content-cols .imsl-s-content-list { font-size: var(--title-xs); gap: var(--space-5); }
.imsl-s-content-cols .imsl-s-content-h { font-size: var(--title-md); }
.imsl-s-content-p { font: 400 var(--title-xs)/1.5 var(--font-body); color: var(--text); margin: 0; }
.imsl-s-content-lead { font: 400 var(--title-xs)/1.45 var(--font-body); color: var(--text); margin: 0 0 var(--space-5); }
.imsl-s-content-cols { display: grid; grid-template-columns: 1fr 1px 1fr; gap: var(--space-12); }
.imsl-s-content-rule { background: var(--line); }
.imsl-s-content-it__pic { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--slide-w) * .45); }
.imsl-s-content-it__text { position: absolute; left: calc(var(--slide-w) * .45 + var(--space-12)); right: var(--slide-pad); top: var(--slide-pad); }
.imsl-s-content-it__text .imsl-slide__title { font-size: var(--title-lg); }
.imsl-s-content-it__logo { left: calc(var(--slide-w) * .45 + var(--space-12)); }
.imsl-s-content-bleed__pic, .imsl-s-content-bleed__veil { position: absolute; inset: 0; }
.imsl-s-content-bleed__veil { background: var(--band); opacity: .75; }
.imsl-s-content-bleed__logo { position: absolute; top: var(--slide-pad); right: var(--slide-pad); line-height: 0; }
.imsl-s-content-bleed__text { position: absolute; left: var(--slide-pad); bottom: calc(var(--space-24) + var(--space-8)); max-width: 760px; }
.imsl-s-content-bleed__title { font-size: var(--title-2xl); line-height: 1.1; }
.imsl-s-content-bleed__cap { font: 500 var(--text-lg)/1.4 var(--font-body); color: var(--on-navy); margin: var(--space-4) 0 0; }
.imsl-s-content-team { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-8); }
.imsl-s-content-person { display: flex; flex-direction: column; }
.imsl-s-content-person .imsl-slide__pic { width: calc(var(--space-24) * 2); }
.imsl-s-content-name { font: 700 var(--title-xs)/1.2 var(--font-display); color: var(--navy); margin: var(--space-4) 0 var(--space-1); }
.imsl-s-content-role { font: 600 var(--text-md)/1.3 var(--font-body); color: var(--text-muted); }
.imsl-s-content-line { font: 400 var(--text-md)/1.45 var(--font-body); color: var(--text); margin: var(--space-2) 0 0; }
.imsl-s-content-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-10); }
.imsl-s-content-three > div { border-top: 1px solid var(--line); padding-top: var(--space-5); }
.imsl-s-content-result { margin-top: var(--space-10); display: flex; align-items: center; gap: var(--space-6); background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-card); box-shadow: var(--shadow-lift); padding: var(--space-5) var(--space-8); }
.imsl-s-content-result b { font: 700 var(--title-3xl)/1 var(--font-display); color: var(--orange); font-variant-numeric: tabular-nums; }
.imsl-s-content-result span { font: 600 var(--title-xs)/1.4 var(--font-body); color: var(--text); }
.imsl-s-content-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.imsl-s-content-tier { overflow: hidden; }
.imsl-s-content-tier__head { display: flex; align-items: center; justify-content: space-between; min-height: var(--space-16); padding: 0 var(--space-6); background: var(--surface-2); border-bottom: 1px solid var(--line); font: 700 var(--title-xs)/1.2 var(--font-display); color: var(--navy); }
.imsl-s-content-tier--hi { border-color: var(--navy-fill); }
.imsl-s-content-tier--hi .imsl-s-content-tier__head { background: var(--navy-fill); color: var(--on-navy); border-bottom-color: var(--navy-fill); }
.imsl-s-content-tier__body { padding: var(--space-5) var(--space-6) var(--space-6); }
.imsl-s-content-price { font-size: var(--title-lg); font-weight: 700; line-height: 1.1; }
.imsl-s-content-price small { font-size: var(--text-md); }
.imsl-s-content-dur { font: 600 var(--text-md)/1.3 var(--font-body); color: var(--text-muted); margin: var(--space-2) 0 var(--space-4); }
.imsl-s-content-note { font: 400 var(--text-sm)/1.3 var(--font-body); color: var(--text-muted); margin: var(--space-4) 0 0; }
.imsl-s-content-bleed__pic, .imsl-s-content-it__pic { border-radius: 0; }
/* SLIDES:content:end */



/* SLIDES:closers:begin */
.imsl-s-closers-steps { margin-top: var(--space-8); border-top: 1px solid var(--line-soft); }
.imsl-s-closers-step { display: grid; grid-template-columns: 48px 1fr 264px 168px; column-gap: var(--space-6); align-items: center; height: 96px; border-bottom: 1px solid var(--line-soft); }
.imsl-s-closers-step__n { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--navy-fill); color: var(--on-navy); font: 700 var(--title-sm)/1 var(--font-display); border-radius: var(--r-chip); }
.imsl-s-closers-step__act { font: 700 var(--title-xs)/1.3 var(--font-display); color: var(--ink); }
.imsl-s-closers-step__meta { font: 500 var(--text-md)/1.3 var(--font-body); color: var(--text); }
.imsl-s-closers-step__k { display: block; font: 600 var(--text-sm)/1.3 var(--font-body); color: var(--text-muted); }
.imsl-s-closers-tri { position: absolute; right: 0; bottom: 0; width: 96px; height: 96px; background: var(--orange); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.imsl-s-closers-centre { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.imsl-s-closers-wide { max-width: 936px; }
.imsl-slide .imsl-s-closers-huge { font-size: calc(var(--title-3xl) * 2); line-height: var(--lh-display); }
.imsl-s-closers-centre .imsl-lead { margin: 0; }
.imsl-s-closers-addr { margin: var(--space-4) 0 0; font: 600 var(--text-lg)/1.3 var(--font-body); color: var(--on-navy); }
.imsl-s-closers-contacts .imsl-card { min-height: 264px; padding: var(--space-10); }
.imsl-s-closers-contacts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); margin-top: var(--space-10); }
.imsl-s-closers-mail { margin: 0 0 var(--space-3); font: 600 var(--text-lg)/1.3 var(--font-body); color: var(--navy); }
.imsl-s-closers-note { margin: 0; font: 500 var(--text-lg)/1.45 var(--font-body); color: var(--text); }
.imsl-s-closers-refs { margin-top: var(--space-8); max-width: 936px; font-size: var(--text-lg); }
.imsl-s-closers-refs th { font-size: var(--text-sm); }
.imsl-s-closers-refs td:first-child { width: 240px; font-weight: 700; color: var(--ink); }
.imsl-s-closers-endmark { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-6); }
.imsl-s-closers-endmark img { display: block; }
.imsl-s-closers-url { margin: 0; font: 500 var(--text-lg)/1.3 var(--font-body); color: var(--on-navy); }
/* SLIDES:closers:end */

/* INFOGRAPHIC:begin */
/* Infographics (decision 55): runtime/infographic.js draws the SVG; this block is the surface, the lit band and the motion.
   Motion is the website's: rise 24px and fade over --dur-slow on --ease-out, springs on --ease-spring, lines and rings
   draw. It only hides things while the script has armed the figure (.is-armed), so without script, with
   prefers-reduced-motion, or with static: true the end state shows. */
.imsl-ig { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius-xl); color: var(--text); font-family: var(--font-body); }
.imsl-ig svg { display: block; width: 100%; height: auto; overflow: visible; }
.imsl-ig text { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.imsl-ig--band {
  color: var(--on-navy);
  background:
    radial-gradient(ellipse 25% 40% at 10% 12%, color-mix(in srgb, var(--orange) 14%, transparent), transparent),
    radial-gradient(ellipse 30% 45% at 95% 96%, var(--sky-glow), transparent),
    radial-gradient(ellipse 37% 33% at 85% -10%, var(--band-stop-1), transparent),
    radial-gradient(ellipse 26% 26% at -10% 110%, var(--band-stop-2), transparent),
    linear-gradient(160deg, var(--band-stop-3), var(--band-stop-4));
}
.imsl-ig-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.imsl-ig-rise, .imsl-ig-grow, .imsl-ig-pop { transform-box: fill-box; }
.imsl-ig.is-armed .imsl-ig-rise { opacity: 0; transform: translateY(24px); }
.imsl-ig.is-armed .imsl-ig-grow { transform: scaleX(0); transform-origin: left center; }
.imsl-ig.is-armed .imsl-ig-pop { opacity: 0; transform: scale(0); transform-origin: center; }
.imsl-ig.is-armed .imsl-ig-draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.imsl-ig.is-armed .imsl-ig-arc { stroke-dashoffset: var(--len, 1); }

.imsl-ig.is-armed.is-in .imsl-ig-rise { opacity: 1; transform: none;
  transition: opacity var(--dur-slow) var(--ease-out) var(--d, 0ms), transform var(--dur-slow) var(--ease-out) var(--d, 0ms); }
.imsl-ig.is-armed.is-in .imsl-ig-grow { transform: none;
  transition: transform var(--dur-slow) var(--ease-out) var(--d, 0ms); }
.imsl-ig.is-armed.is-in .imsl-ig-pop { opacity: 1; transform: none;
  transition: opacity var(--dur-base) var(--ease-out) var(--d, 0ms), transform var(--dur-scene) var(--ease-spring) var(--d, 0ms); }
.imsl-ig.is-armed.is-in .imsl-ig-draw { stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--dur, 1400ms) var(--ease) var(--d, 0ms); }
.imsl-ig.is-armed.is-in .imsl-ig-arc { stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--dur, 1400ms) var(--ease-out) var(--d, 0ms); }

@media (prefers-reduced-motion: reduce) {
  .imsl-ig.is-armed .imsl-ig-rise, .imsl-ig.is-armed .imsl-ig-grow, .imsl-ig.is-armed .imsl-ig-pop { opacity: 1; transform: none; }
  .imsl-ig.is-armed .imsl-ig-draw, .imsl-ig.is-armed .imsl-ig-arc { stroke-dashoffset: 0; }
}
/* INFOGRAPHIC:end */
/* REVEAL:begin */
/* The website's motion for pages, reports and decks (runtime/reveal.js). The hidden state exists only once the module has set
   html.imsl-rv-js, and only without a reduced-motion preference, so no JS, reduced motion and print all show everything. */
@media (prefers-reduced-motion: no-preference) {
  .imsl-rv-js [data-rv] { opacity: 0; transform: translateY(var(--space-6)); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); transition-delay: calc(var(--rv-i, 0) * var(--stagger)); }
  .imsl-rv-js [data-rv].imsl-rv-in, .imsl-rv-js [data-rv-scope].imsl-rv-in [data-rv] { opacity: 1; transform: none; }
  /* line draw: the module sets pathLength="1", so one dash covers the whole stroke */
  .imsl-rv-js [data-rv-draw] { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset calc(var(--dur-slow) * 2) var(--ease-out); transition-delay: calc(var(--rv-i, 0) * var(--stagger)); }
  .imsl-rv-js [data-rv-draw].imsl-rv-in, .imsl-rv-js [data-rv-scope].imsl-rv-in [data-rv-draw] { stroke-dashoffset: 0; }
}
/* Navy-band glows: three soft orbs behind the content that breathe slowly, lean to the pointer and drift with scroll
   (the module sets --ox and --oy). The host is any navy band; the module adds .imsl-glow-host and the .imsl-glow-fx layer. */
.imsl-glow-host { position: relative; isolation: isolate; }
.imsl-glow-fx { --imsl-glow-orange: radial-gradient(closest-side, color-mix(in srgb, var(--orange) 35%, transparent), transparent); --imsl-glow-sky: radial-gradient(closest-side, var(--sky-glow), transparent);
  position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.imsl-glow-orb { position: absolute; border-radius: 50%; opacity: .55; will-change: transform; transform: translate3d(var(--ox, 0px), var(--oy, 0px), 0); }
.imsl-glow-orb::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: imsl-glow-breathe 18s var(--ease) infinite alternate; }
.imsl-glow-orb--a { width: var(--glow-lg); height: var(--glow-lg); left: calc(var(--glow-lg) * -.25); top: calc(var(--glow-lg) * -.33); background: var(--imsl-glow-orange); }
.imsl-glow-orb--b { width: var(--glow-md); height: var(--glow-md); right: calc(var(--glow-md) * -.31); top: calc(var(--glow-md) * .31); background: var(--imsl-glow-sky); }
.imsl-glow-orb--b::before { animation-duration: 23s; animation-delay: -6s; animation-direction: alternate-reverse; }
.imsl-glow-orb--c { width: var(--glow-sm); height: var(--glow-sm); left: calc(var(--glow-sm) * .875); bottom: calc(var(--glow-sm) * -.58); background: var(--imsl-glow-sky); }
.imsl-glow-orb--c::before { animation-duration: 29s; animation-delay: -11s; }
@keyframes imsl-glow-breathe { from { scale: 1; rotate: 0deg; } to { scale: 1.18; rotate: 12deg; } }
@media (prefers-reduced-motion: reduce) { .imsl-glow-orb { transform: none !important; } .imsl-glow-orb::before { animation: none !important; } }
/* REVEAL:end */

/* REPORT:begin */
/* HTML report (scripts/gen-report.js): a navy cover band, a sticky contents rail, one reading column, and a clean A4 print. Tokens only. */
.imsl-rp { background: var(--bg); color: var(--text); }
html:has(.imsl-rp) { scroll-padding-top: var(--space-6); }
@media (prefers-reduced-motion: no-preference) { html:has(.imsl-rp) { scroll-behavior: smooth; } }
.imsl-rp-skip { position: fixed; left: var(--space-4); top: var(--space-3); z-index: var(--z-toast); transform: translateY(-200%); }
.imsl-rp-skip:focus { transform: none; }

/* cover: the band gradient of the website and the deck, the glows behind it, the reverse logo */
.imsl-rp-cover { position: relative; isolation: isolate; overflow: hidden; color: var(--on-navy); padding: var(--space-12) var(--gutter) var(--space-24);
  background: var(--grad-band); }
.imsl-rp-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(var(--grid-dot) 1px, transparent 1.5px) 0 0 / var(--grid-size) var(--grid-size); -webkit-mask-image: radial-gradient(120% 90% at 85% 0%, var(--ink) 0%, transparent 70%); mask-image: radial-gradient(120% 90% at 85% 0%, var(--ink) 0%, transparent 70%); }
.imsl-rp-cover__in { position: relative; max-width: var(--container); margin: 0 auto; min-height: 60vh; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-16); }
.imsl-rp-logo { display: block; height: var(--space-16); width: auto; align-self: flex-start; }
.imsl-rp-cover__body { max-width: 56rem; }
.imsl-rp-rule { display: block; width: var(--space-16); height: var(--bar); background: var(--orange); margin-bottom: var(--space-6); border-radius: var(--radius-full); }
.imsl-rp-cover .imsl-eyebrow { color: var(--on-navy); }
.imsl-rp-title { margin: 0; font: 700 clamp(var(--title-xl), 5vw, var(--title-3xl))/var(--lh-heading) var(--font-display); color: var(--on-navy); text-wrap: balance; }
.imsl-rp-sub { margin: var(--space-5) 0 0; max-width: 40rem; font: 400 var(--text-lg)/1.5 var(--font-body); color: var(--on-navy); opacity: .9; }
.imsl-rp-meta { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-12); margin: 0; padding-top: var(--space-5); border-top: 1px solid var(--line-strong); }
.imsl-rp-meta dt { font: 600 var(--text-xs)/1.3 var(--font-body); letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.imsl-rp-meta dd { margin: var(--space-1) 0 0; font: 600 var(--text-md)/1.3 var(--font-body); }

/* layout: contents rail on the left, one reading column */
.imsl-rp-layout { max-width: var(--container); margin: 0 auto; padding: var(--space-10) var(--gutter) var(--space-24); display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); gap: var(--space-12); align-items: start; }
.imsl-rp-rail { position: sticky; top: var(--space-6); max-height: calc(100vh - var(--space-12)); overflow: auto; padding-top: var(--space-2); }
.imsl-rp-rail__toggle { display: none; }
.imsl-rp-rail__title { margin: 0 0 var(--space-3) var(--space-4); }
.imsl-rp-toc { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.imsl-rp-toc a { display: block; margin-left: -1px; padding: var(--space-2) var(--space-4); border-left: var(--focus-width) solid transparent; color: var(--text-muted); text-decoration: none; font: 500 var(--text-sm)/1.35 var(--font-body); transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
@media (hover: hover) { .imsl-rp-toc a:hover { color: var(--navy); } }
.imsl-rp-toc a[aria-current="true"] { color: var(--navy); border-left-color: var(--orange); font-weight: 700; }
.imsl-rp-main { min-width: 0; counter-reset: rp-sec rp-fig rp-tab; }

.imsl-rp-section { padding-top: var(--space-10); }
.imsl-rp-section:first-child { padding-top: 0; }
.imsl-rp-section h2 { margin: 0 0 var(--space-5); font: 700 var(--title-md)/1.25 var(--font-display); color: var(--navy); }
.imsl-rp-section:not(.imsl-rp-summary):not(.imsl-rp-section--plain) h2::before { counter-increment: rp-sec; content: counter(rp-sec, decimal-leading-zero); display: block; margin-bottom: var(--space-2); font: 600 var(--text-xs)/1.3 var(--font-body); letter-spacing: .12em; color: var(--orange-text); }
.imsl-rp-section h3 { margin: var(--space-8) 0 var(--space-3); font: 700 var(--title-xs)/1.3 var(--font-display); color: var(--ink); }
.imsl-rp-section p, .imsl-rp-list { max-width: var(--container-narrow); margin: 0 0 var(--space-4); font: 400 var(--text-body)/1.6 var(--font-body); color: var(--text); }
.imsl-rp-list { padding-left: var(--space-6); }
.imsl-rp-list li { margin-bottom: var(--space-2); }
.imsl-rp-list--nested { margin: var(--space-2) 0 0; padding-left: var(--space-6); max-width: none; font-size: inherit; }
ul.imsl-rp-list--nested { list-style: circle; }
.imsl-rp-inline { display: inline-block; vertical-align: text-bottom; max-width: 100%; height: 1.4em; width: auto; }
.imsl-rp-section code { font: 400 .9em var(--font-mono); background: var(--surface-2); padding: 0 var(--space-1); border-radius: var(--radius-sm); }
.imsl-rp-section a:not(.imsl-btn) { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.imsl-rp-section .imsl-callout { max-width: var(--container-narrow); margin: var(--space-6) 0; }
.imsl-rp-quote { max-width: var(--container-narrow); margin: var(--space-6) 0; padding: 0 0 0 var(--space-5); border-left: var(--bar) solid var(--orange); }
.imsl-rp-quote p { font: 400 var(--text-lg)/1.5 var(--font-display); font-style: italic; color: var(--ink); }

/* summary (bottom line up front) and key figures */
.imsl-rp-bluf { padding: var(--space-6) var(--space-8); border-radius: var(--r-card); background: var(--navy-soft); border-left: var(--bar) solid var(--orange); box-shadow: var(--shadow-lift); }
.imsl-rp-bluf .imsl-eyebrow { margin-bottom: var(--space-3); }
.imsl-rp-section .imsl-rp-bluf__text { max-width: none; margin: 0 0 var(--space-3); font: 500 var(--text-lg)/1.5 var(--font-body); color: var(--ink); }
.imsl-rp-bluf__text:last-child { margin-bottom: 0; }
.imsl-rp-stats { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-4); }
.imsl-rp-stats li { padding: var(--space-4) var(--space-5); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.imsl-rp-stats b { display: block; font: 700 var(--title-lg)/1.1 var(--font-display); color: var(--navy); font-variant-numeric: tabular-nums; }
.imsl-rp-stats span { display: block; margin-top: var(--space-2); font: 500 var(--text-sm)/1.4 var(--font-body); color: var(--text-muted); }

/* figures and tables */
.imsl-rp-figure { margin: var(--space-8) 0; break-inside: avoid; }
.imsl-rp-figure__media { padding: var(--space-4); border: 1px solid var(--line-soft); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.imsl-rp-figure__media svg, .imsl-rp-figure__media img { display: block; width: 100%; height: auto; }
.imsl-rp-figure figcaption { margin-top: var(--space-3); font: 400 var(--text-sm)/1.45 var(--font-body); color: var(--text-muted); }
.imsl-rp-figure figcaption::before { counter-increment: rp-fig; content: "Figure " counter(rp-fig) ". "; font-weight: 700; color: var(--ink); }
.imsl-rp-source { display: block; margin-top: var(--space-1); font-size: var(--text-xs); }
.imsl-rp-table { margin: var(--space-8) 0; }
.imsl-rp-tcap { margin: 0 0 var(--space-3); font: 400 var(--text-sm)/1.45 var(--font-body); color: var(--text-muted); }
.imsl-rp-section .imsl-rp-tcap { max-width: none; font-size: var(--text-sm); margin-bottom: var(--space-3); }
.imsl-rp-tcap::before { counter-increment: rp-tab; content: "Table " counter(rp-tab) ". "; font-weight: 700; color: var(--ink); }
.imsl-rp-refs .imsl-rp-table:has(.imsl-rp-tcap) { margin-top: var(--space-6); }

/* notes */
.imsl-rp-notelist { margin: 0; padding-left: var(--space-6); font: 400 var(--text-sm)/1.5 var(--font-body); color: var(--text-muted); }
.imsl-rp-notelist li { margin-bottom: var(--space-2); }
.imsl-rp-fnref a { text-decoration: none; padding: 0 var(--space-1); font-weight: 700; }
.imsl-rp-fnback { margin-left: var(--space-1); text-decoration: none; }

/* phone and narrow screens: the rail becomes a button that opens the contents above the text */
@media (max-width: 960px) {
  .imsl-rp-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); padding-top: var(--space-6); }
  .imsl-rp-rail { position: static; max-height: none; overflow: visible; padding: 0; }
  .imsl-rp-rail__toggle { display: inline-flex; }
  .imsl-rp-rail__title { display: none; }
  .imsl-rp-toc { display: none; margin-top: var(--space-3); }
  .imsl-rp-toc.is-open { display: block; }
  .imsl-rp-cover { padding-bottom: var(--space-16); }
  .imsl-rp-cover__in { min-height: 0; gap: var(--space-10); }
  .imsl-rp-bluf { padding: var(--space-5); }
}

/* REPORT:end */

/* ANALYST:begin */
/* Analyst-app parts (decision 69): Avatar, Kbd, Skeleton, Spinner, IconWell, PlanCard, EntityChip, FilterChip, VerticalNav */
.imsl-avatar { flex: none; display: inline-grid; place-items: center; width: var(--space-8); height: var(--space-8); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-full); background: var(--navy-soft); color: var(--navy); font: 600 var(--text-sm)/1 var(--font-body); }
.imsl-avatar--lg { width: var(--control-h); height: var(--control-h); }
button.imsl-avatar { cursor: pointer; }
button.imsl-avatar:hover { border-color: var(--navy); }
.imsl-kbd { padding: 0 var(--space-1); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: var(--radius-xs); background: var(--surface-2); color: var(--text-muted); font: 500 var(--text-xs)/1.4 var(--font-mono); white-space: nowrap; }
.imsl-skel { display: block; border-radius: var(--radius-xs); background: var(--surface-2); animation: imsl-skel-pulse 1.4s var(--ease) infinite alternate; }
@keyframes imsl-skel-pulse { from { opacity: 1; } to { opacity: .55; } }
.imsl-spinner { flex: none; display: inline-block; width: var(--icon-md); height: var(--icon-md); border: 2px solid var(--line-strong); border-top-color: var(--navy); border-radius: var(--radius-full); animation: imsl-spinner-turn .8s linear infinite; }
@keyframes imsl-spinner-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .imsl-skel, .imsl-spinner { animation: none; } }
.imsl-well { flex: none; display: inline-grid; place-items: center; width: var(--space-10); height: var(--space-10); border-radius: var(--radius-md); background: var(--navy-soft); color: var(--navy); }
.imsl-well--sm { width: var(--space-8); height: var(--space-8); border-radius: var(--radius-sm); }
.imsl-well--sky { color: var(--map-5); } .imsl-well--violet { color: var(--map-4); } .imsl-well--green { color: var(--map-3); } .imsl-well--amber { color: var(--map-6); }
.imsl-plan { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); border: 1px solid var(--line-soft); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow-lift); }
.imsl-plan--current { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.imsl-plan__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.imsl-plan__price { margin: 0; color: var(--ink); font: 700 var(--title-xs)/1.2 var(--font-display); }
.imsl-plan__price .imsl-small { font-family: var(--font-body); font-weight: 400; }
.imsl-plan ul { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; color: var(--text-muted); font: 400 var(--text-sm)/1.4 var(--font-body); }
.imsl-plan li { display: flex; gap: var(--space-2); }
.imsl-plan li .imsl-icon { color: var(--success-text); font-size: var(--icon-sm); }
.imsl-ent { --ent: var(--map-8); display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--space-6); padding: 0 var(--space-3); border-radius: var(--r-chip); background: color-mix(in srgb, var(--ent) 14%, transparent); color: var(--ink); font: 600 var(--text-xs)/1 var(--font-body); white-space: nowrap; }
.imsl-ent::before { content: ""; width: var(--space-2); height: var(--space-2); border-radius: var(--radius-full); background: var(--ent); }
.imsl-ent--person { --ent: var(--map-7); } .imsl-ent--org { --ent: var(--map-4); } .imsl-ent--location { --ent: var(--map-3); } .imsl-ent--email { --ent: var(--map-5); } .imsl-ent--phone { --ent: var(--map-6); } .imsl-ent--ip { --ent: var(--map-5); } .imsl-ent--btc { --ent: var(--map-6); } .imsl-ent--date { --ent: var(--map-8); } .imsl-ent--object { --ent: var(--map-3); } .imsl-ent--file { --ent: var(--map-8); } .imsl-ent--session { --ent: var(--map-1); }
.imsl-ent--custom { outline: 1px dashed var(--map-8); outline-offset: -1px; }
.imsl-ent--custom::before { border-radius: var(--radius-xs); }
.imsl-chip { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--space-10); padding: 0 var(--space-4); border: 1px solid var(--line); border-radius: var(--r-chip); background: var(--surface); color: var(--text-muted); font: 500 var(--text-sm)/1 var(--font-body); white-space: nowrap; cursor: pointer; }
.imsl-chip:hover { border-color: var(--navy); color: var(--text); }
.imsl-chip[aria-pressed="true"] { border-color: var(--navy); background: var(--navy-soft); color: var(--navy); font-weight: 600; }
.imsl-chip[aria-pressed="true"]::before { content: "check"; font: 300 var(--icon-sm)/1 'Material Symbols Outlined'; }
@media (pointer: coarse) { .imsl-chip { min-height: var(--field-h); } }
.imsl-vnav { display: grid; gap: var(--space-1); align-content: start; }
.imsl-vnav a, .imsl-vnav button { display: flex; align-items: center; gap: var(--space-3); min-height: var(--control-h-sm); padding: 0 var(--space-3); border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: 500 var(--text-sm)/1 var(--font-body); text-align: left; text-decoration: none; cursor: pointer; }
.imsl-vnav a:hover, .imsl-vnav button:hover { background: var(--navy-soft); }
.imsl-vnav [aria-current="page"], .imsl-vnav [aria-selected="true"] { background: var(--navy-soft); color: var(--navy); font-weight: 600; box-shadow: inset var(--stroke-emphasis) 0 0 var(--navy); }
.imsl-vnav [aria-current="page"] .imsl-icon, .imsl-vnav [aria-selected="true"] .imsl-icon { font-variation-settings: 'wght' 300, 'FILL' 1, 'GRAD' 0, 'opsz' 24; }
.imsl-vnav .imsl-vnav__danger { color: var(--error-text); }
.imsl-menu__item--danger, .imsl-menu__item--danger .imsl-icon { color: var(--error-text); }
@media (pointer: coarse) { .imsl-menu__item { min-height: var(--control-h); } }
/* ANALYST:end */

/* ==== v2 screen layer (decision 74, ADR 0005): the look every screen has, with no opt-in ====================================
   Moved here from design/web/web.css and unscoped. The prefix keeps the weight the old [data-skin="web"] scope gave each rule.
   Components that have a plain rule above (buttons, badges, fields, cards, callouts, empty states, dialogs, menus, popovers,
   toasts, tables, stats, the console, tabs and the website pieces) carry their v2 values in that rule: there is ONE rule set
   per component. This layer keeps the shell, the band, ambient light, motion and the new classes. Print, documents and email are
   held flat by the guards at the end of flat.css.

   What this layer does:
     grounds   ambient glows behind everything; a glass topbar; the rail as a floating glass panel
     page head a navy band with the website's gradient, a dot grid and a passing light beam; the h1 decodes in
     shape     the large radii (cards 20px, panels 40px and 28px on phones), pill chips and badges, 48px controls
     depth     lifted shadows instead of hairline-only; a card lifts and a light follows the pointer over it
     action    the primary button glows orange and its arrow nudges; a sheen crosses it on hover
     motion    content floats up as it arrives, numbers count up, the current rail item has a sliding marker
   New classes: .imsl-ambient (+ __orb, __cursor, built by motion.js) .imsl-band .imsl-band__glow .imsl-stats .imsl-stat .imsl-live
   .imsl-dock .imsl-search .imsl-ticker .imsl-glass .imsl-skeleton .imsl-rail__marker. Every motion has a still state under reduced motion. */

/* =================================================================================================================
   Grounds
   ================================================================================================================= */
body { background: var(--bg); }
.imsl-shell { isolation: isolate; background: var(--bg); }
.imsl-shell > :not(.imsl-ambient):not(.imsl-skip) { position: relative; z-index: 1; }

/* Ambient: glows that breathe, drift with scroll and lean towards the pointer, plus a soft cursor light (website fx-bg). */
.imsl-ambient { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.imsl-ambient__orb { position: absolute; border-radius: 50%; opacity: .5; will-change: transform; }
.imsl-ambient__orb--a { width: 56vmax; height: 56vmax; left: -18vmax; top: -22vmax; background: var(--grad-glow-orange); opacity: .32; animation: imsl-breathe var(--dur-breathe-a) var(--ease) infinite alternate; }
.imsl-ambient__orb--b { width: 50vmax; height: 50vmax; right: -18vmax; top: 30vh; background: var(--grad-glow-sky); animation: imsl-breathe var(--dur-breathe-b) var(--ease) -6s infinite alternate-reverse; }
.imsl-ambient__orb--c { width: 36vmax; height: 36vmax; left: 34vw; bottom: -20vmax; background: var(--grad-glow-lilac); opacity: .45; animation: imsl-breathe var(--dur-breathe-c) var(--ease) -11s infinite alternate; }
.imsl-ambient__cursor { position: absolute; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; background: var(--grad-glow-sky); opacity: 0; transition: opacity var(--dur-slow) var(--ease); will-change: transform; }
.imsl-ambient.is-live .imsl-ambient__cursor { opacity: .55; }
:root[data-theme="dark"] .imsl-ambient__orb--a { opacity: .4; }
@keyframes imsl-breathe { from { scale: 1; rotate: 0deg; } to { scale: 1.18; rotate: 12deg; } }

/* =================================================================================================================
   Shell: glass topbar, floating rail, transparent main so the ambient light shows through
   ================================================================================================================= */
.imsl-topbar { background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-bottom-color: var(--glass-line); height: calc(var(--topbar-h) + var(--space-2)); }
.imsl-apptag__name { font-weight: 600; letter-spacing: -0.005em; }
.imsl-apptag__name .imsl-icon { display: inline-grid; place-items: center; width: var(--control-h-sm); height: var(--control-h-sm); border-radius: var(--radius-md); background: var(--navy-soft); color: var(--navy); font-size: var(--icon-md); }
.imsl-topbar .imsl-btn--ghost.imsl-btn--icon { border: 1px solid var(--glass-line); background: var(--glass-strong); }

.imsl-shell__body { gap: 0; }
.imsl-shell__body > .imsl-rail {
  width: var(--rail-w-web); margin: var(--space-4) 0 var(--space-4) var(--space-4); padding: var(--space-3);
  border: 1px solid var(--glass-line); border-radius: var(--r-panel); background: var(--glass-strong);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow-lift); position: relative;
}
/* Collapsed: icon width. The rule above outweighs v1's `.imsl-rail[data-collapsed]`, so the collapsed rail kept its full
   width with the icons centred in it (found in PersonInvestigator and others). v1's 64px plus the card's inset. */
.imsl-shell__body > .imsl-rail[data-collapsed] { width: calc(var(--topbar-h) + var(--space-2)); padding-inline: var(--space-2); }
.imsl-rail[data-collapsed] a { justify-content: center; padding-inline: 0; }
.imsl-rail a { position: relative; z-index: 1; min-height: var(--control-h); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); transition: color var(--dur-base) var(--ease), background-color var(--dur-base) var(--ease); }
.imsl-rail a .imsl-icon { transition: transform var(--dur-base) var(--ease-spring); }
@media (hover: hover) { .imsl-rail a:not([aria-current="page"]):hover { background: color-mix(in srgb, var(--navy-soft) 60%, transparent); } .imsl-rail a:hover .imsl-icon { transform: scale(1.12); } }
.imsl-rail__label { letter-spacing: .14em; }
/* The current item: navy-soft ground and an orange bar, drawn by the marker when motion.js runs, else by the item itself. */
.imsl-rail a[aria-current="page"] { background: var(--navy-soft); }
.imsl-rail a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 25%; bottom: 25%; width: var(--bar); border-radius: var(--radius-full); background: var(--orange); }
.imsl-rail.has-marker a[aria-current="page"] { background: transparent; }
.imsl-rail.has-marker a[aria-current="page"]::before { content: none; }
.imsl-rail.has-marker { position: relative; }
.imsl-rail__marker { position: absolute; z-index: 0; left: 0; top: 0; border-radius: var(--radius-md); background: var(--navy-soft); pointer-events: none; transition: transform var(--dur-pop) var(--ease-spring), width var(--dur-pop) var(--ease-spring), height var(--dur-pop) var(--ease-spring), opacity var(--dur-base); }
.imsl-rail__marker::before { content: ""; position: absolute; left: 0; top: 25%; bottom: 25%; width: var(--bar); border-radius: var(--radius-full); background: var(--orange); }
.imsl-rail__foot { border-top-color: var(--glass-line); }

.imsl-shell__main { background: transparent; padding: var(--space-4) var(--space-8) var(--space-12); }
/* Full width (decision 73): the page head band and everything under it fill the main column, at every screen width
   and with the rail open or collapsed. v1 capped the content at --container, so on a wide screen forms and tables
   stopped well short of the band. Running text keeps a readable measure instead: the head's lead (62ch, above) and
   paragraphs directly in the view (72ch). Never put a max-width on a form, control row, table or panel. */
.imsl-shell__content { max-width: none; gap: var(--space-6); }
.imsl-shell__view > p, .imsl-shell__view > .imsl-lead { max-width: 72ch; }

/* Phones and tablets: the rail is v1's strip; it keeps its glass, loses its float. */
@media (max-width: 1023px) {
  .imsl-shell__body > .imsl-rail { width: auto; margin: 0; border-radius: 0; border-width: 0 0 1px; box-shadow: none; }
  .imsl-shell__body > .imsl-rail[data-collapsed] { width: auto; }
  .imsl-rail[data-collapsed] a { justify-content: flex-start; padding-inline: var(--space-3); }
  .imsl-shell__main { padding: var(--space-4) var(--space-4) var(--space-10); }
}

/* =================================================================================================================
   Page head: the band. eyebrow, h1, lead and the status line sit on the website's navy gradient.
   ================================================================================================================= */
.imsl-band,
.imsl-shell__head {
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-panel);
  background: var(--grad-band); color: var(--on-navy); box-shadow: var(--shadow-ui);
  padding: clamp(var(--space-8), 4vw, var(--space-12)) clamp(var(--space-6), 4vw, var(--space-12));
}
.imsl-shell__head { gap: var(--space-3); padding-bottom: clamp(var(--space-8), 4vw, var(--space-10)); }
/* The grid and the beam are two layers on the band, both decorative. */
.imsl-band::before,
.imsl-shell__head::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(var(--grid-dot) 1px, transparent 1.5px) 0 0 / var(--grid-size) var(--grid-size);
  -webkit-mask-image: radial-gradient(120% 90% at 85% 0%, var(--ink) 0%, transparent 70%); mask-image: radial-gradient(120% 90% at 85% 0%, var(--ink) 0%, transparent 70%);
}
.imsl-band::after,
.imsl-shell__head::after {
  content: ""; position: absolute; inset: -20% -60%; z-index: -1; pointer-events: none; background: var(--scan);
  transform: translateX(-60%); animation: imsl-scan var(--dur-scan) var(--ease) infinite;
}
@keyframes imsl-scan { 0%, 55% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
/* An orange glow in the lower right corner of the band, as on the website's closer. */
.imsl-band__glow, .imsl-shell__glow { position: absolute; z-index: -1; right: -120px; bottom: -220px; width: 460px; height: 460px; border-radius: 50%; background: var(--grad-glow-orange); opacity: .5; pointer-events: none; animation: imsl-breathe var(--dur-breathe-a) var(--ease) infinite alternate; }

.imsl-shell__head .imsl-eyebrow,
.imsl-band .imsl-eyebrow { color: var(--on-navy); display: inline-flex; align-items: center; gap: var(--space-2); }
.imsl-shell__head .imsl-h1,
.imsl-band .imsl-h1 { color: var(--on-navy); font-size: var(--display-md); line-height: 1.08; letter-spacing: -0.015em; text-wrap: balance; max-width: 22ch; }
.imsl-shell__head .imsl-lead,
.imsl-band .imsl-lead { color: color-mix(in srgb, var(--on-navy) 92%, transparent); max-width: 62ch; }
.imsl-shell__head .imsl-small[role="status"] { color: color-mix(in srgb, var(--on-navy) 92%, transparent); margin-top: var(--space-2); font-variant-numeric: tabular-nums; }
.imsl-shell__head .imsl-small[role="status"] strong { color: var(--on-navy); font-weight: 700; }
.imsl-shell__head .imsl-small[role="status"] .imsl-live { margin-right: var(--space-2); }
.imsl-shell__head .imsl-small[role="status"][hidden] { display: none; }
.imsl-shell__head .imsl-crumbs, .imsl-shell__head .imsl-crumbs a { color: color-mix(in srgb, var(--on-navy) 92%, transparent); }
/* The orange bar before every eyebrow (website .eyebrow). */
.imsl-eyebrow:not(.imsl-eyebrow--muted):not(.imsl-eyebrow--flush) { display: inline-flex; align-items: center; gap: var(--space-2); letter-spacing: .12em; }
.imsl-eyebrow:not(.imsl-eyebrow--muted):not(.imsl-eyebrow--flush)::before { content: ""; width: var(--space-4); height: var(--bar); border-radius: var(--radius-full); background: var(--orange); flex: none; }
/* Compact band (decision 72): every page in an app has the same navy band head. Working pages (large tables, chat, maps,
   editors, 3D) add .imsl-shell--compacthead to the shell root: the same gradient, colours, eyebrow and title face, with
   less height and padding, no scan beam and no headline decode (motion.js). .imsl-shell--plainhead (decision 71,
   withdrawn) is kept as an alias, so an app that marked its working pages plain gets the compact band on its next sync. An app that draws its own head
   (mirrormaze) uses .imsl-band.imsl-band--compact the same way. */
:is(:is(.imsl-shell--compacthead, .imsl-shell--plainhead) .imsl-shell__head, .imsl-band--compact) { gap: var(--space-2); padding: var(--space-5) clamp(var(--space-5), 3vw, var(--space-8)); border-radius: var(--r-card); }
:is(:is(.imsl-shell--compacthead, .imsl-shell--plainhead) .imsl-shell__head, .imsl-band--compact)::after { display: none; }
:is(:is(.imsl-shell--compacthead, .imsl-shell--plainhead) .imsl-shell__glow, .imsl-band--compact .imsl-band__glow) { width: calc(var(--space-12) * 6); height: calc(var(--space-12) * 6); right: calc(var(--space-12) * -2); bottom: calc(var(--space-12) * -3.5); }
:is(:is(.imsl-shell--compacthead, .imsl-shell--plainhead) .imsl-shell__head, .imsl-band--compact) .imsl-h1 { font-size: var(--display-sm); max-width: none; }
:is(:is(.imsl-shell--compacthead, .imsl-shell--plainhead) .imsl-shell__head, .imsl-band--compact) .imsl-lead { font-size: var(--text-md); }
:is(:is(.imsl-shell--compacthead, .imsl-shell--plainhead) .imsl-shell__head, .imsl-band--compact) .imsl-small[role="status"] { margin-top: 0; }

/* The page's first control docks onto the band's lower edge (the website's hero search): add .imsl-dock to it. */
.imsl-dock { position: relative; z-index: 2; margin-top: calc(-1 * var(--space-12)); margin-inline: clamp(var(--space-4), 3vw, var(--space-10)); padding: var(--space-5); border-radius: var(--r-panel); background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-line); box-shadow: var(--shadow-hover); }
.imsl-shell__head:has(+ * + .imsl-shell__view .imsl-dock), .imsl-shell__head:has(~ .imsl-shell__view .imsl-dock) { padding-bottom: calc(var(--space-12) + var(--space-8)); }
@media (max-width: 640px) { .imsl-dock { margin-inline: var(--space-2); padding: var(--space-4); } }

/* =================================================================================================================
   Type
   ================================================================================================================= */
/* On a band, headings keep v1's on-navy (the two rules above would otherwise win by load order). */
:is(.imsl-band, .imsl-shell__head) :is(.imsl-h2, .imsl-h3) { color: var(--on-navy); }
.imsl-hl { color: var(--orange-text); }
.imsl-band .imsl-hl, .imsl-shell__head .imsl-hl { color: var(--orange); }
.imsl-link { text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--dur-base); }

/* =================================================================================================================
   Actions
   ================================================================================================================= */
.imsl-btn:active:not([disabled]) { transform: scale(.97); }
.imsl-btn .imsl-icon:last-child:not(:first-child) { transition: transform var(--dur-base) var(--ease-out); }
@media (hover: hover) { .imsl-btn:hover .imsl-icon:last-child:not(:first-child) { transform: translateX(var(--space-1)); } }
/* A disabled button stays flat: no glow, no lift, no sheen (CoAnalyst's Send and Scrapers' Ask looked live). */
.imsl-btn.imsl-btn:is(:disabled, [aria-disabled="true"]) { box-shadow: none; transform: none; }
.imsl-btn.imsl-btn:is(:disabled, [aria-disabled="true"])::after { display: none; }
.imsl-btn--primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--sheen); transform: translateX(-120%); transition: transform var(--dur-slow) var(--ease-out); }
@media (hover: hover) { .imsl-btn--primary:hover::after { transform: translateX(120%); } .imsl-btn--primary:hover { transform: translateY(-1px); } }
.imsl-band .imsl-btn--outline, .imsl-shell__head .imsl-btn--outline { color: var(--on-navy); border-color: var(--glass-on-band-line); background: var(--glass-on-band); }

/* Chips and badges are pills (website .chip and .status). */
.imsl-band .imsl-badge--neutral, .imsl-shell__head .imsl-badge--neutral { background: var(--glass-on-band); color: var(--on-navy); }

/* The search field as the website's hero search: a big pill with the glyph inside. Add .imsl-search to the field. */
.imsl-search { display: grid; grid-template-columns: minmax(0, 1fr); }
.imsl-search > .imsl-label { grid-row: 1; }
.imsl-search > .imsl-input { grid-row: 2; grid-column: 1; height: calc(var(--field-h) + var(--space-4)); border-radius: var(--radius-full); padding-left: calc(var(--space-6) + var(--icon-lg) + var(--space-3)); font-size: var(--text-lg); box-shadow: var(--shadow-lift); }
.imsl-search > .imsl-hint { grid-row: 3; padding-left: var(--space-6); }
.imsl-search::after { content: "search"; grid-row: 2; grid-column: 1; align-self: center; justify-self: start; margin-left: var(--space-6); font-family: "Material Symbols Outlined"; font-size: var(--icon-lg); line-height: 1; color: var(--navy); pointer-events: none; font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24; }

/* =================================================================================================================
   Cards and panels: big radii, lifted, a light that follows the pointer
   ================================================================================================================= */
.imsl-glass { border-radius: var(--r-card); background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-line); box-shadow: var(--shadow-lift); }

@keyframes imsl-pop { from { opacity: 0; transform: translateY(calc(-1 * var(--space-3))) scale(.96); } }


/* =================================================================================================================
   New components
   ================================================================================================================= */
/* Stats: big figures that count up (motion.js reads data-count) with a label under each. */
.imsl-stats { display: flex; flex-wrap: wrap; gap: var(--space-3) clamp(var(--space-6), 4vw, var(--space-12)); margin: 0; padding: 0; list-style: none; }
.imsl-stat__n .imsl-hl { color: var(--orange); }

/* Live: a dot that pulses, always with its word ("Live", "Syncing", "Up to date"). */
.imsl-live { display: inline-flex; align-items: center; gap: var(--space-2); font: 600 var(--text-xs)/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--success-text); }
.imsl-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 60%, transparent); animation: imsl-pulse var(--dur-pulse) var(--ease-out) infinite; }
:is(.imsl-band, .imsl-shell__head) .imsl-live { color: var(--on-navy); }
@keyframes imsl-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }

/* Ticker: a slow marquee of chips (website logo strip). The track holds the list twice. */
.imsl-ticker { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, var(--ink) 8%, var(--ink) 92%, transparent); mask-image: linear-gradient(90deg, transparent, var(--ink) 8%, var(--ink) 92%, transparent); }
.imsl-ticker__track { display: flex; gap: var(--space-3); width: max-content; animation: imsl-marquee var(--dur-marquee) linear infinite; }
@media (hover: hover) { .imsl-ticker:hover .imsl-ticker__track { animation-play-state: paused; } }
@keyframes imsl-marquee { to { transform: translateX(-50%); } }

/* Skeleton: a shimmering placeholder while data loads. */
.imsl-skeleton { border-radius: var(--radius-md); background: linear-gradient(90deg, var(--surface-2) 0%, var(--bg-alt) 40%, var(--surface-2) 80%) 0 0 / 300% 100%; animation: imsl-shimmer 1.6s linear infinite; min-height: var(--space-4); }
@keyframes imsl-shimmer { to { background-position: -150% 0; } }
/* Skeleton view (decision 81): the blocks laid out as what is loading. runtime/ui.js skeletonState(), React SkeletonView. */
.imsl-skelview { display: grid; gap: var(--space-3); padding: var(--space-2) 0; }
.imsl-skelview > .imsl-skeleton { display: block; height: var(--space-5); }
.imsl-skelview--list > .imsl-skeleton:nth-of-type(3n + 1) { width: 86%; }
.imsl-skelview--list > .imsl-skeleton:nth-of-type(3n) { width: 64%; }
.imsl-skelview--cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--space-4); }
.imsl-skelview--cards > .imsl-skeleton { height: var(--space-24); border-radius: var(--r-card); }
.imsl-skelview--cards > .imsl-sr-only, .imsl-skelview--table > .imsl-sr-only { grid-column: 1 / -1; }
.imsl-skelview--table { gap: var(--space-2); }
.imsl-skelview--table > .imsl-skeleton { height: var(--space-8); }
.imsl-skelview--table > .imsl-sr-only + .imsl-skeleton { height: var(--space-5); width: 40%; margin-bottom: var(--space-2); }

/* =================================================================================================================
   Components added by decision 82: AppMotion (band light), SmartSearch, Disclosure and Fold, Passage and
   Comment, Legend and Swatch. Each has a folder under components/ with its README and preview.
   ================================================================================================================= */

/* AppMotion: the pointer light on a page head or band (motion.js bandLight). The eyebrow bar draw and the route fade are Web Animations and need no CSS. */
.imsl-band__light {
  position: absolute; z-index: -1; left: 0; top: 0; pointer-events: none;
  width: calc(var(--space-12) * 5); height: calc(var(--space-12) * 5);
  margin: calc(var(--space-12) * -2.5) 0 0 calc(var(--space-12) * -2.5);
  border-radius: 50%; background: var(--grad-glow-sky);
  transform: translate3d(var(--mx, 50%), var(--my, 0), 0);
  opacity: 0; transition: opacity var(--dur-slow) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  :is(.imsl-shell__head, .imsl-band):hover > .imsl-band__light { opacity: .8; }
}
/* Decision 70: the light belongs to band heads. A compact band (decision 72) has none. */
:is(:is(.imsl-shell--compacthead, .imsl-shell--plainhead) .imsl-shell__head, .imsl-band--compact) > .imsl-band__light { display: none; }
@media (prefers-reduced-motion: reduce) { .imsl-band__light { display: none; } }
@media print { .imsl-band__light { display: none; } }

/* SmartSearch: the search field plus a ranked list of hits (builds on .imsl-search, .imsl-chip, .imsl-badge, .imsl-empty, .imsl-callout, .imsl-skeleton). */
.imsl-smartsearch { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.imsl-smartsearch__row { display: flex; align-items: flex-end; gap: var(--space-3); }
.imsl-smartsearch__row > .imsl-field { flex: 1 1 auto; min-width: 0; }
.imsl-smartsearch__row > .imsl-btn { flex: none; min-height: calc(var(--field-h) + var(--space-4)); }
.imsl-smartsearch__examples { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.imsl-smartsearch__status { margin: 0; color: var(--text-muted); font-size: var(--text-sm); }
.imsl-smartsearch__status:empty { display: none; }
.imsl-smartsearch__body { display: flex; flex-direction: column; gap: var(--space-3); }
.imsl-smartsearch__body:empty { display: none; }
.imsl-smartsearch__hits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.imsl-smartsearch mark { background: var(--orange-soft); color: var(--ink); font-weight: var(--weight-semibold); border-radius: var(--radius-xs); }

.imsl-hit { position: relative; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4) var(--space-5); background: var(--surface); border: var(--stroke-hairline) solid var(--line-soft); border-radius: var(--r-card); box-shadow: var(--shadow-lift); transition: border-color var(--dur-base), box-shadow var(--dur-base); }
@media (hover: hover) { .imsl-hit:hover { border-color: var(--navy); box-shadow: var(--shadow-hover); } }
.imsl-hit:has(.imsl-hit__link:focus-visible) { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
.imsl-hit__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.imsl-hit__title { margin: 0; font: 600 var(--text-lg)/1.3 var(--font-body); color: var(--ink); overflow-wrap: anywhere; }
.imsl-hit__link { color: inherit; text-decoration: none; font: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.imsl-hit__link:focus-visible { outline: none; }
.imsl-hit__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
@media (hover: hover) { .imsl-hit__link:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; } }
.imsl-hit__snippet { margin: 0; color: var(--text); font-size: var(--text-body); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.imsl-hit__foot { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.imsl-hit__meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); color: var(--text-muted); font-size: var(--text-sm); }
.imsl-hit__meta > * + *::before { content: "\00b7"; margin-right: var(--space-3); }
.imsl-hit__score { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--text-muted); font-size: var(--text-sm); margin-left: auto; }
.imsl-hit__meter { width: var(--space-16); height: var(--space-2); border-radius: var(--radius-full); background: var(--line-soft); overflow: hidden; flex: none; }
.imsl-hit__fill { display: block; height: 100%; width: calc(var(--imsl-score, 0) * 1%); background: var(--navy-fill); border-radius: inherit; }
.imsl-hit__scoreword { color: var(--text); font-weight: var(--weight-semibold); }
.imsl-hit__scorenum { font-variant-numeric: tabular-nums; }
/* Slots: per-hit actions, rank number, and the lead above the list (notice, heading, summary, follow-ups, footer). */
.imsl-hit__actions { position: relative; margin-left: auto; flex: none; display: flex; align-items: center; gap: var(--space-1); }
.imsl-hit__rank { flex: none; display: inline-grid; place-items: center; min-width: var(--space-6); height: var(--space-6); border-radius: var(--radius-full); background: var(--navy-soft); color: var(--navy); font: 600 var(--text-sm)/1 var(--font-body); font-variant-numeric: tabular-nums; }
.imsl-smartsearch__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.imsl-smartsearch__heading { margin: 0; font: 600 var(--text-lg)/1.25 var(--font-body); color: var(--ink); }
.imsl-smartsearch__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.imsl-smartsearch__summary { color: var(--text); font-size: var(--text-body); line-height: 1.5; overflow-wrap: anywhere; }
.imsl-smartsearch__summary > * { margin: 0; }
.imsl-smartsearch__summary > * + * { margin-top: var(--space-3); }
.imsl-smartsearch__followups { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.imsl-smartsearch__footer { margin: 0; }
/* Options: large field, icon, slots, questions, facts and tags, and the quieter card looks. */
.imsl-smartsearch .imsl-search[data-icon]::after { content: attr(data-icon); }
.imsl-smartsearch .imsl-input-wrap, .imsl-smartsearch .imsl-input-wrap > .imsl-input { width: 100%; }
.imsl-smartsearch--lg .imsl-smartsearch__row > .imsl-btn { min-height: var(--topbar-h); }
.imsl-smartsearch__description { margin: calc(var(--space-3) * -1) 0 0; }
.imsl-smartsearch__description + .imsl-smartsearch__examples { margin-top: calc(var(--space-2) * -1); }
.imsl-smartsearch__description:empty, .imsl-smartsearch__idle:empty { display: none; }
.imsl-smartsearch:not([data-state="idle"]) > .imsl-smartsearch__idle { display: none; }
.imsl-smartsearch__body > .imsl-loading { justify-content: flex-start; padding: 0; }
.imsl-smartsearch__questions { display: flex; flex-direction: column; gap: var(--space-2); }
.imsl-smartsearch__questions > .imsl-eyebrow { margin: 0; }
.imsl-smartsearch__questionlist { margin: 0; padding-left: var(--space-6); }
.imsl-hit__facts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-width: 0; }
.imsl-hit__tags { margin: 0; }
.imsl-hit__name { color: inherit; font: inherit; overflow-wrap: anywhere; }
.imsl-smartsearch--flat .imsl-hit { transition: none; }
@media (hover: hover) { .imsl-smartsearch--flat .imsl-hit:hover { border-color: var(--line-soft); box-shadow: var(--shadow-lift); } }
/* The card's pointer light on a hit (decision 87; motion.js writes --mx and --my). `flat` keeps it: it only stops the lift. */
.imsl-hit { isolation: isolate; }
.imsl-hit::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity var(--dur-base); background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--sky-glow) 60%, transparent), transparent 60%); }
@media (hover: hover) { .imsl-hit:hover::before { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .imsl-hit::before { transition: none; } }
.imsl-smartsearch--fullsnippet .imsl-hit__snippet { display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; }
.imsl-smartsearch--displaytitle .imsl-hit__title { font-family: var(--font-display); font-weight: var(--weight-bold); }
.imsl-smartsearch--titlelink .imsl-hit__link::after { content: none; }
.imsl-smartsearch--titlelink .imsl-hit:has(.imsl-hit__link:focus-visible) { outline: none; }
.imsl-smartsearch--titlelink .imsl-hit__link:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); border-radius: var(--radius-xs); }
.imsl-smartsearch--aligned .imsl-hit__title { flex: 1 1 calc(var(--space-16) * 2); min-width: 0; }
.imsl-smartsearch--aligned .imsl-hit__facts, .imsl-smartsearch--aligned .imsl-hit__snippet, .imsl-smartsearch--aligned .imsl-hit__tags, .imsl-smartsearch--aligned .imsl-hit__foot { padding-left: calc(var(--space-6) + var(--space-3)); }

@media (max-width: 640px) {
  .imsl-smartsearch__row { flex-direction: column; align-items: stretch; }
  .imsl-smartsearch__row > .imsl-btn { justify-content: center; }
  .imsl-hit { padding: var(--space-4); }
  .imsl-hit__score { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .imsl-hit { transition: none; }
}

/* Disclosure: .imsl-disclosure (native details, quiet or boxed) and .imsl-fold (long content clipped to N lines with a mask fade). */
.imsl-disclosure > summary { display: flex; align-items: center; gap: var(--space-2); min-height: var(--control-h-sm); cursor: pointer; list-style: none; font: 600 var(--text-sm)/1.3 var(--font-body); color: var(--navy); border-radius: var(--r-control); }
.imsl-disclosure > summary::-webkit-details-marker { display: none; }
.imsl-disclosure > summary:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
@media (hover: hover) { .imsl-disclosure > summary:hover .imsl-disclosure__label { text-decoration: underline; text-underline-offset: var(--space-1); } }
.imsl-disclosure > summary > .imsl-icon { flex: none; transform: rotate(-90deg); transition: transform var(--dur-fast) var(--ease); }
.imsl-disclosure[open] > summary > .imsl-icon { transform: none; }
.imsl-disclosure__label { min-width: 0; }
.imsl-disclosure__hint { margin-inline-start: var(--space-1); font-weight: 400; font-size: var(--text-xs); color: var(--text-muted); }
.imsl-disclosure__body { margin-inline-start: var(--space-2); padding: var(--space-1) 0 var(--space-1) var(--space-4); border-inline-start: 1px solid var(--line); color: var(--text); font-size: var(--text-sm); line-height: 1.5; }
.imsl-disclosure[open] > summary { margin-bottom: var(--space-2); }
.imsl-disclosure__body > :first-child { margin-top: 0; }
.imsl-disclosure__body > :last-child { margin-bottom: 0; }
.imsl-disclosure__body > * + * { margin-top: var(--space-3); }

/* Boxed: the same details inside a soft ground. */
.imsl-disclosure--boxed { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r-control); padding: 0 var(--space-3); }
.imsl-disclosure--boxed > summary { min-height: var(--control-h); }
.imsl-disclosure--boxed[open] > summary { margin-bottom: 0; }
.imsl-disclosure--boxed > .imsl-disclosure__body { margin: 0 0 var(--space-3); padding: var(--space-3) 0 0; border-inline-start: 0; border-top: 1px solid var(--line-soft); }

/* Card: a collapsible card whose summary is a real heading (h2, h3 or h4 with the system's heading classes). Put it on
   .imsl-card (details.imsl-card.imsl-disclosure--card) or inside one. The chevron sits at the trailing edge and turns
   when open; the body is not indented or ruled and keeps normal body size. Native details: works without JavaScript. */
.imsl-disclosure--card > summary { justify-content: space-between; min-height: var(--control-h); font: inherit; color: inherit; }
.imsl-disclosure--card > summary > .imsl-disclosure__label { flex: 1 1 auto; margin: 0; }
.imsl-disclosure--card > summary > .imsl-icon { color: var(--navy); }
.imsl-disclosure--card h4.imsl-disclosure__label { font-size: var(--text-md); }
.imsl-disclosure--card[open] > summary { margin-bottom: var(--space-3); }
.imsl-disclosure--card > .imsl-disclosure__body { margin: 0; padding: 0; border: 0; font-size: var(--text-body); line-height: 1.5; }
/* Size body: keep normal body text size in the body (a table or a long block), for any variant. */
.imsl-disclosure--body > .imsl-disclosure__body { font-size: var(--text-body); line-height: 1.5; }

/* Fold: clipped to --imsl-fold-lines lines (default 4). The mask fades to whatever is behind, so it needs no ground colour. */
.imsl-fold { --imsl-fold-lines: 4; }
.imsl-fold__content { line-height: 1.6; color: var(--text); }
.imsl-fold__content > * { margin-block: 0; }
.imsl-fold__content > * + * { margin-top: var(--space-3); }
.imsl-fold.is-clamped .imsl-fold__content { overflow: hidden; max-height: calc(var(--imsl-fold-lines) * 1lh); -webkit-mask-image: linear-gradient(to bottom, var(--ink) calc(100% - min(1.5lh, 50%)), transparent); mask-image: linear-gradient(to bottom, var(--ink) calc(100% - min(1.5lh, 50%)), transparent); }
.imsl-fold__toggle { margin-top: var(--space-1); margin-inline-start: calc(var(--space-4) * -1); }
.imsl-fold__toggle[hidden] { display: none; }
.imsl-fold__toggle > .imsl-icon { transition: transform var(--dur-fast) var(--ease); }
.imsl-fold__toggle[aria-expanded="true"] > .imsl-icon { transform: rotate(180deg); }

@media (prefers-reduced-motion: reduce) {
  .imsl-disclosure > summary > .imsl-icon, .imsl-fold__toggle > .imsl-icon { transition: none; }
}

/* Passage: quoted source text with where it came from, and the analyst comments set against it. */
.imsl-passage { position: relative; margin: 0; padding: var(--space-3) var(--space-4) var(--space-3) var(--space-5); border-left: var(--stroke-emphasis) solid var(--navy); background: var(--surface); border-radius: 0 var(--radius-md) var(--radius-md) 0; color: var(--ink); }
.imsl-passage__text { margin: 0; font: var(--weight-regular) var(--text-body)/1.6 var(--font-body); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.imsl-passage__original { display: block; }
.imsl-passage mark { padding: 0 var(--space-1); border-radius: var(--radius-xs); background: var(--warn-soft); color: var(--ink); box-shadow: inset 0 calc(var(--stroke-hairline) * -2) 0 var(--warn); }
.imsl-passage__source { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); margin-top: var(--space-3); font: var(--weight-medium) var(--text-sm)/1.4 var(--font-body); color: var(--text-muted); }
.imsl-passage__title { color: var(--ink); font-style: normal; font-weight: var(--weight-semibold); }
.imsl-passage__source > * + *:not(.imsl-badge):not(.imsl-passage__open)::before { content: "\00B7"; margin-right: var(--space-3); color: var(--text-muted); }
.imsl-passage__locator { font-family: var(--font-mono); font-size: var(--text-xs); }
.imsl-passage__open { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--navy); font-weight: var(--weight-semibold); text-decoration: underline; text-underline-offset: var(--space-1); }
.imsl-passage__open:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
@media (hover: hover) { .imsl-passage__open:hover { color: var(--navy-hover); } }
.imsl-passage .imsl-badge { margin-left: auto; }

/* Compact: for lists. Tighter, the source beneath. */
.imsl-passage--compact { padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4); }
.imsl-passage--compact .imsl-passage__text { font-size: var(--text-md); line-height: 1.45; }
.imsl-passage--compact .imsl-passage__source { margin-top: var(--space-1); font-size: var(--text-xs); }

/* Selected: a ring, a lifted ground and the word "Selected", so it reads without colour. */
.imsl-passage[aria-current="true"] { background: var(--navy-soft); outline: var(--stroke-hairline) solid var(--navy); outline-offset: calc(var(--stroke-hairline) * -1); box-shadow: var(--shadow-ui); }
.imsl-passage[aria-current="true"] .imsl-passage__title::before { content: "Selected: "; font-weight: var(--weight-semibold); color: var(--navy); }

.imsl-passage-list { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }

/* A per-passage action row (for example a Comment button), inside the figure after the caption. */
.imsl-passage__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); margin-top: var(--space-2); }
.imsl-comment__edited, .imsl-comment__meta { color: var(--text-muted); }
.imsl-comment__meta a { color: var(--navy); text-decoration: underline; text-underline-offset: var(--space-1); }

/* Thread: comments under the passage, replies indented one level only. */
.imsl-passage__thread { display: grid; gap: var(--space-2); margin: var(--space-2) 0 0 var(--space-5); padding: 0; list-style: none; }
.imsl-passage__thread > li { display: grid; gap: var(--space-2); }
.imsl-comment__replies { display: grid; gap: var(--space-2); margin: 0 0 0 var(--space-6); padding: 0; list-style: none; }

.imsl-comment { display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-3); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg-alt); color: var(--ink); }
.imsl-comment__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); font: var(--weight-medium) var(--text-sm)/1.4 var(--font-body); color: var(--text-muted); }
.imsl-comment__author { color: var(--ink); font-weight: var(--weight-semibold); }
.imsl-comment__body { grid-column: 2; margin: 0; font: var(--weight-regular) var(--text-md)/1.5 var(--font-body); white-space: pre-wrap; overflow-wrap: anywhere; }
.imsl-comment__actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-1); }
.imsl-comment[data-state="resolved"] { background: var(--surface); border-style: dashed; }
.imsl-comment[data-state="resolved"] .imsl-comment__body { color: var(--text-muted); }

@media (max-width: 640px) {
  .imsl-passage { padding-left: var(--space-4); }
  .imsl-passage__thread { margin-left: var(--space-3); }
  .imsl-comment__replies { margin-left: var(--space-3); }
  .imsl-comment { grid-template-columns: 1fr; }
  .imsl-comment__body, .imsl-comment__actions { grid-column: 1; }
  .imsl-passage .imsl-badge { margin-left: 0; }
}

/* LEGEND: the chart key. Swatches with their words, optionally values; inline, stacked and sequential scale. */
.imsl-legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: 0; padding: 0; list-style: none; font: 500 var(--text-sm)/1.3 var(--font-body); color: var(--text); }
.imsl-legend__item { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0; padding: 0; min-width: 0; }
.imsl-legend__item > dt, .imsl-legend__item > dd { margin: 0; }
.imsl-legend__item > dt { display: inline-flex; align-items: center; gap: var(--space-2); }
.imsl-legend__label { color: var(--text); overflow-wrap: anywhere; }
.imsl-legend__value, .imsl-legend__share { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; white-space: nowrap; }
.imsl-legend__share { color: var(--text-muted); font-weight: 500; }

/* Stacked: one item per row, labels left, figures right-aligned in their own columns. */
.imsl-legend--stacked { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: var(--space-2) var(--space-3); align-items: center; }
.imsl-legend--stacked > .imsl-legend__item { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; gap: var(--space-3); }
.imsl-legend--stacked > .imsl-legend__item > dt { display: contents; }
.imsl-legend--stacked > .imsl-legend__item--btn { display: contents; }
.imsl-legend--stacked .imsl-legend__value, .imsl-legend--stacked .imsl-legend__share { text-align: right; }

/* The swatch: decorative, coloured by a token name held in --imsl-swatch. */
.imsl-swatch { display: inline-block; flex: none; box-sizing: border-box; width: var(--space-3); height: var(--space-3); border-radius: var(--radius-sm); background: var(--imsl-swatch, var(--chart-1)); border: var(--stroke-hairline) solid var(--imsl-swatch, var(--chart-1)); vertical-align: middle; }
.imsl-swatch--line, .imsl-swatch--dashed { width: var(--space-6); height: 0; border-width: 0; border-top: var(--stroke-emphasis) solid var(--imsl-swatch, var(--chart-1)); border-radius: 0; background: none; }
.imsl-swatch--dashed { border-top-style: dashed; }
.imsl-swatch--dot { border-radius: var(--radius-full); }
.imsl-swatch--outline { background: none; border-width: var(--focus-width); }
.imsl-swatch--hatched { background: repeating-linear-gradient(135deg, var(--imsl-swatch, var(--chart-1)) 0 2px, transparent 2px 5px); }
.imsl-swatch--c1 { --imsl-swatch: var(--chart-1); }
.imsl-swatch--c2 { --imsl-swatch: var(--chart-2); }
.imsl-swatch--c3 { --imsl-swatch: var(--chart-3); }
@media print { .imsl-swatch, .imsl-legend__step { print-color-adjust: exact; -webkit-print-color-adjust: exact; } }

/* Interactive: each item holds a toggle button. Pressed means the series is shown. */
.imsl-legend__btn { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--space-6); padding: var(--space-1) var(--space-2); border: var(--stroke-hairline) solid transparent; border-radius: var(--radius-sm); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.imsl-legend--stacked .imsl-legend__btn { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; gap: var(--space-3); width: 100%; }
.imsl-legend__btn:hover { background: var(--surface-2); }
.imsl-legend__btn:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
.imsl-legend__btn[aria-pressed="true"] { border-color: var(--line); }
.imsl-legend__btn.is-hidden .imsl-legend__label, .imsl-legend__btn.is-hidden .imsl-legend__value { text-decoration: line-through; color: var(--text-muted); }
.imsl-legend__btn.is-hidden .imsl-swatch { opacity: 0.4; }
.imsl-legend__btn.is-hidden .imsl-swatch:not(.imsl-swatch--hatched):not(.imsl-swatch--line):not(.imsl-swatch--dashed) { background: none; }
.imsl-legend__btn.is-active .imsl-legend__label, .imsl-legend__item.is-active .imsl-legend__label { font-weight: 700; color: var(--ink); }

/* Select mode (interactive: 'select'): aria-pressed true means CHOSEN, not shown. No strike-through. A chosen item has a
   ring, a ground and weight (so it is not colour alone); while any is chosen the others dim a little. */
.imsl-legend--select .imsl-legend__btn[aria-pressed="true"] { background: var(--navy-soft); border-color: var(--navy); font-weight: 700; }
.imsl-legend--select .imsl-legend__btn[aria-pressed="true"] .imsl-legend__label { color: var(--ink); }
.imsl-legend--select.has-selection .imsl-legend__btn:not([aria-pressed="true"]), .imsl-legend--select.has-selection .imsl-legend__item--plain { opacity: 0.6; }
.imsl-legend--select .imsl-legend__item--plain { padding: var(--space-1) var(--space-2); border: var(--stroke-hairline) solid transparent; }
.imsl-legend--select.imsl-legend--stacked > .imsl-legend__item--plain { padding: var(--space-1) var(--space-2); }

/* Sequential scale: steps from map-seq-1 to map-seq-5, low and high words beneath. */
.imsl-legend--scale { display: grid; gap: var(--space-1); inline-size: min(100%, 20rem); margin: 0; padding: 0; font: 500 var(--text-sm)/1.3 var(--font-body); color: var(--text); }
.imsl-legend__title { color: var(--text-muted); font-size: var(--text-xs); }
.imsl-legend__steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--stroke-hairline); }
.imsl-legend__step { display: block; height: var(--space-3); background: var(--imsl-swatch); }
.imsl-legend__step:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.imsl-legend__step:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.imsl-legend__ends { display: flex; justify-content: space-between; gap: var(--space-3); font-variant-numeric: tabular-nums; color: var(--text-muted); }

@media (max-width: 640px) {
  .imsl-legend { gap: var(--space-2) var(--space-4); }
}
@media (prefers-reduced-motion: reduce) {
  .imsl-legend__btn { transition: none; }
}

/* =================================================================================================================
   Reduced motion: every scene has a still state
   ================================================================================================================= */
@media (prefers-reduced-motion: reduce) {
  .imsl-ambient__orb, .imsl-shell__glow, .imsl-band__glow { animation: none !important; transform: none !important; }
  .imsl-ambient__cursor, .imsl-band::after, .imsl-shell__head::after { display: none; }
  .imsl-ticker__track, .imsl-skeleton, .imsl-empty .imsl-icon::after, .imsl-live::before, 
  .imsl-rail__marker, .imsl-btn, .imsl-card { transition: none; animation: none; }
}

/* Navy grounds keep on-navy headings (decision 74): the display, h2 and h3 rules above set ink, which would otherwise win over
   v1's band, slide and email contexts (a Hero headline was dark on the navy band). */
:is(.imsl-band, .imsl-shell__head, .imsl-slide--band, .imsl-slide--deep, .imsl-email__head) :is(.imsl-display, .imsl-h2, .imsl-h3) { color: var(--on-navy); }
/* The headline highlight is orange, a graphic at display size (I4). */
:is(.imsl-slide--band, .imsl-slide--deep) .imsl-hl { color: var(--orange); }

/* ---------- CoAnalyst (decision 83): the docked, resizable, collapsible assistant panel, the same in every app ----------
   The loader (CoAnalyst's embed.js) sets on <html> data-coa="open|collapsed|closed" and --coa-space (the px the panel takes, 0 when
   closed or under 640px), sets --coa-top to the topbar's bottom edge and --coa-w to the chosen width. The shell reserves the
   space so the page reflows beside the panel. The body of the panel in an app is an iframe (.imsl-coa__frame): CoAnalyst's own page,
   which uses the composer and answer classes below. */
.imsl-topbar__coa { display: inline-flex; align-items: center; }
.imsl-topbar__coa:empty { display: none; }
.imsl-coa-launch[aria-expanded="true"] { background: var(--navy-soft); color: var(--navy); border-color: var(--navy); }

html[data-coa] .imsl-shell__body { padding-inline-end: var(--coa-space, 0px); transition: padding-inline-end var(--dur-base) var(--ease); }
html[data-coa][data-coa-resizing] .imsl-shell__body { transition: none; }

.imsl-coa { position: fixed; inset-inline-end: 0; inset-block: var(--coa-top, 0) 0; z-index: var(--z-overlay); inline-size: clamp(var(--drawer-sm), var(--coa-w, var(--drawer-md)), max(var(--drawer-lg), var(--panel-lg))); display: flex; flex-direction: column; background: var(--surface); color: var(--text); border-inline-start: 1px solid var(--line); box-shadow: var(--shadow-ui); min-block-size: 0; }
.imsl-coa[data-state="closed"] { display: none; }

.imsl-coa__grip { position: absolute; inset-block: 0; inset-inline-start: calc(-1 * var(--space-2)); inline-size: var(--space-4); cursor: col-resize; z-index: var(--z-sticky); display: grid; place-items: center; touch-action: none; }
.imsl-coa__grip::after { content: ""; inline-size: var(--space-1); block-size: var(--space-12); border-radius: var(--radius-full); background: var(--line-strong); opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
.imsl-coa__grip:hover::after, .imsl-coa__grip:focus-visible::after, .imsl-coa[data-resizing] .imsl-coa__grip::after { opacity: 1; background: var(--navy); }
.imsl-coa__grip:focus-visible { outline: none; }

/* head: a compact navy band, the system's one title element */
.imsl-coa__head { flex: none; position: relative; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5); color: var(--on-navy); background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px), var(--grad-band); background-size: var(--grid-size) var(--grid-size), auto; overflow: hidden; }
.imsl-coa__head::after { content: ""; position: absolute; inline-size: 220px; block-size: 220px; inset-block-start: -110px; inset-inline-end: -60px; background: var(--grad-glow-orange); pointer-events: none; }
.imsl-coa__mark { flex: none; inline-size: var(--space-10); block-size: var(--space-10); display: grid; place-items: center; border-radius: var(--r-control); background: var(--glass-on-band); border: 1px solid var(--glass-on-band-line); color: var(--on-navy); }
.imsl-coa__id { min-inline-size: 0; flex: 1; display: grid; gap: var(--space-1); }
.imsl-coa__title { margin: 0; font: 700 var(--title-sm)/1.1 var(--font-display); color: var(--on-navy); }
.imsl-coa__scope { margin: 0; font-size: var(--text-sm); line-height: 1.3; color: var(--on-navy); opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imsl-coa__tools { display: flex; gap: var(--space-1); position: relative; z-index: 1; }
.imsl-coa__tool { inline-size: var(--control-h-sm); block-size: var(--control-h-sm); display: grid; place-items: center; border-radius: var(--radius-full); border: 1px solid var(--glass-on-band-line); background: var(--glass-on-band); color: var(--on-navy); cursor: pointer; }
.imsl-coa__tool:hover { background: var(--glass-on-band-line); }
.imsl-coa__tool:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }

/* body: CoAnalyst's own page in an iframe (apps), or the conversation itself (the page inside the frame) */
.imsl-coa__frame { flex: 1; min-block-size: 0; inline-size: 100%; border: 0; background: var(--surface); }
.imsl-coa__body { flex: 1; min-block-size: 0; overflow: auto; padding: var(--space-5); display: grid; align-content: start; gap: var(--space-5); }
.imsl-coa__lead { margin: 0; color: var(--text-muted); font-size: var(--text-sm); line-height: 1.5; }
.imsl-coa__starters { display: grid; gap: var(--space-2); }
.imsl-coa__starter { display: flex; align-items: center; gap: var(--space-3); text-align: start; inline-size: 100%; padding: var(--space-3) var(--space-4); border-radius: var(--r-control); border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 500 var(--text-sm)/1.35 var(--font-body); cursor: pointer; transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.imsl-coa__starter:hover { border-color: var(--navy); background: var(--navy-soft); }
.imsl-coa__starter .imsl-icon { color: var(--navy); }

.imsl-coa__q { justify-self: end; max-inline-size: 85%; padding: var(--space-3) var(--space-4); border-radius: var(--r-card) var(--r-card) var(--radius-sm) var(--r-card); background: var(--navy-fill); color: var(--on-navy); font-size: var(--text-sm); line-height: 1.45; }
.imsl-coa__a { display: grid; gap: var(--space-3); }
.imsl-coa__meta { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.imsl-coa__a p { margin: 0; color: var(--text); font-size: var(--text-body); line-height: 1.55; }
.imsl-coa__a p:first-of-type { color: var(--ink); font-weight: 500; }
.imsl-coa__ref { font: 600 var(--text-xs)/1 var(--font-body); color: var(--navy); vertical-align: super; text-decoration: none; padding-inline: 1px; }
.imsl-coa__refs { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; border-block-start: 1px solid var(--line-soft); padding-block-start: var(--space-3); }
.imsl-coa__refs li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-3); align-items: baseline; font-size: var(--text-sm); line-height: 1.4; }
.imsl-coa__refs .n { font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.imsl-coa__refs a { color: var(--ink); text-decoration: none; font-weight: 500; }
.imsl-coa__refs a:hover { text-decoration: underline; }
.imsl-coa__refs small { grid-column: 2; color: var(--text-muted); font-size: var(--text-xs); display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.imsl-coa__widen { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.imsl-coa__widen .imsl-chip { min-height: var(--control-h-sm); }

.imsl-coa__composer { flex: none; display: grid; gap: var(--space-2); padding: var(--space-4) var(--space-5) var(--space-5); border-block-start: 1px solid var(--line); background: var(--surface); }
.imsl-coa__box { position: relative; }
.imsl-coa__box .imsl-textarea { inline-size: 100%; min-block-size: calc(var(--field-h) * 1.6); resize: none; padding-inline-end: calc(var(--control-h-sm) * 2 + var(--space-4)); }
.imsl-coa__send { position: absolute; inset-block-end: var(--space-2); inset-inline-end: var(--space-2); display: flex; gap: var(--space-1); }
.imsl-coa__foot { display: flex; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; color: var(--text-muted); font-size: var(--text-xs); }

/* collapsed: a slim strip that keeps the conversation */
.imsl-coa[data-state="collapsed"] { inline-size: auto; min-inline-size: 0; }
.imsl-coa[data-state="collapsed"] > :not(.imsl-coa__strip) { display: none; }
.imsl-coa__strip { display: none; }
.imsl-coa[data-state="collapsed"] .imsl-coa__strip { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-2); inline-size: calc(var(--control-h) + var(--space-4)); block-size: 100%; border: 0; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.imsl-coa__strip:hover { background: var(--navy-soft); }
.imsl-coa__strip:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: calc(-1 * var(--focus-width)); }
.imsl-coa__strip .imsl-coa__mark { background: var(--navy-fill); color: var(--on-navy); border-color: transparent; }
.imsl-coa__strip-label { writing-mode: vertical-rl; transform: rotate(180deg); font: 600 var(--text-sm)/1 var(--font-body); letter-spacing: .02em; color: var(--ink); }

/* phones: the open panel covers the area below the topbar; no grip */
@media (max-width: 640px) {
  .imsl-coa[data-state="open"] { inset-inline-start: 0; inline-size: auto; min-inline-size: 0; max-inline-size: none; border-inline-start: 0; }
  .imsl-coa__grip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .imsl-coa, .imsl-coa *, html[data-coa] .imsl-shell__body { transition: none !important; }
}
