/* iOES Help 1.0 — tour + "?" button. IOES Themes 1.20 tokens only (no raw colors). Source: IOES Help repo. */
.ioes-help-layer { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; }
.ioes-help-layer[hidden] { display: none; }
.ioes-help-shade { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: auto; }
.ioes-help-shade rect.dim { fill: var(--scrim); }
.ioes-help-shade.is-clear rect.dim { fill: transparent; }
.ioes-help-halo { position: absolute; box-sizing: border-box; pointer-events: none;
  border: 2px solid var(--accent); border-radius: var(--radius-md, 12px);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent), var(--glow, none);
  transition: top .25s var(--ease, ease), left .25s var(--ease, ease), width .25s var(--ease, ease), height .25s var(--ease, ease); }
.ioes-help-halo[hidden] { display: none; }

.ioes-help-bubble { position: absolute; box-sizing: border-box; width: min(320px, calc(100vw - 24px)); pointer-events: auto;
  padding: var(--space-lg, 16px); border-radius: var(--radius-lg, 16px); color: var(--text);
  background: var(--surface-raised); border: 1px solid var(--border);
  box-shadow: var(--shadow-panel, var(--shadow-lg));
  font-family: var(--font-sans); transition: top .25s var(--ease, ease), left .25s var(--ease, ease), opacity .2s; }
.ioes-help-bubble:focus { outline: none; }
.ioes-help-bubble h2 { margin: 0 0 var(--space-xs, 4px); font-size: var(--type-headline-size, 17px); line-height: var(--type-headline-line, 22px); font-weight: var(--type-headline-weight, 600); }
.ioes-help-bubble h2:focus { outline: none; }
.ioes-help-bubble p { margin: 0; color: var(--text-muted); font-size: var(--type-callout-size, 16px); line-height: var(--type-callout-line, 21px); }
.ioes-help-arrow { position: absolute; width: 14px; height: 14px; transform: rotate(45deg); box-sizing: border-box;
  background: var(--surface-raised); border: 1px solid var(--border); }
.ioes-help-arrow[data-side="bottom"] { top: -8px; border-right: 0; border-bottom: 0; }
.ioes-help-arrow[data-side="top"] { bottom: -8px; border-left: 0; border-top: 0; }
.ioes-help-arrow[data-side="right"] { left: -8px; border-right: 0; border-top: 0; }
.ioes-help-arrow[data-side="left"] { right: -8px; border-left: 0; border-bottom: 0; }
.ioes-help-arrow[hidden] { display: none; }

.ioes-help-foot { display: flex; align-items: center; gap: var(--space-sm, 8px); margin-top: var(--space-md, 12px); flex-wrap: wrap; }
.ioes-help-foot .ioes-pips { color: var(--accent); flex: 1 0 100%; margin-bottom: var(--space-xs, 4px); }
.ioes-help-foot [data-help-btn="close"] { margin-left: auto; }
.ioes-help-foot .ioes-btn { min-height: 44px; padding: 0 var(--space-lg, 16px); }
.ioes-help-foot .ioes-btn[hidden] { display: none; }
.ioes-help-bubble p.ioes-help-hint { margin-top: var(--space-sm, 8px); color: var(--accent-text); font-size: var(--type-footnote-size, 13px); line-height: var(--type-footnote-line, 18px); font-weight: 600; }
.ioes-help-links { display: flex; gap: var(--space-md, 12px); margin-top: var(--space-md, 12px); flex-wrap: wrap; align-items: center; }
.ioes-help-link { background: none; border: 0; padding: 10px 0; min-height: 44px; color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.ioes-help-x { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: none; color: var(--text-muted); display: grid; place-items: center; padding: 0; cursor: pointer; border-radius: var(--radius-pill, 999px); }
.ioes-help-x > svg { width: 18px; height: 18px; }
.ioes-help-lang { display: inline-flex; gap: 2px; margin-left: auto; }
.ioes-help-lang button { min-height: 44px; min-width: 40px; padding: 0 var(--space-sm, 8px); border: 1px solid var(--border); background: transparent; color: var(--text-muted); border-radius: var(--radius-pill, 999px); cursor: pointer; font-family: var(--font-sans); font-size: var(--type-footnote-size); line-height: var(--type-footnote-line); font-weight: 600; }
.ioes-help-lang button[aria-pressed="true"] { background: var(--nav-selected, var(--surface-alt)); color: var(--text); border-color: var(--accent); }
.ioes-help-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* welcome card: centered */
.ioes-help-bubble.is-welcome { width: min(380px, calc(100vw - 32px)); padding: var(--space-xl, 24px); border-radius: var(--radius-xl, 24px); }
.ioes-help-bubble.is-welcome .ioes-help-foot { justify-content: flex-end; }

/* "?" button: 28px circle, 44px hit area */
.ioes-help-q { position: relative; display: inline-grid; place-items: center; flex: none; box-sizing: border-box; width: 28px; height: 28px; min-width: 28px; min-height: 28px; margin: 0 4px; padding: 0;
  border-radius: var(--radius-pill, 999px); border: 1px solid var(--glass-edge, var(--border)); background: var(--glass-fill, var(--surface-raised));
  color: var(--accent-text); font: 700 15px/1 var(--font-sans); cursor: pointer; vertical-align: middle; }
.ioes-help-q::before { content: ""; position: absolute; inset: -8px; }
.ioes-help-q::after { content: "?"; }
.ioes-help-q:hover { border-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .ioes-help-halo, .ioes-help-bubble { transition: none !important; }
}
@media print { .ioes-help-layer, .ioes-help-q { display: none !important; } }

/* the forward action stands out on every page, also where the page has its own .ioes-btn (iOES Model loads ioes-themes.css but model.css restyles .ioes-btn after it, which overrides --primary) */
.ioes-help-foot .ioes-btn--primary, .ioes-help-bubble .ioes-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.ioes-help-foot .ioes-btn--primary:hover { filter: brightness(1.08); }
