/*! StiffStruct, (c) 2026 Mohammad Asad. All rights reserved. Proprietary: copying, mirroring or reusing this code is not permitted without written permission (see terms.html#intellectual-property). build 20261018-2109 */
/* StiffStruct — design system + app layout (owned by the shell module, docs/ARCHITECTURE.md §6).
 *
 * Every module uses these tokens; never hard-code colours in module CSS.
 * Theme: <html data-theme="light|dark"> is always the RESOLVED theme (main.js resolves 'auto' with
 * prefers-color-scheme); data-theme-pref holds the user's choice ('auto' | 'light' | 'dark').
 *
 * Contents
 *   1. Tokens (light, dark)          5. Shell: header, modebar, status bar
 *   2. Base & typography             6. Layout: panels, resizers, drawers, pages, slots
 *   3. Shared components             7. Dialogs, toasts, menus, popovers (dialogs.js)
 *   4. Utilities                     8. Responsive, reduced motion, print
 */

@import url('tokens.css');

/* ============================================================================================
   2. Base & typography
   ============================================================================================ */

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.45 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 0.6em; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent-text); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
code, kbd, pre, samp { font-family: var(--font-mono); font-size: 0.92em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-tap-highlight-color: transparent; }
svg { flex-shrink: 0; }
img, svg, canvas { max-width: 100%; }

[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.skip-link {
  position: fixed; left: 8px; top: -60px; z-index: 2000;
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-fg); font-weight: 600; text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus { top: 8px; }

/* ============================================================================================
   3. Shared components
   ============================================================================================ */

/* --- buttons -------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg-elev); color: var(--fg);
  font-size: 13px; font-weight: 550; line-height: 1; white-space: nowrap; text-decoration: none;
  cursor: pointer; user-select: none;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s, transform 0.16s var(--ease-out);
}
.btn:hover { background: var(--bg-sunken); border-color: var(--border-strong); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); border-color: var(--accent); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: default; pointer-events: none; }
.btn .icon, .btn .wg-ic { flex: none; }

.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-fg); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--bg-hover); border-color: transparent; }
.btn-ghost[aria-expanded="true"], .btn-ghost[aria-pressed="true"] { background: var(--bg-hover); }

.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 88%, #000); border-color: transparent; }
:root[data-theme="dark"] .btn-danger { color: #1a0b0b; }

.btn-icon { width: 32px; padding: 0; }
.btn-sm { height: 28px; padding: 0 9px; font-size: 12.5px; gap: 5px; }
.btn-sm.btn-icon { width: 28px; padding: 0; }
.btn-lg { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; }

/* --- inputs --------------------------------------------------------------------------------- */
.input, .select {
  height: 32px; min-width: 0; max-width: 100%;
  padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg-elev); color: var(--fg);
  font-size: 13px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.input::placeholder { color: var(--fg-subtle); }
.input:hover, .select:hover { border-color: color-mix(in srgb, var(--border-strong) 60%, var(--fg-muted)); }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.input:disabled, .select:disabled { opacity: 0.55; cursor: not-allowed; }
.input[aria-invalid="true"] { border-color: var(--danger); }
textarea.input { height: auto; min-height: 72px; padding: 8px 10px; line-height: 1.45; resize: vertical; }

.select {
  appearance: none; -webkit-appearance: none;
  padding-right: 28px; cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%),
    linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.select option, .select optgroup { background: var(--bg-elev); color: var(--fg); }

.field { display: grid; gap: 4px; min-width: 0; }
.field > label, .field-label { font-size: 12px; font-weight: 550; color: var(--fg-muted); }
.field-hint { font-size: 12px; color: var(--fg-subtle); }

/* --- segmented control ---------------------------------------------------------------------- */
.seg {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px;
  background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--radius);
  max-width: 100%;
}
.seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 28px; padding: 0 10px;
  border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--fg-muted);
  font-size: 13px; font-weight: 550; white-space: nowrap; cursor: pointer;
  transition: background-color 0.12s, color 0.12s, box-shadow 0.12s;
}
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--bg-elev); color: var(--fg); box-shadow: var(--shadow-1); }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: #222b3b; }
.seg button:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.seg button:disabled { opacity: 0.45; cursor: default; }

/* --- tabs ----------------------------------------------------------------------------------- */
.tabs { display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; background: none;
  color: var(--fg-muted); font-size: 13px; font-weight: 550; white-space: nowrap; cursor: pointer;
}
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.tab:focus-visible { outline: none; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }

