/* Base: tokens mapping, Bootstrap overrides, page chrome.
   design/tokens.css is loaded before this file (see index.html). */

:root {
  --app-bg: var(--ui-color-canvas);
  --app-surface: var(--ui-color-surface);
  --app-surface-muted: var(--ui-color-surface-muted);
  --app-border: var(--ui-color-border);
  --app-border-strong: var(--ui-color-border-strong);
  --app-text: var(--ui-color-text);
  --app-muted: var(--ui-color-text-secondary);
  --app-text-tertiary: var(--ui-color-text-tertiary);
  --app-primary: var(--ui-color-primary);
  --app-primary-light: var(--ui-color-primary-muted);
  --app-primary-hover: var(--ui-color-primary-hover);
  --app-primary-active: var(--ui-color-primary-hover);
  --bs-primary: var(--app-primary);
  --bs-primary-rgb: 26, 82, 120;
  --bs-primary-text-emphasis: var(--app-primary-active);
  --bs-primary-bg-subtle: var(--app-primary-light);
  --bs-primary-border-subtle: color-mix(in srgb, var(--app-primary) 28%, var(--app-border));
  --bs-link-color: var(--app-primary);
  --bs-link-hover-color: var(--app-primary-hover);
  --bs-focus-ring-color: rgba(var(--bs-primary-rgb), 0.25);
  --status-equal: var(--ui-color-success);
  --status-equal-bg: var(--ui-color-success-muted);
  --status-diff: var(--ui-color-warning);
  --status-diff-bg: var(--ui-color-warning-muted);
  --status-missing: var(--ui-color-danger);
  --status-missing-bg: var(--ui-color-danger-muted);
  --font-ui: var(--ui-font-sans);
  --font-mono: var(--ui-font-mono);
  --app-panel-radius: var(--ui-radius-panel);
  --app-panel-border: 1px solid var(--app-border);
  --app-panel-shadow: var(--ui-shadow-none);
  --app-header-sticky-offset: 0px;
  --app-sticky-overlap: 1px;
  --app-z-sticky-header: 1050;
  --app-z-sticky-subbar: 1040;
  --app-z-dropdown: 1048;
  --app-z-drag-overlay: 1060;
  --bs-dropdown-zindex: var(--app-z-dropdown);
  --code-bg: #1a2332;
  --code-fg: #abb2bf;
  --code-muted: #7d8b99;
  --code-rule: #2d3a47;
  --code-highlight-bg: rgba(30, 90, 138, 0.45);
  --code-highlight-bar: #5ba3d9;
  --code-highlight-line-no: #b8d4eb;
  --code-panel-bg: #fafbfc;
  --app-table-head-bg: var(--app-surface);
  --app-table-head-text: var(--app-primary);
  --app-table-head-fill: var(--app-table-head-bg);
  --app-table-head-edge: var(--app-border);
  --app-table-head-edge-shadow: inset 0 -1px 0 0 var(--app-table-head-edge);
  --app-table-head-bleed-cover: inset 0 2px 0 0 var(--app-table-head-fill);
  --app-table-row-padding-y: 0.5rem;
  --app-table-row-padding-x: 0.5rem;
  --app-table-expand-padding-y: 0.5rem;
  --app-table-head-padding-y: 0.65rem;
  --compare-row-hover-bg: var(--ui-table-row-hover);
  --compare-col-hover-bg: var(--ui-table-col-hover);
  --compare-row-col-hover-bg: var(--ui-table-row-col-hover);
}

.btn-primary {
  --bs-btn-bg: var(--app-primary);
  --bs-btn-border-color: var(--app-primary);
  --bs-btn-hover-bg: var(--app-primary-hover);
  --bs-btn-hover-border-color: var(--app-primary-hover);
  --bs-btn-active-bg: var(--app-primary-active);
  --bs-btn-active-border-color: var(--app-primary-active);
  --bs-btn-disabled-bg: var(--app-primary);
  --bs-btn-disabled-border-color: var(--app-primary);
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  min-height: var(--ui-size-control);
}

.form-select,
.form-control {
  border-color: var(--app-border);
  color: var(--app-text);
}

.form-select-sm,
.form-control-sm,
.input-group-sm > .form-control,
.input-group-sm > .form-select,
.input-group-sm > .input-group-text {
  min-height: var(--ui-size-control);
}

.form-check-input:checked {
  background-color: var(--app-primary);
  border-color: var(--app-primary);
}

