/* ==========================================================================
   Components — cards, buttons, inputs, drop zone, tabs, progress, report,
   self-check, diff view, viewer panel, presets, toasts, dialogs
   ========================================================================== */

/* --- cards --- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-3); box-shadow: var(--shadow-1); }
.card__body { padding: var(--s-5); }
.card__head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border); }
.card__head h3 { flex: 1; font-size: var(--fs-base); }
.card--flat { box-shadow: none; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: var(--fs-sm); }
.stack { display: flex; flex-direction: column; gap: var(--s-3); }
.row { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.grow { flex: 1; }

/* --- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 36px; padding: 0 var(--s-4); border-radius: var(--r-2); border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-weight: 500; font-size: var(--fs-sm); line-height: 1;
  cursor: pointer; user-select: none; white-space: nowrap; text-decoration: none;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast);
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--lg { min-height: 44px; padding: 0 var(--s-6); font-size: var(--fs-base); }
.btn--sm { min-height: 30px; padding: 0 var(--s-3); font-size: var(--fs-xs); border-radius: var(--r-1); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--warn { background: var(--warn-soft); border-color: var(--warn); color: var(--text); }
.btn--warn:hover { background: color-mix(in srgb, var(--warn-soft) 70%, var(--warn)); }
.btn--danger { color: var(--bad-text); }
.btn--icon { width: 36px; padding: 0; }
.btn--icon.btn--sm { width: 30px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--block { width: 100%; }

/* segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-2); }
.seg button { border: 0; background: transparent; color: var(--text-2); padding: 0 var(--s-3); min-height: 28px; border-radius: 7px; font-size: var(--fs-xs); font-weight: 500; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.seg button:hover:not([aria-pressed="true"]) { color: var(--text); }

/* --- inputs --- */
.field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-1) var(--s-3); padding: var(--s-2) 0; }
.field--stack { grid-template-columns: 1fr; }
.field__label { font-size: var(--fs-sm); color: var(--text); display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
.field__help { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--text-3); line-height: 1.4; }
.field__hint { font-size: var(--fs-xs); color: var(--text-3); grid-column: 2; text-align: right; }
.field--disabled { opacity: .55; }
.input, .select {
  min-height: 34px; padding: 0 var(--s-3); border-radius: var(--r-1); border: 1px solid var(--border-strong);
  background: var(--bg-2); color: var(--text); font-size: var(--fs-sm); width: 100%;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:focus-visible, .select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input--num { width: 112px; text-align: right; font-family: var(--font-mono); font-size: var(--fs-xs); }
.input--sm { min-height: 30px; }
.select { width: auto; max-width: 100%; padding-right: var(--s-6); cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.select--block { width: 100%; }
.unit-wrap { display: inline-flex; align-items: center; gap: var(--s-2); }
.unit-wrap .unit { font-size: var(--fs-xs); color: var(--text-3); min-width: 2.2em; }
/* switch */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.switch__track { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--border-strong); transition: background var(--t-fast); }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--t-med) var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--focus); outline-offset: 2px; }
.check { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }

/* settings groups */
.settings__group { border-top: 1px solid var(--border); padding: var(--s-3) 0 var(--s-2); }
.settings__group:first-child { border-top: 0; padding-top: 0; }
.settings__group > h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; margin-bottom: var(--s-1); }
details.adv > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) 0; font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); border-top: 1px solid var(--border); }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform var(--t-fast); margin-left: 2px; }
details.adv[open] > summary::before { transform: rotate(45deg); }
details.adv > summary:hover { color: var(--text); }

/* presets bar */
.presets { display: flex; gap: var(--s-2); align-items: center; }
.presets .select { flex: 1; min-width: 0; }
.presets__menu { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 200px; padding: var(--s-1); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-2); box-shadow: var(--shadow-2); }
.menu button { display: block; width: 100%; text-align: left; padding: var(--s-2) var(--s-3); background: none; border: 0; border-radius: var(--r-1); font-size: var(--fs-sm); cursor: pointer; color: var(--text); }
.menu button:hover { background: var(--surface-2); }
.menu button:disabled { color: var(--text-3); cursor: not-allowed; }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-1) 0; }