/* --- cards, badges, tables, kbd ------------------------------------------------------------- */
.card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-sunken); color: var(--fg-muted);
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.badge.ok { background: var(--success-soft); border-color: transparent; color: var(--success); }
.badge.warn { background: var(--warning-soft); border-color: transparent; color: var(--warning); }
.badge.err { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.badge.info { background: var(--info-soft); border-color: transparent; color: var(--info); }
.badge.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }

.table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 5px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { position: sticky; top: 0; z-index: 1; background: var(--bg-sunken); color: var(--fg-muted); font-weight: 600; white-space: nowrap; }
.table tbody tr:hover { background: var(--bg-hover); }
.table .num, .table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr.is-selected { background: var(--accent-soft); }

.kbd {
  display: inline-block; min-width: 20px; padding: 1px 5px;
  border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px;
  background: var(--bg-elev); color: var(--fg-muted);
  font: 600 11px/1.5 var(--font-mono); text-align: center; white-space: nowrap;
}

.toolbar {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.toolbar-sep { width: 1px; align-self: stretch; margin: 3px 3px; background: var(--border); }

.panel-section { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.panel-section:last-child { border-bottom: 0; }
.panel-section > h3, .panel-title {
  margin: 0 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-muted);
}

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 32px 16px; text-align: center; color: var(--fg-muted);
}
.empty-state .icon { color: var(--fg-subtle); }
.empty-state strong { color: var(--fg); font-size: 14px; }

.spinner {
  display: inline-block; width: 14px; height: 14px; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: sl-spin 0.7s linear infinite;
}
@keyframes sl-spin { to { transform: rotate(360deg); } }

/* ============================================================================================
   4. Utilities
   ============================================================================================ */

.muted { color: var(--fg-muted); }
.subtle { color: var(--fg-subtle); }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 8px); min-width: 0; }
.row { display: flex; align-items: center; gap: var(--gap, 8px); min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============================================================================================
   5. Shell: header, modebar, status bar
   ============================================================================================ */

.sh-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--header-h) var(--modebar-h) minmax(0, 1fr) var(--status-h);
  height: 100vh; height: 100dvh;
  --sh-left-cur: var(--sh-left-w);
  --sh-right-cur: var(--sh-right-w);
}

/* --- header --------------------------------------------------------------------------------- */
.sh-header {
  grid-row: 1;
  display: flex; align-items: center; gap: 6px;
  padding: 0 10px; min-width: 0;
  background: var(--bg-elev); border-bottom: 1px solid var(--border);
}
.sh-brand {
  display: inline-flex; align-items: center; gap: 9px; flex: none;
  height: 36px; padding: 0 8px 0 4px;
  border: 0; border-radius: var(--radius); background: none; color: var(--fg);
  font-size: 15.5px; font-weight: 750; letter-spacing: -0.02em; cursor: pointer;
}
.sh-brand:hover { background: var(--bg-hover); }
.sh-brand .logo-mark { display: block; }
.sh-divider { flex: none; width: 1px; height: 22px; margin: 0 4px; background: var(--border); }
.sh-title {
  flex: 0 1 260px; min-width: 70px; height: 32px; padding: 0 8px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--fg);
  font-size: 14px; font-weight: 550; text-overflow: ellipsis;
}
.sh-title:hover { border-color: var(--border); }
.sh-title:focus { outline: none; border-color: var(--accent); background: var(--bg-elev); box-shadow: var(--focus-ring); }
.sh-spacer { flex: 1 1 auto; min-width: 4px; }
.sh-type { flex: none; margin-left: 6px; }
.sh-type .seg button .icon { opacity: 0.85; }
.sh-type-select { display: none; width: 124px; flex: none; }
.sh-units-btn { max-width: 170px; }
.sh-units-btn .sh-btn-text { overflow: hidden; text-overflow: ellipsis; }
.sh-btn-short { display: none; }
.sh-tools { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.sh-tools .sh-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--border); }
.sh-drawer-btn, .sh-more-btn { display: none; flex: none; }
.sh-chev { opacity: 0.6; margin-right: -3px; }