.form-check-input:focus-visible {
  border-color: rgba(var(--bs-primary-rgb), 0.55);
  box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.form-check-input:focus:not(:focus-visible) {
  box-shadow: none;
  border-color: var(--bs-border-color);
}

.form-check-input:checked:focus:not(:focus-visible) {
  border-color: var(--app-primary);
}

.form-switch .form-check-input {
  --form-switch-bg-off: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");
  --form-switch-bg-off-hover: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.38%29'/%3e%3c/svg%3e");
  --form-switch-bg-on: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
  --form-switch-bg-focus: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%235a94c4'/%3e%3c/svg%3e");
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-switch .form-check-input:hover:not(:disabled):not(:focus-visible) {
  border-color: rgba(var(--bs-primary-rgb), 0.45);
}

.form-switch .form-check-input:not(:checked):hover:not(:disabled):not(:focus-visible) {
  --bs-form-switch-bg: var(--form-switch-bg-off-hover);
}

.form-switch .form-check-input:checked:hover:not(:disabled):not(:focus-visible) {
  background-color: var(--app-primary-hover);
  border-color: var(--app-primary-hover);
}

.form-switch .form-check-input:focus:not(:focus-visible) {
  --bs-form-switch-bg: var(--form-switch-bg-off);
}

.form-switch .form-check-input:checked:focus:not(:focus-visible) {
  --bs-form-switch-bg: var(--form-switch-bg-on);
}

.form-switch .form-check-input:focus-visible {
  --bs-form-switch-bg: var(--form-switch-bg-focus);
}

.form-switch .form-check-input:checked:focus-visible {
  --bs-form-switch-bg: var(--form-switch-bg-on);
}

.dropdown-menu {
  z-index: var(--app-z-dropdown) !important;
  border-color: var(--app-border);
}

.form-control:focus-visible,
.form-select:focus-visible {
  border-color: rgba(var(--bs-primary-rgb), 0.55);
  box-shadow: 0 0 0 0.25rem var(--bs-focus-ring-color);
}

.form-control:focus:not(:focus-visible),
.form-select:focus:not(:focus-visible) {
  border-color: var(--bs-border-color);
  box-shadow: none;
  outline: none;
}

:where(
  .btn,
  .btn-link,
  .nav-link,
  .form-check-input,
  .multi-select-toggle,
  .files-list .file-remove-btn,
  .history-open-btn,
  .history-delete-btn,
  .history-clear-btn,
  .result-expand-btn,
  .result-settings-toggle,
  .hint-ignore-btn
):focus:not(:focus-visible) {
  box-shadow: none;
  outline: none;
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
  color: var(--app-text);
  font-family: var(--font-ui);
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

code:not(.source-file-lines):not(.hljs) {
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--app-primary);
  background: var(--app-primary-light);
  padding: 0.1em 0.35em;
  border-radius: var(--ui-radius-control);
}

.hint-snippet code,
.source-file-view code:not(.source-file-lines) {
  color: inherit;
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* Header / footer */

.app-header {
  position: sticky;
  top: 0;
  z-index: var(--app-z-sticky-header);
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.app-header-inner {
  min-height: var(--ui-size-header);
  padding-top: var(--ui-space-8);
  padding-bottom: var(--ui-space-8);
  gap: var(--ui-space-16);
}

.app-header-context {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.app-title {
  font-size: var(--ui-font-size-xl);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.app-footer {
  background: var(--app-surface);
  margin-top: auto;
  flex-shrink: 0;
}

.app-version-note {
  white-space: nowrap;
}

.app-footer-reset {
  font-size: inherit;
  line-height: inherit;
  color: var(--bs-secondary-color);
  text-decoration: none;
  vertical-align: baseline;
}

.app-footer-reset:hover,
.app-footer-reset:focus-visible {
  color: var(--bs-body-color);
  text-decoration: underline;
}

.files-section-heading {
  font-size: var(--ui-font-size-xs);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.section-heading {
  font-size: var(--ui-font-size-lg);
  font-weight: 600;
}

.min-w-0 {
  min-width: 0;
}

@media (max-width: 768px) {
  .app-header-context {
    justify-content: flex-start;
  }
}

/* Entry drop zone — one compact surface on the canvas */

.upload-section {
  display: flex;
  justify-content: center;
  background: transparent;
  padding: 4.5rem 1rem 3rem;
}

.upload-section.has-history {
  padding-top: 2.5rem;
  padding-bottom: 1.25rem;
}

.drop-zone {
  width: 100%;
  max-width: 35rem;
  border: 1px solid var(--app-border);
  border-radius: var(--app-panel-radius);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--app-surface);
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.drag-over {
  border-color: var(--app-primary);
  background: var(--app-surface);
  outline: none;
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.drop-zone-icon {
  display: inline-block;
  font-size: 1.25rem;
  color: var(--app-primary);
  margin-bottom: 0.75rem;
}

.drop-zone-title {
  font-size: var(--ui-font-size-lg);
  font-weight: 600;
}

.drop-zone-hint {
  font-size: var(--ui-font-size-sm);
  max-width: 22rem;
}

.drop-zone.is-loading {
  cursor: progress;
  pointer-events: none;
}

.drop-zone.is-loading .drop-zone-hint {
  font-variant-numeric: tabular-nums;
  max-width: 28rem;
  overflow-wrap: anywhere;
}

/* Full-page indicator while dragging files anywhere over the app */

.file-drag-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--app-z-drag-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: color-mix(in srgb, var(--app-bg) 78%, transparent);
  backdrop-filter: blur(3px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.file-drag-overlay[hidden] {
  display: none !important;
}

.file-drag-overlay.is-active {
  pointer-events: auto;
  opacity: 1;
}

.file-drag-overlay-panel {
  width: min(100%, 28rem);
  padding: 2.5rem 2rem;
  text-align: center;
  border: 2px dashed var(--app-primary);
  border-radius: var(--app-panel-radius);
  background: var(--app-surface);
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.08);
}

.file-drag-overlay-icon {
  display: inline-block;
  font-size: 2rem;
  color: var(--app-primary);
  margin-bottom: 0.75rem;
}

.file-drag-overlay-title {
  font-size: var(--ui-font-size-xl);
  font-weight: 600;
}

.file-drag-overlay-hint {
  font-size: var(--ui-font-size-sm);
}

/* Chronological source history — same column as the drop zone */

.history-section {
  max-width: 35rem;
  margin: 0 auto 2rem;
}

.history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--ui-space-16);
  margin-bottom: var(--ui-space-8);
}

.history-heading {
  font-size: var(--ui-font-size-xs);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-muted);
  margin: 0;
}

.history-clear-btn {
  padding: 0;
  color: var(--app-muted);
  text-decoration: none;
  font-size: var(--ui-font-size-sm);
  min-height: 0;
  line-height: inherit;
}

.history-clear-btn:hover,
.history-clear-btn:focus-visible {
  color: var(--app-text);
  text-decoration: underline;
}

.history-day {
  margin: 0 0 var(--ui-space-16);
}

.history-day:last-child {
  margin-bottom: 0;
}

.history-day-label {
  font-size: var(--ui-font-size-xs);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-muted);
  padding: var(--ui-space-4) 0;
}

.history-item {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--app-border);
}

.history-day-label + .history-item {
  border-top: 1px solid var(--app-border);
}

.history-open-btn {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) auto;
  gap: var(--ui-space-12);
  align-items: baseline;
  text-align: left;
  background: transparent;
  border: none;
  padding: var(--ui-space-8) var(--ui-space-4);
  min-height: var(--ui-size-control);
  cursor: pointer;
  color: inherit;
}

.history-open-btn:hover,
.history-open-btn:focus-visible {
  background: var(--app-surface-muted);
}

.history-time {
  font-family: var(--font-mono);
  font-size: var(--ui-font-size-sm);
  font-variant-numeric: tabular-nums;
  color: var(--app-muted);
}

.history-title {
  font-size: var(--ui-font-size-sm);
  font-weight: 600;
  color: var(--app-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta {
  font-size: var(--ui-font-size-xs);
  color: var(--app-text-tertiary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.history-delete-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  border: none;
  background: transparent;
  color: var(--app-muted);
  cursor: pointer;
  padding: 0;
}

.history-delete-btn:hover,
.history-delete-btn:focus-visible {
  color: var(--ui-color-danger);
  background: var(--ui-color-danger-muted);
}

@media (prefers-reduced-motion: reduce) {
  .history-open-btn,
  .history-delete-btn {
    transition: none;
  }

  .source-line {
    transition: none;
  }

  .source-line-arrive.source-line-active {
    animation: none;
  }

  .hint-ignore-btn {
    transition: none;
  }

  .hint-ignore-btn:active {
    transform: none;
  }
}

@media (max-width: 480px) {
  .history-open-btn {
    grid-template-columns: 3.25rem minmax(0, 1fr);
  }

  .history-meta {
    grid-column: 2;
  }
}

/* Workspace as a text line */

.workspace-panel {
  background: transparent;
  border: none;
  padding: 0.1rem 0 0.15rem;
}

.workspace-program-label {
  font-size: var(--ui-font-size-md);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.workspace-panel-selection {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--app-muted);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.workspace-panel-actions {
  white-space: nowrap;
}

.workspace-panel-selection:not(.has-files-hint) .workspace-selection-delimiter {
  display: none;
}

.workspace-panel-quiet-btn,
.files-strip-clear {
  padding: 0;
  color: var(--app-muted);
  text-decoration: none;
  font-size: inherit;
  line-height: inherit;
  vertical-align: baseline;
}

.workspace-selection-delimiter {
  color: var(--app-muted);
}

.workspace-panel-quiet-btn:hover,
.workspace-panel-quiet-btn:focus-visible,
.files-strip-clear:hover,
.files-strip-clear:focus-visible {
  color: var(--app-text);
  text-decoration: underline;
}

.files-strip-clear:hover,
.files-strip-clear:focus-visible {
  color: var(--ui-color-danger);
}

/* File list — explorer-style panel */

.files-list {
  background: var(--app-surface);
  border: var(--app-panel-border);
  border-radius: var(--app-panel-radius);
  box-shadow:
    0 1px 2px rgba(28, 36, 48, 0.06),
    0 0 0 1px color-mix(in srgb, var(--app-border-strong) 35%, transparent);
  max-height: 20rem;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.files-list.files-list--fit {
  max-height: none;
  overflow: hidden;
}

.files-list > :first-child {
  border-top-left-radius: calc(var(--app-panel-radius) - 1px);
  border-top-right-radius: calc(var(--app-panel-radius) - 1px);
}

.files-list > :last-child {
  border-bottom-left-radius: calc(var(--app-panel-radius) - 1px);
  border-bottom-right-radius: calc(var(--app-panel-radius) - 1px);
}

.files-list .file-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--app-border);
  font-size: var(--ui-font-size-md);
  transition: background-color 0.12s ease;
}

.files-list .file-item:hover {
  background: var(--app-surface-muted);
}

.files-list .file-item:last-child {
  border-bottom: none;
}

.files-list .file-item[data-grouped="1"] {
  padding-left: 1.65rem;
}

.files-list .file-tree-icon {
  flex-shrink: 0;
  width: 1rem;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--app-muted);
}

.files-list .file-path {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0;
  font-size: var(--ui-font-size-sm);
  word-break: break-all;
}

.files-list .file-path .file-dir {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--app-muted);
}

.files-list .file-path .file-name {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--app-text);
}

.files-list .file-meta {
  flex-shrink: 0;
  color: var(--app-muted);
  font-size: var(--ui-font-size-xs);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.files-list .file-folder-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: var(--ui-font-size-sm);
  color: var(--app-text);
  padding: 0.45rem 0.75rem;
  background: color-mix(in srgb, var(--app-border-strong) 18%, var(--app-surface));
  border-bottom: 1px solid var(--app-border-strong);
}

.files-list .file-folder-label .file-tree-icon {
  color: var(--app-primary);
}

.files-list .file-folder-name {
  min-width: 0;
  word-break: break-all;
}

.files-list .file-remove-btn {
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: none;
  border-radius: var(--ui-radius-control);
  background: transparent;
  color: var(--app-muted);
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  transition: background-color 0.15s, color 0.15s, transform 0.1s;
}

.files-list .file-remove-btn::before {
  content: "";
  position: absolute;
  inset: -0.625rem;
}

.files-list .file-remove-btn:hover {
  background: rgba(26, 35, 50, 0.06);
  color: var(--app-text);
}

.files-list .file-remove-btn:active {
  transform: scale(0.96);
}

/* Filter bar — pills above the result panel, same language as the model tools */

.filter-bar,
.filter-bar .filter-bar-fields {
  overflow: visible;
}

.filter-bar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.filter-bar-label {
  font-size: var(--ui-font-size-xs);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-muted);
  line-height: 1.2;
}

.filter-bar-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  flex: 1 1 auto;
  min-width: 0;
}