/* --- drop zone --- */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 220px; padding: var(--s-8); border: 2px dashed var(--border-strong); border-radius: var(--r-3);
  background: var(--surface); cursor: pointer; text-align: center; transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); background: var(--surface-2); }
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); }
.dropzone__icon { width: 48px; height: 48px; color: var(--accent-text); margin-bottom: var(--s-2); }
.dropzone__title { font-size: var(--fs-md); font-weight: 600; }
.dropzone__sub { color: var(--text-2); font-size: var(--fs-sm); }
.dropzone__ext { color: var(--text-3); font-size: var(--fs-xs); margin-top: var(--s-2); font-family: var(--font-mono); }
.dropzone--compact { min-height: 0; padding: var(--s-4); flex-direction: row; justify-content: flex-start; text-align: left; }
.dropzone--compact .dropzone__icon { width: 24px; height: 24px; margin: 0; }

/* --- file / model card --- */
.filecard__name { font-weight: 600; word-break: break-all; display: flex; align-items: center; gap: var(--s-2); }
.filecard__name svg { width: 18px; height: 18px; color: var(--accent-text); flex: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: var(--s-1) var(--s-4); font-size: var(--fs-sm); margin-top: var(--s-3); }
.kv dt { color: var(--text-3); white-space: nowrap; }
.kv dd { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-top: var(--s-3); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-pill); font-size: var(--fs-xs); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.chip--ok { background: var(--ok-soft); color: var(--ok-text); border-color: transparent; }
.chip--warn { background: var(--warn-soft); color: var(--warn-text); border-color: transparent; }
.chip--bad { background: var(--bad-soft); color: var(--bad-text); border-color: transparent; }
.chip--accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }

/* --- tabs --- */
.tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--border); }
.tabs [role="tab"] { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: var(--s-2) var(--s-3) var(--s-3); color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; cursor: pointer; display: inline-flex; gap: var(--s-2); align-items: center; }
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs [role="tab"] .count { font-size: var(--fs-xs); color: var(--text-3); background: var(--surface-2); padding: 1px 6px; border-radius: var(--r-pill); }
[role="tabpanel"] { padding-top: var(--s-4); }