/* --- modebar -------------------------------------------------------------------------------- */
.sh-modebar {
  grid-row: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 0 10px; min-width: 0;
  background: var(--bg-elev); border-bottom: 1px solid var(--border);
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.sh-modebar::-webkit-scrollbar { display: none; }
.sh-steps { display: flex; align-items: center; gap: 2px; flex: none; margin: 0; padding: 0; list-style: none; }
.sh-step {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px 0 5px;
  border: 0; border-radius: 999px; background: none;
  color: var(--fg-muted); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}
.sh-step:hover { background: var(--bg-hover); color: var(--fg); }
.sh-step:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.sh-step-num {
  display: grid; place-items: center; width: 22px; height: 22px; flex: none;
  border: 1.5px solid var(--border-strong); border-radius: 50%;
  background: var(--bg-elev); color: var(--fg-muted);
  font-size: 11.5px; font-weight: 700; line-height: 1;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.sh-step.is-done .sh-step-num { border-color: color-mix(in srgb, var(--accent) 70%, transparent); color: var(--accent-text); }
.sh-step[aria-current="step"] { background: var(--accent-soft); color: var(--accent-text); }
.sh-step[aria-current="step"] .sh-step-num { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.sh-step-sep { width: 14px; height: 1.5px; flex: none; background: var(--border-strong); border-radius: 2px; }

.sh-ready { cursor: pointer; height: 26px; padding: 0 10px; font-size: 12.5px; transition: filter 0.12s, opacity 0.2s; }
.sh-ready:hover { filter: brightness(0.97); }
:root[data-theme="dark"] .sh-ready:hover { filter: brightness(1.15); }
.sh-ready:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.sh-ready.is-stale { opacity: 0.7; }
.sh-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.sh-ready .spinner { width: 11px; height: 11px; border-width: 1.5px; }
.sh-ready-short { display: none; }

.sh-case { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.sh-case-label { font-size: 12px; font-weight: 600; color: var(--fg-muted); }
.sh-case .select { height: 30px; max-width: 240px; font-weight: 550; }
.sh-analyze { flex: none; }
.sh-analyze .kbd { margin-left: 2px; background: transparent; border-color: color-mix(in srgb, var(--accent-fg) 40%, transparent); color: inherit; opacity: 0.85; }

/* --- status bar ----------------------------------------------------------------------------- */
.sh-status {
  grid-row: 4;
  display: flex; align-items: center; gap: 14px;
  padding: 0 6px 0 12px; min-width: 0;
  background: var(--bg-elev); border-top: 1px solid var(--border);
  color: var(--fg-muted); font-size: 12px; white-space: nowrap; overflow: hidden;
}
.sh-stat { display: inline-flex; align-items: center; gap: 5px; }
.sh-stat b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.sh-stat .icon { opacity: 0.8; }
.sh-stat.is-warn { color: var(--warning); }
.sh-status-sep { width: 1px; height: 12px; background: var(--border); flex: none; }
.sh-status .sh-spacer { flex: 1; }
.sh-panel-toggles { display: inline-flex; gap: 1px; }
.sh-panel-toggles .btn { height: 22px; width: 24px; color: var(--fg-muted); }
.sh-panel-toggles .btn[aria-pressed="true"] { color: var(--accent-text); }

/* ============================================================================================
   6. Layout: body grid, panels, resizers, drawers, pages, slots
   ============================================================================================ */

.sh-body {
  grid-row: 3; grid-column: 1;
  position: relative;
  display: grid;
  grid-template-columns: var(--sh-left-cur) 0 minmax(0, 1fr) 0 var(--sh-right-cur);
  grid-template-rows: minmax(0, 1fr);
  min-height: 0; min-width: 0;
  overflow: hidden;               /* clips the off-canvas drawers on small screens */
}
.sh-panel {
  position: relative; min-width: 0; min-height: 0;
  overflow: auto; overscroll-behavior: contain;
  background: var(--bg-elev);
}
.sh-left { grid-column: 1; grid-row: 1; border-right: 1px solid var(--border); }
.sh-resizer[data-resize="left"] { grid-column: 2; grid-row: 1; }
.sh-center { grid-column: 3; grid-row: 1; }
.sh-resizer[data-resize="right"] { grid-column: 4; grid-row: 1; }
.sh-right { grid-column: 5; grid-row: 1; border-left: 1px solid var(--border); }

.sh-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.sh-canvas { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: var(--bg); }
.sh-bottom {
  position: relative; flex: 0 0 min(var(--sh-bottom-h), 62%); min-height: 0;
  overflow: auto; overscroll-behavior: contain;
  background: var(--bg-elev); border-top: 1px solid var(--border);
}

/* bottom drawer only in results mode (and when not collapsed) */
.sh-app:not([data-mode="results"]) .sh-bottom,
.sh-app:not([data-mode="results"]) .sh-resizer-h,
.sh-app[data-bottom="closed"] .sh-bottom,
.sh-app[data-bottom="closed"] .sh-resizer-h { display: none; }

/* resizers: zero-width tracks with a wider invisible hit area */
.sh-resizer { position: relative; z-index: 6; touch-action: none; }
.sh-resizer::before { content: ""; position: absolute; top: 0; bottom: 0; left: -4px; right: -4px; cursor: col-resize; }
.sh-resizer::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px;
  background: var(--accent); opacity: 0; transition: opacity 0.15s 0.05s;
}
.sh-resizer:hover::after, .sh-resizer:focus-visible::after, .sh-resizer.is-dragging::after { opacity: 1; }
.sh-resizer:focus-visible { outline: none; }
.sh-resizer-h { flex: none; height: 0; }
.sh-resizer-h::before { left: 0; right: 0; top: -4px; bottom: -4px; cursor: row-resize; }
.sh-resizer-h::after { left: 0; right: 0; top: -1px; bottom: auto; width: auto; height: 2px; }
.sh-app.is-resizing, .sh-app.is-resizing * { user-select: none !important; }
.sh-app.is-resizing-x, .sh-app.is-resizing-x * { cursor: col-resize !important; }
.sh-app.is-resizing-y, .sh-app.is-resizing-y * { cursor: row-resize !important; }
.sh-app.is-resizing iframe, .sh-app.is-resizing canvas { pointer-events: none; }

.sh-backdrop { display: none; }

/* desktop collapse */
@media (min-width: 901px) {
  .sh-app[data-left="closed"] { --sh-left-cur: 0px; }
  .sh-app[data-right="closed"] { --sh-right-cur: 0px; }
  .sh-app[data-left="closed"] .sh-left,
  .sh-app[data-right="closed"] .sh-right { visibility: hidden; border: 0; }
  .sh-app[data-left="closed"] .sh-resizer[data-resize="left"],
  .sh-app[data-right="closed"] .sh-resizer[data-resize="right"] { display: none; }
}

/* report / code pages replace the 3-column body */
.sh-page {
  grid-row: 3; grid-column: 1;
  min-height: 0; overflow: auto; overscroll-behavior: contain;
  background: var(--bg);
}
.sh-app[data-mode="report"] .sh-body,
.sh-app[data-mode="code"] .sh-body { display: none; }

/* slot states */
.sh-slot-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 100%; min-height: 120px; padding: 24px;
  color: var(--fg-subtle); font-size: 13px;
  animation: sh-fade-in 0.2s 0.15s both;
}
.sh-slot-error {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 14px; padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border)); border-radius: var(--radius);
  background: var(--danger-soft); color: var(--fg);
}
.sh-slot-error-icon { color: var(--danger); margin-top: 1px; }
.sh-slot-error strong { display: block; margin-bottom: 4px; }
.sh-slot-error p { margin: 0 0 8px; font-size: 12.5px; word-break: break-word; }
.sh-slot-error code { display: inline-block; margin-bottom: 10px; font-size: 11.5px; color: var(--fg-muted); }
@keyframes sh-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* splash */
.sh-splash {
  position: fixed; inset: 0; z-index: 3000;
  display: grid; place-items: center;
  background: var(--bg); color: var(--fg);
  transition: opacity 0.3s ease, visibility 0s 0.3s;
}
.sh-splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.sh-splash-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px; text-align: center; max-width: 520px; }
.sh-splash-logo { margin-bottom: 8px; filter: drop-shadow(0 8px 18px color-mix(in srgb, var(--accent) 35%, transparent)); }
.sh-splash-name { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.sh-splash-tag { color: var(--fg-muted); font-size: 13.5px; }
.sh-splash-bar { position: relative; width: 160px; height: 3px; margin-top: 18px; overflow: hidden; border-radius: 3px; background: var(--bg-sunken); }
.sh-splash-bar span { position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 3px; background: var(--accent); animation: sh-indeterminate 1.1s ease-in-out infinite; }
.sh-splash-msg { margin-top: 6px; font-size: 12.5px; color: var(--fg-subtle); line-height: 1.6; }
.sh-splash.is-failed .sh-splash-bar { display: none; }
.sh-splash.is-failed .sh-splash-msg { color: var(--fg); font-size: 13.5px; margin-top: 18px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); }
@keyframes sh-indeterminate { 0% { left: -40%; } 100% { left: 100%; } }
.sh-noscript { position: fixed; inset: auto 16px 16px 16px; z-index: 4000; padding: 14px 16px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-2); }