.filter-bar-field {
  flex: 0 1 auto;
  min-width: 0;
  max-width: none;
}

.filter-bar-field .filter-label-row {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.filter-bar-reset {
  flex-shrink: 0;
  align-self: center;
  padding: 0.25rem 0;
  color: var(--app-muted);
  text-decoration: none;
}

.filter-bar-reset:hover,
.filter-bar-reset:focus-visible {
  color: var(--app-text);
  text-decoration: underline;
}

.multi-select-dropdown .multi-select-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.multi-select-dropdown .multi-select-toggle:focus:not(:focus-visible) {
  box-shadow: none;
}

.multi-select-dropdown .multi-select-toggle::after {
  margin-left: auto;
}

.filter-bar .multi-select-toggle {
  width: auto;
  min-height: 1.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--ui-radius-control);
  border-color: var(--app-border);
  background: var(--app-surface);
  color: var(--app-text);
  font-size: 0.75rem;
  font-weight: 500;
  box-shadow: none;
}

.filter-bar .multi-select-toggle::after {
  margin-left: 0.45rem;
  opacity: 0.4;
}

.filter-bar .multi-select-toggle--active {
  border-color: var(--app-border-strong);
  background: var(--app-surface);
  color: var(--app-text);
  box-shadow: none;
}

.filter-bar .multi-select-toggle--active .multi-select-summary {
  font-weight: 600;
}