/* --- progress --- */
.progress { padding: var(--s-6); }
.progress__row { display: flex; align-items: center; gap: var(--s-4); }
.progress__label { flex: 1; font-weight: 500; }
.progress__pct { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text-2); min-width: 3.5em; text-align: right; }
.progress__bar { height: 8px; margin-top: var(--s-3); border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.progress__fill { height: 100%; width: 0; background: var(--accent); border-radius: var(--r-pill); transition: width 160ms linear; }
.progress__fill.is-indeterminate { width: 30%; animation: indet 1.2s var(--ease) infinite; }
@keyframes indet { from { transform: translateX(-120%); } to { transform: translateX(400%); } }

/* --- empty state / notices --- */
.empty { padding: var(--s-10) var(--s-6); text-align: center; color: var(--text-2); }
.empty svg { width: 40px; height: 40px; margin: 0 auto var(--s-3); color: var(--text-3); }
.empty h3 { color: var(--text); margin-bottom: var(--s-2); }
.notice { display: flex; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-2); font-size: var(--fs-sm); border: 1px solid transparent; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice--info { background: var(--accent-soft); color: var(--text); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.notice--warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.notice--bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.notice--ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.notice ul { margin: var(--s-1) 0 0; padding-left: 1.2em; }
.notice li + li { margin-top: 2px; }

/* --- report card --- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-3); }
.stat { padding: var(--s-4); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-2); min-width: 0; }
.stat__label { font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat__value { font-size: var(--fs-lg); font-weight: 600; margin-top: var(--s-1); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat__before { font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.stat__delta { display: inline-block; margin-top: var(--s-1); font-size: var(--fs-xs); font-weight: 600; padding: 1px 7px; border-radius: var(--r-pill); font-variant-numeric: tabular-nums; }
.delta--down { background: var(--ok-soft); color: var(--ok-text); }
.delta--up { background: var(--warn-soft); color: var(--warn-text); }
.delta--same { background: var(--surface-3); color: var(--text-2); }
.report-list { list-style: none; margin: 0; padding: 0; }
.report-list li { display: flex; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.report-list li:first-child { border-top: 0; }
.report-list .ico { width: 26px; height: 26px; border-radius: var(--r-1); display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-text); }
.report-list .ico svg { width: 15px; height: 15px; }
.report-list .ico--info { background: var(--surface-3); color: var(--text-2); }
.report-list .what { font-weight: 600; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-bottom: 2px; }

/* self-check */
.selfcheck { border-radius: var(--r-3); border: 1px solid var(--border); overflow: hidden; }
.selfcheck__head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); }
.selfcheck__head h3 { flex: 1; }
.selfcheck__head > svg { width: 22px; height: 22px; flex: none; color: var(--text-2); }
.selfcheck--ok .selfcheck__head { background: var(--ok-soft); }
.selfcheck--bad .selfcheck__head { background: var(--bad-soft); }
.selfcheck__badge { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 700; font-size: var(--fs-sm); padding: var(--s-1) var(--s-3); border-radius: var(--r-pill); }
.selfcheck--ok .selfcheck__badge { background: var(--ok); color: #fff; }
.selfcheck--bad .selfcheck__badge { background: var(--bad); color: #fff; }
.selfcheck__badge svg { width: 16px; height: 16px; }
.selfcheck ul { list-style: none; margin: 0; padding: 0; }
.selfcheck li { display: grid; grid-template-columns: 24px 130px 1fr; gap: var(--s-3); align-items: start; padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.selfcheck li .name { font-weight: 600; }
.selfcheck li .detail { color: var(--text-2); }
.selfcheck li.fail .detail { color: var(--text); }
.selfcheck .mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.selfcheck .mark svg { width: 13px; height: 13px; }
.selfcheck .mark--ok { background: var(--ok); color: #fff; }
.selfcheck .mark--bad { background: var(--bad); color: #fff; }
.selfcheck__foot { padding: var(--s-3) var(--s-5); border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-3); }

/* op table (CAM) */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { text-align: left; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 600; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }

/* --- viewer panel --- */
.viewer { display: flex; flex-direction: column; gap: var(--s-3); }
.viewer__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.viewer__stage { position: relative; height: clamp(320px, 56vh, 720px); border-radius: var(--r-3); border: 1px solid var(--border); overflow: hidden; background: var(--viewer-bg); }
.viewer__stage canvas { width: 100%; height: 100%; touch-action: none; outline: none; }
.viewer__placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-2); text-align: center; padding: var(--s-6); font-size: var(--fs-sm); }
.viewer__legend { position: absolute; left: var(--s-3); bottom: var(--s-3); display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); font-size: var(--fs-xs); color: var(--text-2); background: color-mix(in srgb, var(--surface) 82%, transparent); padding: var(--s-1) var(--s-2); border-radius: var(--r-1); pointer-events: none; }
.viewer__legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.viewer__hint { position: absolute; right: var(--s-3); bottom: var(--s-3); font-size: var(--fs-xs); color: var(--text-3); pointer-events: none; }
.zclip { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); color: var(--text-2); min-width: 220px; flex: 1; }
.zclip input[type="range"] { flex: 1; accent-color: var(--accent); min-width: 100px; }
.zclip output { font-family: var(--font-mono); min-width: 6em; text-align: right; }
.layers { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); }
.layers .check i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }

/* --- diff view --- */
.diff { display: flex; flex-direction: column; gap: var(--s-3); }
.diff__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.diff__bar .input { width: 130px; }
.diff__bar .input--search { width: 220px; }
.diff__legend { display: flex; gap: var(--s-3); font-size: var(--fs-xs); color: var(--text-2); margin-left: auto; }
.diff__legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }
.diff__panes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.diff__pane { border: 1px solid var(--border); border-radius: var(--r-2); background: var(--code-bg); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.diff__pane-head { padding: var(--s-2) var(--s-3); font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--border); background: var(--surface); display: flex; justify-content: space-between; }
.diff__scroll { position: relative; height: clamp(320px, 60vh, 760px); overflow: auto; overscroll-behavior: contain; font-family: var(--font-mono); font-size: 12px; line-height: var(--row-h); }
.diff__spacer { position: relative; width: 100%; }
.diff__rows { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.drow { display: flex; height: var(--row-h); white-space: pre; box-shadow: inset 3px 0 0 transparent; }
.drow .ln { flex: none; width: 7ch; padding-right: 1ch; text-align: right; color: var(--text-3); user-select: none; }
.drow .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: 0 var(--s-2); }
.drow .why { flex: none; margin-right: var(--s-2); font-family: var(--font-sans); font-size: 10px; line-height: 16px; margin-top: 3px; padding: 0 6px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-2); max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
.drow--add { background: var(--diff-add); box-shadow: inset 3px 0 0 var(--diff-add-bar); }
.drow--del { background: var(--diff-del); box-shadow: inset 3px 0 0 var(--diff-del-bar); }
.drow--chg { background: var(--diff-chg); box-shadow: inset 3px 0 0 var(--diff-chg-bar); }
.drow--gap { background: repeating-linear-gradient(-45deg, transparent 0 6px, var(--surface-2) 6px 12px); }
.drow--hit { outline: 2px solid var(--accent); outline-offset: -2px; }
.drow--cur { background: var(--accent-soft); }

/* --- toasts --- */
.toasts { position: fixed; right: var(--s-4); bottom: var(--s-4); z-index: 50; display: flex; flex-direction: column; gap: var(--s-2); max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: var(--s-3) var(--s-4); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-2); box-shadow: var(--shadow-2); font-size: var(--fs-sm); animation: toast-in var(--t-med) var(--ease); }
.toast--bad { border-color: var(--bad); }
.toast--ok { border-color: var(--ok); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

/* --- dialogs --- */
dialog.dlg { border: 1px solid var(--border-strong); border-radius: var(--r-3); background: var(--surface); color: var(--text); padding: var(--s-6); width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-2); }
dialog.dlg::backdrop { background: rgba(0,0,0,.5); }
dialog.dlg h3 { margin-bottom: var(--s-3); }
dialog.dlg .dlg__actions { display: flex; justify-content: flex-end; gap: var(--s-2); margin-top: var(--s-5); }

/* --- about page --- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: var(--s-10); margin-bottom: var(--s-3); font-size: var(--fs-lg); }
.prose h3 { margin-top: var(--s-6); margin-bottom: var(--s-2); }
.prose p, .prose li { color: var(--text-2); }
.prose p + p { margin-top: var(--s-3); }
.prose ul, .prose ol { padding-left: 1.3em; margin: var(--s-2) 0; }
.prose li + li { margin-top: var(--s-1); }
.prose strong { color: var(--text); }
.prose code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); }
.targets { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-2); margin-top: var(--s-3); }
.targets li { list-style: none; margin: 0; padding: var(--s-2) var(--s-3); border: 1px solid var(--border); border-radius: var(--r-1); background: var(--surface); font-size: var(--fs-sm); color: var(--text); }
.targets li small { display: block; color: var(--text-3); }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .diff__panes { grid-template-columns: 1fr; }
  .diff__scroll { height: 46vh; }
  .selfcheck li { grid-template-columns: 24px 1fr; }
  .selfcheck li .detail { grid-column: 2; }
  .viewer__stage { height: clamp(260px, 48vh, 520px); }
  .card__body { padding: var(--s-4); }
  .diff__bar .input--search { width: 160px; }
}