/* readiness popover content */
.sh-check { display: flex; flex-direction: column; max-height: min(70vh, 520px); }
.sh-check-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.sh-check-head strong { font-size: 14px; }
.sh-check-head .muted { font-size: 12px; }
.sh-check-list { margin: 0; padding: 6px; list-style: none; overflow: auto; }
.sh-check-item {
  display: flex; gap: 9px; align-items: flex-start; width: 100%;
  padding: 7px 8px; border: 0; border-radius: var(--radius-sm); background: none;
  color: var(--fg); font-size: 12.5px; line-height: 1.4; text-align: left;
}
button.sh-check-item { cursor: pointer; }
button.sh-check-item:hover, button.sh-check-item:focus-visible { background: var(--bg-hover); outline: none; }
.sh-check-item .icon { margin-top: 1px; }
.sh-check-item.is-error .icon { color: var(--danger); }
.sh-check-item.is-warning .icon { color: var(--warning); }
.sh-check-item.is-info .icon { color: var(--info); }
.sh-check-item.is-ok .icon { color: var(--success); }
.sh-check-ref { margin-left: auto; padding-left: 8px; color: var(--accent-text); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.sh-check-foot { padding: 8px 14px 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--fg-muted); }

/* ============================================================================================
   7. Dialogs, toasts, menus, popovers (js/ui/dialogs.js)
   ============================================================================================ */