.multi-select-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.multi-select-menu {
  min-width: 16rem;
}

.viewport-scroll-menu {
  padding: 0 !important;
  background-color: var(--app-surface);
  overflow: hidden;
}

.viewport-scroll-menu-inner {
  overflow-x: hidden;
  overflow-y: auto;
  max-height: min(24rem, calc(100vh - 8rem));
  padding-block: 0.5rem;
  padding-inline: 0.75rem;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.multi-select-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.25rem 0.5rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--app-border);
  font-size: 0.8125rem;
}

.multi-select-action {
  text-decoration: none;
  line-height: 1.2;
}

.multi-select-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.25rem 0.35rem;
  border-radius: 0.25rem;
  width: 100%;
  cursor: pointer;
}

.multi-select-option .form-check-input {
  float: none;
  flex-shrink: 0;
  margin-left: 0;
  margin-top: 0.2em;
}

.multi-select-option:hover {
  background: var(--app-surface-muted);
}

.multi-select-option .form-check-label {
  flex: 1;
  min-width: 0;
  width: auto;
  cursor: pointer;
  font-size: 0.875rem;
}

/* Result panel — table is the only card */

.compare-results-panel {
  border: var(--app-panel-border);
  border-radius: var(--app-panel-radius);
  box-shadow: var(--app-panel-shadow);
  background: var(--app-surface);
  --result-tabs-offset: 3.5rem;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.result-tabs-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 0.75rem 1rem 0.75rem 0.75rem;
  position: sticky;
  /* Overlap the header when stuck so subpixel gaps cannot show scrolling content. */
  top: calc(var(--app-header-sticky-offset, 0px) - var(--app-sticky-overlap));
  z-index: var(--app-z-sticky-subbar);
  background: var(--app-surface);
  border-bottom: none;
  border-radius: var(--app-panel-radius) var(--app-panel-radius) 0 0;
  box-shadow:
    inset 0 1px 0 0 var(--app-surface),
    inset 0 -1px 0 0 var(--app-border);
}

.result-tabs-bar.is-stuck {
  border-radius: 0;
  box-shadow:
    0 -2px 0 0 var(--app-surface),
    inset 0 2px 0 0 var(--app-surface),
    inset 0 -1px 0 0 var(--app-border);
}

.result-tabs-title {
  flex-shrink: 0;
  line-height: 1.25;
}

.result-tabs-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  min-width: 0;
  flex-shrink: 0;
}