.dlg-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center; padding: 20px;
  background: rgba(10, 15, 26, 0.42);
  backdrop-filter: blur(2px);
  animation: dlg-fade 0.14s ease-out;
}
:root[data-theme="dark"] .dlg-overlay { background: rgba(0, 0, 0, 0.58); }
.dlg-overlay.is-closing { animation: dlg-fade-out 0.12s var(--ease-out) forwards; }
.dlg {
  display: flex; flex-direction: column;
  width: min(var(--dlg-w, 520px), 100%);
  max-height: min(88vh, 940px);
  background: var(--bg-elev); color: var(--fg);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  animation: dlg-pop 0.2s var(--ease-out);
}
.dlg:focus { outline: none; }
.dlg-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 10px 18px; flex: none; }
.dlg-head-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-text); flex: none; }
.dlg-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 650; }
.dlg-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 4px 18px 18px; overscroll-behavior: contain; }
.dlg-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: none; flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: color-mix(in srgb, var(--bg-sunken) 55%, var(--bg-elev));
}
.dlg-foot-start { margin-right: auto; }
.dlg-text { margin: 0; line-height: 1.55; }
.dlg-text + .dlg-text { margin-top: 8px; }
.dlg-note { padding: 10px 12px; border-radius: var(--radius); background: var(--bg-sunken); color: var(--fg-muted); font-size: 12.5px; line-height: 1.5; }
.dlg-note.is-warning { background: var(--warning-soft); color: var(--fg); }
.dlg-note.is-warning .icon { color: var(--warning); }
@keyframes dlg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dlg-fade-out { to { opacity: 0; } }
@keyframes dlg-pop { from { opacity: 0; transform: translateY(6px) scale(0.96); } to { opacity: 1; transform: none; } }

/* form layout inside dialogs */
.dlg-section + .dlg-section { margin-top: 18px; }
.dlg-section-title { margin: 0 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-muted); }
.dlg-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.dlg-grid2 > .is-wide { grid-column: 1 / -1; }
.dlg-form .field, .dlg-form .wg-field { min-width: 0; }
.dlg-inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.dlg-inline:last-child { border-bottom: 0; }
.dlg-inline-text { min-width: 0; }
.dlg-inline-text strong { display: block; font-size: 13px; font-weight: 600; }
.dlg-inline-text span { display: block; font-size: 12px; color: var(--fg-muted); }
.dlg-inline-ctl { flex: none; display: flex; align-items: center; gap: 6px; }
.dlg-inline-ctl .input { width: 96px; }
.dlg-meta { font-size: 12px; color: var(--fg-subtle); }

/* chips (radio cards) */
.dlg-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.dlg-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--bg-elev); color: var(--fg); text-align: left; cursor: pointer;
  transition: border-color 0.12s, background-color 0.12s, box-shadow 0.12s;
}
.dlg-chip:hover { border-color: var(--accent); }
.dlg-chip[aria-checked="true"], .dlg-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.dlg-chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.dlg-chip-title { font-size: 13px; font-weight: 600; }
.dlg-chip-sub { font-size: 11.5px; color: var(--fg-muted); }

/* units dialog */
.dlg-units-example { margin: 12px 0 4px; padding: 10px 12px; border-radius: var(--radius); background: var(--bg-sunken); font-size: 12.5px; line-height: 1.6; color: var(--fg-muted); }
.dlg-units-example b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.dlg-units-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 20px; }
.dlg-units-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.dlg-units-name { flex: 1; min-width: 0; }
.dlg-units-name > span { display: block; font-size: 13px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg-units-name > small { display: block; font-size: 11.5px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; }
.dlg-units-row .select { width: 116px; height: 30px; flex: none; }
.dlg-units-row.is-override .dlg-units-name > span::after { content: " •"; color: var(--accent); font-weight: 800; }

/* cards grid (examples, wizard) */
.dlg-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.dlg-toolbar .input { flex: 1 1 200px; }
.dlg-search { position: relative; flex: 1 1 220px; display: flex; }
.dlg-search .icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--fg-subtle); pointer-events: none; }
.dlg-search .input { width: 100%; padding-left: 32px; }
.dlg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.dlg-card {
  display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); color: var(--fg);
  text-align: left; cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.15s, transform 0.15s;
}
.dlg-card:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); box-shadow: var(--shadow-1); transform: translateY(-1px); }
.dlg-card:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.dlg-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.dlg-thumb {
  position: relative; display: grid; place-items: center; height: 132px; overflow: hidden;
  background-color: var(--bg-sunken);
  background-image: radial-gradient(circle, color-mix(in srgb, var(--fg-subtle) 28%, transparent) 1px, transparent 1.2px);
  background-size: 14px 14px;
  border-bottom: 1px solid var(--border);
}
.dlg-thumb > svg { display: block; width: 100%; height: 100%; }
.dlg-card-body { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px 12px; min-width: 0; }
.dlg-card-title { font-size: 13.5px; font-weight: 650; line-height: 1.3; }
.dlg-card-desc { font-size: 12.5px; color: var(--fg-muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dlg-card-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.dlg-tag { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 999px; background: var(--bg-sunken); color: var(--fg-muted); font-size: 11px; font-weight: 550; white-space: nowrap; }
.dlg-tag.is-type { background: var(--accent-soft); color: var(--accent-text); }
.dlg-empty { padding: 36px 12px; text-align: center; color: var(--fg-muted); }

/* new-model wizard */
.dlg-wsteps { display: flex; align-items: center; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 12.5px; color: var(--fg-muted); font-weight: 600; flex-wrap: wrap; }
.dlg-wsteps li { display: inline-flex; align-items: center; gap: 6px; }
.dlg-wsteps li + li::before { content: ""; width: 18px; height: 1.5px; background: var(--border-strong); margin-right: 2px; }
.dlg-wsteps .n { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-strong); font-size: 11px; }
.dlg-wsteps li.is-current { color: var(--accent-text); }
.dlg-wsteps li.is-current .n { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.dlg-wsteps li.is-done .n { border-color: var(--accent); color: var(--accent-text); }
.dlg-type-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.dlg-type-card { padding: 14px; gap: 8px; }
.dlg-type-card .dlg-type-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.dlg-type-card strong { font-size: 14px; }
.dlg-type-card span { font-size: 12.5px; color: var(--fg-muted); line-height: 1.45; }
.dlg-wiz { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; min-height: 330px; }
.dlg-tpls { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-height: 52vh; overflow: auto; padding-right: 2px; }
.dlg-tpl {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 10px;
  border: 1px solid transparent; border-radius: var(--radius); background: none; color: var(--fg);
  text-align: left; cursor: pointer;
}
.dlg-tpl:hover { background: var(--bg-hover); }
.dlg-tpl[aria-pressed="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.dlg-tpl strong { font-size: 13px; font-weight: 600; }
.dlg-tpl span { font-size: 12px; color: var(--fg-muted); line-height: 1.4; }
.dlg-tpl:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.dlg-wiz-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dlg-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; }
.dlg-preview {
  position: relative; display: grid; place-items: center; height: 230px; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius);
  background-color: var(--bg-sunken);
  background-image: radial-gradient(circle, color-mix(in srgb, var(--fg-subtle) 28%, transparent) 1px, transparent 1.2px);
  background-size: 16px 16px;
  color: var(--fg-muted); font-size: 12.5px;
}
.dlg-preview > svg { width: 100%; height: 100%; }
.dlg-preview-stats { position: absolute; left: 8px; bottom: 6px; font-size: 11.5px; color: var(--fg-muted); background: color-mix(in srgb, var(--bg-elev) 80%, transparent); padding: 1px 6px; border-radius: 4px; }
.dlg-preview.is-error { color: var(--danger); text-align: center; padding: 16px; }

/* shortcuts & about */
.dlg-keys { width: 100%; border-collapse: collapse; font-size: 13px; }
.dlg-keys td { padding: 6px 0; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dlg-keys td:last-child { text-align: right; white-space: nowrap; }
.dlg-keys .kbd + .kbd { margin-left: 3px; }
.dlg-keys .or { margin: 0 6px; color: var(--fg-subtle); font-size: 11.5px; }
.dlg-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 6px 26px; }
.dlg-tips { margin: 0; padding-left: 18px; color: var(--fg-muted); font-size: 12.5px; line-height: 1.6; }
.dlg-about-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.dlg-about-hero h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.dlg-about-hero p { margin: 2px 0 0; color: var(--fg-muted); }
.dlg-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* toasts */
.dlg-toasts {
  position: fixed; right: 16px; bottom: calc(var(--status-h) + 14px); z-index: 1200;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  pointer-events: none;
}
.dlg-toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  min-width: 260px; max-width: min(440px, calc(100vw - 32px));
  padding: 10px 8px 10px 12px;
  background: var(--bg-elev); color: var(--fg);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  font-size: 13px; line-height: 1.45;
  animation: dlg-toast-in 0.2s var(--ease-out);
}
.dlg-toast.is-leaving { animation: dlg-toast-out 0.16s var(--ease-out) forwards; }
.dlg-toast-icon { margin-top: 1px; color: var(--accent-text); }
.dlg-toast.is-success .dlg-toast-icon { color: var(--success); }
.dlg-toast.is-warning .dlg-toast-icon { color: var(--warning); }
.dlg-toast.is-error .dlg-toast-icon { color: var(--danger); }
.dlg-toast-msg { flex: 1; min-width: 0; padding-top: 1px; word-break: break-word; }
.dlg-toast-action { flex: none; height: 26px; margin-top: -2px; font-weight: 650; color: var(--accent-text); }
.dlg-toast .dlg-toast-close { flex: none; width: 24px; height: 24px; margin-top: -2px; color: var(--fg-muted); }
@keyframes dlg-toast-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes dlg-toast-out { to { opacity: 0; transform: translateX(12px); } }