.result-tabs-actions .btn-outline-secondary {
  border-color: transparent;
  background: transparent;
  color: var(--app-muted);
}

.result-tabs-actions .btn-outline-secondary:hover,
.result-tabs-actions .btn-outline-secondary:focus-visible {
  border-color: transparent;
  background: var(--app-surface-muted);
  color: var(--app-text);
}

.result-tabs-actions .btn-outline-secondary i {
  display: none;
}

.compare-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  flex-shrink: 0;
  width: max-content;
  height: var(--ui-size-control);
  padding: var(--ui-space-2);
  gap: 0;
  background: var(--app-bg);
  border: none;
  border-radius: var(--ui-radius-panel);
}

.compare-tabs-seg {
  position: relative;
  display: flex;
  align-items: center;
  height: calc(var(--ui-size-control) - 2 * var(--ui-space-2));
  padding: 0 var(--ui-space-12);
  border-radius: var(--ui-radius-control);
  color: var(--app-muted);
  font-size: var(--ui-font-size-sm);
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  transition-property: color, background-color;
  transition-duration: 0.15s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.compare-tabs-seg::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 40px;
  transform: translateY(-50%);
}

.compare-tabs-seg input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.compare-tabs-seg:hover {
  color: var(--app-primary);
}

.compare-tabs-seg:has(:checked) {
  color: var(--app-primary);
  font-weight: 600;
  background: var(--app-surface);
}

.compare-tabs-seg:has(:focus-visible) {
  box-shadow: 0 0 0 0.2rem var(--bs-focus-ring-color);
  z-index: 1;
}

.result-settings-dropdown .result-settings-toggle {
  display: inline-flex;
  align-items: center;
}

.result-settings-menu {
  min-width: 17.5rem;
  border-color: var(--app-border);
  box-shadow: 0 0.35rem 1rem rgba(26, 35, 50, 0.1);
  padding: 0 !important;
}

.result-settings-menu .viewport-scroll-menu-inner {
  padding: 0.5rem;
  max-height: min(32rem, calc(100vh - 7rem));
}

.result-settings-group + .result-settings-group {
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--app-border);
}

.result-settings-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-secondary-color);
  padding: 0.1rem 0.55rem 0.3rem;
}

.result-settings-radio-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0;
  padding: 0.35rem 0.55rem;
  border-radius: var(--ui-radius-control);
  transition: background-color 0.15s ease;
  cursor: pointer;
}

.result-settings-radio-option + .result-settings-radio-option {
  margin-top: 0.1rem;
}

.result-settings-radio-option:hover {
  background: rgba(26, 35, 50, 0.04);
}

.result-settings-radio-option .form-check-input {
  margin-top: 0.15rem;
  margin-left: 0;
  float: none;
  flex-shrink: 0;
}

.result-settings-radio-option .form-check-label {
  cursor: pointer;
  user-select: none;
  padding-left: 0;
  font-size: var(--ui-font-size-sm);
  line-height: 1.35;
  flex: 1;
}

.result-settings-radio-option.is-disabled {
  opacity: 0.55;
  cursor: default;
}

.result-settings-radio-option.is-disabled .form-check-label {
  cursor: default;
}

.search-group {
  width: 220px;
}

.search-group .input-group-text {
  background: var(--app-surface);
  border-color: var(--app-border);
  color: var(--app-muted);
}

.compare-table tbody tr.result-detail-row > td {
  position: relative;
  z-index: 3;
}

.compare-table {
  font-size: var(--ui-font-size-md);
  table-layout: auto;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  --sticky-expand-width: 2.25rem;
  --compare-row-hover-bg: var(--ui-table-row-hover);
  --compare-col-hover-bg: var(--ui-table-col-hover);
  --compare-row-col-hover-bg: var(--ui-table-row-col-hover);
}

/* Page scroll: overflow clip on table wrapper breaks sticky thead. */
.compare-results-panel > .results-table-wrap {
  overflow: visible;
  position: relative;
  --compare-col-hover-bg: var(--ui-table-col-hover);
  --compare-row-col-hover-bg: var(--ui-table-row-col-hover);
}

/* One overlay bar instead of restyling every body cell in the column. */
.table-col-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: none;
  pointer-events: none;
  background: var(--compare-col-hover-bg, var(--ui-table-col-hover));
}

.table-col-hover-overlay.is-visible {
  display: block;
}

.compare-table thead th,
.compare-table tbody tr.result-row td {
  white-space: nowrap;
}

.compare-table thead th.col-datenbank,
.compare-table thead th.col-schema,
.compare-table td.col-datenbank,
.compare-table td.col-schema {
  width: 1%;
}

.compare-table thead th {
  background-color: var(--app-table-head-fill);
  color: var(--app-table-head-text);
  border-bottom: none;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 3;
  --app-table-head-bleed-cover: inset 0 2px 0 0 var(--app-table-head-fill);
  box-shadow:
    0 -2px 0 0 var(--app-table-head-fill),
    var(--app-table-head-bleed-cover),
    var(--app-table-head-edge-shadow);
  padding-top: var(--app-table-head-padding-y);
  padding-bottom: var(--app-table-head-padding-y);
}

.compare-table tbody tr.result-row > td {
  padding-top: var(--app-table-row-padding-y);
  padding-bottom: var(--app-table-row-padding-y);
  vertical-align: middle;
}

.compare-results-panel > .results-table-wrap > .compare-table thead th {
  /* Extra overlap: tabs bar already sits 1px higher, so subtract twice. */
  top: calc(
    var(--app-header-sticky-offset, 0px)
    + var(--result-tabs-offset, 3.5rem)
    - var(--app-sticky-overlap)
    - var(--app-sticky-overlap)
  );
}

.compare-table tbody tr {
  cursor: default;
}

.compare-table tbody tr.expandable {
  cursor: pointer;
}

.compare-table.table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: var(--compare-row-hover-bg);
}

.compare-table th.col-hover,
.compare-table td.col-hover {
  --bs-table-bg-state: var(--compare-col-hover-bg);
}

.compare-table.table-hover > tbody > tr:hover > .col-hover {
  --bs-table-bg-state: var(--compare-row-col-hover-bg);
}

.compare-table th.col-hover {
  --app-table-head-fill: color-mix(in srgb, var(--app-text) 5%, var(--app-table-head-bg));
}

/* content-visibility: auto breaks sticky thead painting (see model-tools mapping.css). */
.compare-table tbody > tr:not(.result-detail-row):not(.result-group-row) {
  content-visibility: visible;
  contain-intrinsic-size: auto 2.5rem;
}

.compare-table tbody td.result-col-expand {
  position: sticky;
  left: 0;
  z-index: 1;
  width: var(--sticky-expand-width);
  min-width: var(--sticky-expand-width);
  max-width: var(--sticky-expand-width);
  background: inherit;
  text-align: center;
  vertical-align: middle;
  padding: var(--app-table-expand-padding-y) 0.25rem var(--app-table-expand-padding-y) 0.5rem;
}

.compare-table thead th.result-col-expand {
  left: auto;
  z-index: 3;
  width: var(--sticky-expand-width);
  min-width: var(--sticky-expand-width);
  max-width: var(--sticky-expand-width);
  text-align: center;
  vertical-align: middle;
  padding-top: var(--app-table-head-padding-y);
  padding-bottom: var(--app-table-head-padding-y);
  padding-left: 0.5rem;
  padding-right: 0.25rem;
  background-color: var(--app-table-head-bg);
  box-shadow:
    0 -2px 0 0 var(--app-table-head-fill),
    var(--app-table-head-bleed-cover),
    var(--app-table-head-edge-shadow);
}

.compare-table tbody tr .result-col-expand {
  background: var(--app-surface);
  box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state, transparent);
}