/* menus & popovers */
.dlg-menu, .dlg-popover {
  position: fixed; z-index: 1100; left: 0; top: 0;
  background: var(--bg-elev); color: var(--fg);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  animation: dlg-menu-in 0.12s ease-out;
}
.dlg-menu { min-width: 220px; max-width: min(340px, calc(100vw - 16px)); max-height: min(72vh, 560px); overflow: auto; padding: 4px; }
.dlg-popover { width: min(380px, calc(100vw - 16px)); overflow: hidden; }
.dlg-menu:focus, .dlg-popover:focus { outline: none; }
.dlg-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 32px; padding: 5px 10px 5px 8px;
  border: 0; border-radius: var(--radius-sm); background: none; color: var(--fg);
  font-size: 13px; text-align: left; cursor: pointer;
}
.dlg-menu-item:hover, .dlg-menu-item:focus-visible { background: var(--accent-soft); outline: none; }
.dlg-menu-item:disabled { opacity: 0.45; cursor: default; background: none; }
.dlg-menu-item.is-danger { color: var(--danger); }
.dlg-menu-icon { display: grid; place-items: center; width: 18px; height: 18px; flex: none; color: var(--fg-muted); }
.dlg-menu-item[aria-checked="true"] .dlg-menu-icon { color: var(--accent-text); }
.dlg-menu-label { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dlg-menu-hint { font-size: 11.5px; color: var(--fg-muted); }
.dlg-menu-shortcut { margin-left: 12px; color: var(--fg-subtle); font-size: 11.5px; font-family: var(--font-mono); white-space: nowrap; }
.dlg-menu-sep { height: 1px; margin: 4px 6px; background: var(--border); }
.dlg-menu-heading { padding: 7px 10px 3px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-subtle); }
@keyframes dlg-menu-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* ============================================================================================
   8. Responsive, reduced motion, print
   ============================================================================================ */

@media (max-width: 1320px) {
  .sh-type .seg button .icon { display: none; }
  .sh-type .seg button { padding: 0 9px; }
}
@media (max-width: 1180px) {
  .sh-analyze .kbd { display: none; }
  .sh-step { padding-right: 10px; }
}
@media (max-width: 1160px) {
  .sh-type .seg { display: none; }
  .sh-type-select { display: inline-block; }
  .sh-file-btn .sh-btn-text, .sh-units-btn .sh-btn-text { display: none; }
  .sh-units-btn .sh-btn-short { display: inline; font-weight: 600; }
}

/* tablets & phones: side panels become slide-over drawers */
@media (max-width: 900px) {
  :root { --header-h: 50px; --modebar-h: 44px; }
  .sh-drawer-btn { display: inline-flex; }
  .sh-body { grid-template-columns: 0 0 minmax(0, 1fr) 0 0; }
  .sh-resizer[data-resize="left"], .sh-resizer[data-resize="right"] { display: none; }
  .sh-left, .sh-right {
    position: absolute; top: 0; bottom: 0; z-index: 40;
    width: min(88vw, 380px);
    box-shadow: var(--shadow-2);
    visibility: hidden;
    transition: transform 0.28s var(--ease-drawer), visibility 0s 0.28s;
  }
  .sh-left { left: 0; transform: translateX(-104%); }
  .sh-right { right: 0; transform: translateX(104%); }
  .sh-app[data-drawer="left"] .sh-left,
  .sh-app[data-drawer="right"] .sh-right { visibility: visible; transform: none; transition: transform 0.28s var(--ease-drawer); }
  .sh-backdrop { display: block; position: absolute; inset: 0; z-index: 35; background: rgba(10, 15, 26, 0.35); opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0s 0.2s; }
  .sh-app[data-drawer="left"] .sh-backdrop, .sh-app[data-drawer="right"] .sh-backdrop { opacity: 1; visibility: visible; transition: opacity 0.2s; }
  .sh-bottom { flex-basis: min(var(--sh-bottom-h), 42vh); }
  .sh-panel-toggles .sh-toggle-side { display: none; }
  .sh-stat-units, .sh-stat-dof { display: none; }
  /* compact header & modebar */
  .sh-brand-name, .sh-hide-md { display: none !important; }
  .sh-more-btn { display: inline-flex; }
  .sh-step { gap: 0; padding: 0 5px; }
  .sh-step .sh-step-label { display: none; }
  .sh-step[aria-current="step"] { gap: 7px; padding-right: 11px; }
  .sh-step[aria-current="step"] .sh-step-label { display: inline; }
  .sh-case-label { display: none; }
  .sh-case .select { max-width: 190px; }
}

/* phones: compact header with an overflow menu */
@media (max-width: 600px) {
  :root { --header-h: 48px; --modebar-h: 42px; --status-h: 24px; }
  .sh-header { gap: 2px; padding: 0 4px; }
  .sh-brand { padding: 0 4px; }
  .sh-brand-name, .sh-divider, .sh-hide-sm { display: none !important; }
  .sh-more-btn { display: inline-flex; }
  .sh-title { flex: 1 1 auto; font-size: 13.5px; padding: 0 6px; }
  .sh-type { margin-left: 2px; }
  .sh-type-select { width: 104px; height: 30px; font-size: 12.5px; }
  .sh-modebar { gap: 6px; padding: 0 6px; }
  .sh-step { gap: 0; padding: 0 5px; }
  .sh-step .sh-step-label { display: none; }
  .sh-step[aria-current="step"] { gap: 6px; padding-right: 10px; }
  .sh-step[aria-current="step"] .sh-step-label { display: inline; }
  .sh-step-sep { display: none; }
  .sh-steps { gap: 1px; }
  .sh-ready-long { display: none; }
  .sh-ready-short { display: inline; }
  .sh-case-label { display: none; }
  .sh-case .select { max-width: 96px; font-size: 12.5px; padding-left: 8px; }
  .sh-analyze .sh-btn-text { display: none; }
  .sh-analyze { width: 32px; padding: 0; }
  .sh-status { gap: 10px; font-size: 11.5px; padding-left: 8px; }
  .sh-stat-solve, .sh-stat-extra { display: none; }
  .dlg-overlay { padding: 0; place-items: end stretch; }
  .dlg { width: 100%; max-height: 94vh; border-radius: 14px 14px 0 0; animation-name: dlg-sheet; }
  .dlg-foot { border-radius: 0; }
  .dlg-grid2 { grid-template-columns: minmax(0, 1fr); }
  .dlg-wiz { grid-template-columns: minmax(0, 1fr); }
  .dlg-tpls { max-height: 180px; }
  .dlg-toasts { left: 12px; right: 12px; align-items: stretch; }
  .dlg-toast { max-width: none; min-width: 0; }
  @keyframes dlg-sheet { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}

@media (max-width: 420px) {
  .sh-step[aria-current="step"] .sh-step-label { display: none; }
  .sh-step[aria-current="step"] { padding-right: 5px; }
  .sh-stat-counts .sh-stat-text { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Only the report page prints. */
@media print {
  @page { margin: 16mm 14mm; }
  html, body { height: auto; overflow: visible; background: #fff !important; color: #000; }
  .sh-app { display: block; height: auto; }
  .sh-header, .sh-modebar, .sh-body, .sh-status, #page-code, .sh-splash, .skip-link,
  .dlg-overlay, .dlg-toasts, .dlg-menu, .dlg-popover, .sh-noscript { display: none !important; }
  #page-report { display: block !important; overflow: visible; background: #fff; }
}