.compare-table td.col-tabelle,
.compare-table td.col-schema {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.compare-table td.attr-star {
  color: var(--app-muted);
  font-style: italic;
}

.compare-table td.col-datei {
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.compare-table th.col-vorkommen,
.compare-table td.col-vorkommen {
  width: 1%;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.compare-table td.col-vorkommen-has-value {
  color: var(--app-primary);
  font-weight: 600;
}

.compare-table tbody tr.result-group-row {
  cursor: default;
}

.compare-table tbody tr.result-group-row > td {
  background: var(--app-surface-muted);
  border-bottom: 1px solid var(--app-border);
  padding: 0.4rem 0.75rem 0.4rem 0.5rem;
  white-space: nowrap;
}

.compare-table.table-hover > tbody > tr.result-group-row:hover > * {
  --bs-table-bg-state: var(--app-surface-muted);
}

.result-group-inner {
  display: flex;
  align-items: baseline;
  gap: 0.55rem 0.75rem;
  min-width: 0;
}

.result-group-path {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

.result-group-sep {
  color: var(--app-muted);
  font-weight: 500;
}

.result-group-label {
  font-weight: 650;
  color: var(--app-text);
}

.result-group-row[data-group-by="schema"] .result-group-path,
.result-group-row[data-group-by="tabelle"] .result-group-path {
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.result-group-meta {
  color: var(--app-muted);
  font-weight: 500;
}

.result-group-stats {
  margin-left: auto;
  color: var(--app-muted);
  font-size: var(--ui-font-size-sm);
  font-weight: 500;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--app-border);
  background: var(--app-surface);
  border-radius: 0 0 var(--app-panel-radius) var(--app-panel-radius);
}

.table-pagination .btn {
  border-radius: var(--ui-radius-control);
}

/* Bottom panel corners when pagination is hidden (table is the visual footer). */
.compare-results-panel:has(#resultsPagination.d-none)
  > .results-table-wrap:not(.d-none)
  .compare-table tbody > tr:last-child.result-row > td:first-child {
  border-bottom-left-radius: calc(var(--app-panel-radius) - 1px);
}

.compare-results-panel:has(#resultsPagination.d-none)
  > .results-table-wrap:not(.d-none)
  .compare-table tbody > tr:last-child.result-row > td:last-child {
  border-bottom-right-radius: calc(var(--app-panel-radius) - 1px);
}

.compare-results-panel:has(#resultsPagination.d-none)
  > .results-table-wrap:not(.d-none)
  .compare-table tbody > tr:last-child.result-detail-row > td,
.compare-results-panel:has(#resultsPagination.d-none)
  > .results-table-wrap:not(.d-none)
  .compare-table tbody > tr:last-child.result-group-row > td {
  border-bottom-left-radius: calc(var(--app-panel-radius) - 1px);
  border-bottom-right-radius: calc(var(--app-panel-radius) - 1px);
}

.compare-results-panel > .empty-state:not(.d-none) {
  border-radius: 0 0 var(--app-panel-radius) var(--app-panel-radius);
}

.empty-state {
  padding: 0.9rem 1.15rem 1.15rem;
  color: var(--app-muted);
  font-size: var(--ui-font-size-sm);
  line-height: 1.45;
}

@media (max-width: 768px) {
  .result-tabs-actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .result-tabs-search.search-group {
    width: 100%;
    flex: 1 1 100%;
  }
}

/* Analysis hints — one panel, collapsible groups */

.hints-panel {
  display: flex;
  flex-direction: column;
  background: var(--app-surface);
  border: var(--app-panel-border);
  border-radius: var(--app-panel-radius);
  box-shadow:
    0 1px 2px rgba(28, 36, 48, 0.06),
    0 0 0 1px color-mix(in srgb, var(--app-border-strong) 35%, transparent);
  overflow: hidden;
}

.hint-card {
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  box-shadow: none;
}

.hint-card + .hint-card {
  border-top: 1px solid var(--app-border);
}

.hint-card-header {
  padding: 0.7rem 0.95rem 0.65rem;
  background: transparent;
}

.hint-card-collapsible .hint-card-header {
  cursor: pointer;
}

.hint-card-collapsible .hint-card-header:hover {
  background: color-mix(in srgb, var(--app-surface-muted) 55%, transparent);
}

.hint-card-head-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.hint-card-head-text {
  flex: 1 1 auto;
  min-width: 0;
}

.hint-card-toggle {
  flex-shrink: 0;
  margin-top: 0.05rem;
  margin-left: auto;
  align-self: flex-start;
  border: none;
  background: transparent;
  color: var(--app-muted);
  padding: 0.15rem 0.3rem;
  line-height: 1;
  border-radius: var(--ui-radius-control);
  cursor: pointer;
}

.hint-card-toggle:hover,
.hint-card-toggle:focus-visible {
  color: var(--app-primary);
  background: var(--app-primary-light);
}

.hint-card-toggle.is-open {
  color: var(--app-primary);
}

.hint-card-toggle i {
  transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1);
  display: block;
}

.hint-card.is-collapsed .hint-card-toggle i {
  transform: rotate(-90deg);
}

.hint-card.is-collapsed .hint-card-subtitle {
  display: none;
}

.hint-card-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
}

.hint-card-title {
  font-weight: 600;
  font-size: var(--ui-font-size-sm);
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.hint-card-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.08rem 0.42rem;
  border-radius: var(--ui-radius-pill);
  font-size: var(--ui-font-size-xs);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  border: 1px solid transparent;
}

.hint-warning .hint-card-count {
  background: #fff0bf;
  color: #6b5400;
  border-color: #d9c26a;
}

.hint-info .hint-card-count {
  background: var(--app-primary-light);
  color: var(--app-primary);
}

.hint-muted .hint-card-count {
  background: var(--app-surface-muted);
  color: var(--app-muted);
  box-shadow: inset 0 0 0 1px var(--app-border);
}

.hint-card-subtitle {
  margin: 0.2rem 0 0;
  font-size: var(--ui-font-size-xs);
  font-weight: 400;
  color: var(--app-muted);
  line-height: 1.4;
  text-wrap: pretty;
  max-width: 42em;
}

.hint-location {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--app-border);
}

.hint-location:last-child {
  border-bottom: none;
}

.hint-location-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--app-primary);
  margin-bottom: 0.35rem;
  word-break: break-all;
}

.hint-snippet {
  margin: 0;
  padding: 0.55rem 0.65rem;
  background: var(--code-bg);
  color: var(--code-fg);
  border: 1px solid var(--code-rule);
  border-radius: var(--ui-radius-control);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-x: auto;
}

.hint-snippet .hljs,
.hint-snippet [class*="hljs-"] {
  background: transparent;
  padding: 0;
}

.hint-snippet-line {
  display: block;
  white-space: pre;
  min-height: 1.45em;
  color: var(--code-fg);
}

.hint-snippet-code {
  white-space: pre;
}

.hint-snippet-code .hljs {
  display: inline;
  padding: 0;
  background: transparent;
}

.hint-table-wrap {
  overflow: visible;
}

.hint-table {
  width: 100%;
  min-width: 100%;
}

.hint-table.compare-table thead th {
  position: static;
  top: auto;
  box-shadow: none;
  border-bottom: 1px solid var(--app-table-head-edge);
}

.hint-table.compare-table thead th.result-col-expand {
  box-shadow: none;
  border-bottom: 1px solid var(--app-table-head-edge);
}

.hint-table .result-col-expand {
  position: static;
  left: auto;
}

.hint-table.compare-table tbody tr .result-col-expand {
  box-shadow: none;
}

.hint-table td.col-hint-id,
.hint-table tbody tr.result-row td.col-hint-id {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow-wrap: normal;
}

.hint-table th.col-hint-action,
.hint-table td.col-hint-action {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.hint-table td.col-hint-text {
  color: var(--app-muted);
  white-space: nowrap;
}

.hint-table .hint-ignore-btn {
  min-height: 0;
  min-width: 0;
  padding: 0;
  line-height: inherit;
  font-size: inherit;
  vertical-align: baseline;
}

.hint-ignore-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--app-muted);
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  border-radius: var(--ui-radius-control);
  line-height: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition-property: color, background-color, transform;
  transition-duration: 0.15s;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.hint-ignore-btn:hover,
.hint-ignore-btn:focus-visible {
  color: var(--app-primary);
  background: var(--app-primary-light);
  padding: 0 0.2rem;
  margin: 0 -0.2rem;
}

.hint-ignore-btn:active {
  transform: scale(0.96);
}

.result-col-expand {
  width: 2.25rem;
  padding-left: 0.5rem;
  padding-right: 0.25rem;
}

.result-expand-btn {
  border: none;
  background: transparent;
  color: var(--app-muted);
  padding: 0.1rem 0.25rem;
  line-height: 1;
  border-radius: var(--ui-radius-control);
  cursor: pointer;
}

.result-expand-btn:hover {
  color: var(--app-primary);
  background: var(--app-primary-light);
}

.result-expand-btn.is-open {
  color: var(--app-primary);
}

.result-expand-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.result-expand-btn i {
  transition: transform 0.15s ease;
}

.result-expand-btn.is-open i {
  transform: rotate(90deg);
}

.result-detail-row td.result-detail-cell {
  padding: 0;
  background: var(--code-panel-bg);
  border-top: none;
  overflow: hidden;
  white-space: normal;
}

.result-detail-inner {
  padding: 0.5rem 0.75rem 0.65rem 2.5rem;
  min-width: 0;
  overflow: hidden;
  contain: inline-size;
  width: 100%;
  box-sizing: border-box;
}

.compare-table tbody tr.result-row.is-open td {
  border-bottom-color: transparent;
}

.source-file-view {
  max-height: min(28rem, 55vh);
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--app-border);
  border-radius: var(--ui-radius-control);
  background: var(--code-bg);
}

.source-file-lines {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--code-fg);
  background: transparent;
  padding: 0;
  border-radius: 0;
  width: max-content;
  min-width: 100%;
}

.source-line-text .hljs {
  display: inline;
  padding: 0;
  background: transparent;
}

.source-line {
  display: flex;
  min-height: 1.45em;
  max-width: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.source-line-no {
  flex-shrink: 0;
  padding: 0 0.65rem 0 0.55rem;
  color: var(--code-muted);
  user-select: none;
  border-right: 1px solid var(--code-rule);
  margin-right: 0.55rem;
}

.source-line-text {
  flex: 1;
  min-width: 0;
  padding-right: 0.55rem;
  white-space: pre;
}

.source-line-highlight {
  background: var(--code-highlight-bg);
  box-shadow: inset 3px 0 0 var(--code-highlight-bar);
}

.source-line-highlight .source-line-no {
  color: var(--code-highlight-line-no);
  font-weight: 600;
}

.source-line-active {
  background: color-mix(in srgb, var(--code-highlight-bg) 70%, var(--code-highlight-bar));
  box-shadow: inset 4px 0 0 var(--code-highlight-bar);
}

.source-line-active .source-line-no {
  color: var(--code-highlight-line-no);
  font-weight: 700;
}

.source-line-arrive.source-line-active {
  animation: source-line-arrive 0.28s ease;
}

@keyframes source-line-arrive {
  0% {
    box-shadow: inset 6px 0 0 var(--code-highlight-bar);
    background: color-mix(in srgb, var(--code-highlight-bar) 28%, var(--code-highlight-bg));
  }
  100% {
    box-shadow: inset 4px 0 0 var(--code-highlight-bar);
    background: color-mix(in srgb, var(--code-highlight-bg) 70%, var(--code-highlight-bar));
  }
}

.source-line-jump {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.source-line-jump:hover {
  color: var(--app-primary-hover);
}

.source-line-jump-active {
  font-weight: 700;
  text-decoration: none;
}

.source-line-no-jump {
  cursor: pointer;
}

.source-line-no-jump:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.result-source-location {
  margin-bottom: 0.65rem;
}

.result-source-location:last-child {
  margin-bottom: 0;
}

.error-report {
  --bs-alert-padding-x: 1rem;
  --bs-alert-padding-y: 0.9rem;
}

.error-report-title {
  font-weight: 650;
  font-size: var(--ui-font-size-md);
  margin-bottom: 0.35rem;
  text-wrap: balance;
}

.error-report-lead {
  margin-bottom: 0.75rem;
  color: var(--app-text);
  text-wrap: pretty;
}

.error-report-facts {
  display: grid;
  gap: 0.35rem 1rem;
  margin: 0 0 0.75rem;
  font-size: var(--ui-font-size-sm);
}

.error-report-facts > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
  align-items: start;
}

.error-report-facts dt {
  margin: 0;
  color: var(--app-muted);
  font-weight: 500;
}

.error-report-facts dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.error-report-details {
  margin: 0;
}

.error-report-details summary {
  cursor: pointer;
  font-size: var(--ui-font-size-sm);
  font-weight: 600;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
}

.error-report-details summary:hover,
.error-report-details summary:focus-visible {
  color: var(--app-primary);
}

.error-report-copy {
  margin: 0.5rem 0 0.65rem;
  min-height: 2.5rem;
}

.error-report-dump {
  margin: 0;
  max-height: 16rem;
  overflow: auto;
  padding: 0.65rem 0.75rem;
  border-radius: calc(var(--app-panel-radius) - 2px);
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  font-family: var(--font-mono);
  font-size: var(--ui-font-size-xs);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
