.workbench-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px 18px 40px;
  font-size: 14px;
}

.workbench-topbar {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  margin-bottom: 0.75rem;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #fff;
  padding: 0.55rem 0.7rem;
}

.workbench-topbar h1 {
  margin: 0;
  font-size: clamp(1.35rem, 1.85vw, 2rem);
  line-height: 1;
  letter-spacing: 0;
}

.workbench-topbar .learn-kicker {
  margin-bottom: 0.25rem;
}

.topbar-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.topbar-actions > button {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #111827;
  padding: 0.42rem 0.58rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, color 120ms ease, transform 120ms ease;
}

.topbar-actions > button:hover:not(:disabled),
.topbar-actions > button:focus-visible:not(:disabled) {
  background: #eef2f7;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
  outline: none;
}

.workbench-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.sidebar-tools,
.workbench-left {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  min-width: 0;
}

.workbench-left {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
}

body[data-controls-collapsed="true"] .sidebar-tools,
body[data-controls-collapsed="true"] .workbench-left {
  display: none;
}

.workbench-main {
  min-width: 0;
  display: grid;
  gap: 0.6rem;
}

.workbench-title h1 {
  margin: 0.25rem 0 0.6rem;
  font-size: clamp(2.2rem, 4.4vw, 4.9rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.workbench-title p {
  max-width: 860px;
  color: #526071;
  font-size: 1.1rem;
}

.workbench-panel,
.workbench-dashboard > .tab-panel {
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #fff;
  min-width: 0;
  padding: 0.75rem;
}

.workbench-panel h2,
.workbench-dashboard h2 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.workbench-panel .learn-kicker,
.workbench-dashboard .learn-kicker {
  margin-bottom: 0.35rem;
}

.compact-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 1.6rem;
  cursor: pointer;
  transition: color 120ms ease, background-color 120ms ease;
  color: #007181;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.compact-section > summary:hover,
.compact-section > summary:focus-visible {
  color: #0f766e;
  outline: none;
}

.compact-section > summary::after {
  content: "+";
  color: #526071;
  font-size: 1rem;
}

.compact-section[open] > summary {
  margin-bottom: 0.6rem;
}

.compact-section[open] > summary::after {
  content: "-";
}

.workbench-import {
  display: grid;
  gap: 0.65rem;
}

.invite-admin-form,
.invite-result {
  display: grid;
  gap: 0.65rem;
}

.invite-admin-form label,
.invite-result label {
  display: grid;
  gap: 0.35rem;
  font-weight: 800;
}

.invite-admin-form input,
.invite-result textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.48rem 0.55rem;
  font: inherit;
  background: #fff;
  color: #111827;
}

.invite-result textarea {
  min-height: 5.6rem;
  resize: vertical;
}

.invite-actions {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.invite-status {
  margin: 0.4rem 0 0;
  color: #67e8f9;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.workbench-import label {
  display: grid;
  gap: 0.35rem;
  font-weight: 800;
}

.workbench-import input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.48rem 0.55rem;
  font: inherit;
  background: #fff;
}

.workbench-import input[type="file"] {
  max-width: 100%;
  font-size: 0.82rem;
  white-space: nowrap;
}

.visually-hidden-file {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0 !important;
}

.file-control {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 6px;
  padding: 0.36rem;
}

.file-pick-button {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #f8fafc;
  color: #0f172a;
  padding: 0.38rem 0.52rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475569;
  font-weight: 800;
}

.workbench-import input::file-selector-button {
  margin-right: 0.45rem;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #f8fafc;
  padding: 0.32rem 0.45rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.audit-settings-panel .setting-field {
  display: grid;
  gap: 0.35rem;
  font-weight: 900;
}

.audit-settings-panel select {
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-weight: 800;
  padding: 0.4rem 0.55rem;
}

.settings-note {
  margin: 0.55rem 0 0;
  color: #526071;
  font-size: 0.86rem;
  line-height: 1.4;
}

.workbench-actions,
.demo-actions,
.export-row,
.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.sidebar-tools .workspace-actions,
.sidebar-tools .workbench-actions,
.workbench-left .workspace-actions,
.workbench-left .workbench-actions,
.demo-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workbench-actions button,
.demo-actions button,
.export-row button,
.workspace-actions button,
.invite-admin-form button,
.invite-actions button,
.invite-mail-link,
.import-button,
.mini-button {
  border: 0;
  border-radius: 6px;
  padding: 0.5rem 0.68rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: #0f766e;
  color: #fff;
  line-height: 1.1;
  min-height: 2.15rem;
  transition: background-color 120ms ease, box-shadow 120ms ease, transform 120ms ease, color 120ms ease;
}

.workbench-actions button:hover:not(:disabled),
.workbench-actions button:focus-visible:not(:disabled),
.demo-actions button:hover:not(:disabled),
.demo-actions button:focus-visible:not(:disabled),
.export-row button:hover:not(:disabled),
.export-row button:focus-visible:not(:disabled),
.workspace-actions button:hover:not(:disabled),
.workspace-actions button:focus-visible:not(:disabled),
.invite-admin-form button:hover:not(:disabled),
.invite-admin-form button:focus-visible:not(:disabled),
.invite-actions button:hover:not(:disabled),
.invite-actions button:focus-visible:not(:disabled),
.invite-mail-link:hover,
.invite-mail-link:focus-visible,
.import-button:hover,
.import-button:focus-within,
.mini-button:hover:not(:disabled),
.mini-button:focus-visible:not(:disabled),
.file-pick-button:hover,
.file-pick-button:focus-visible,
.workbench-import input::file-selector-button:hover {
  background: #0b6b75;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
  outline: none;
  transform: translateY(-1px);
}

.demo-actions button:hover:not(:disabled),
.demo-actions button:focus-visible:not(:disabled) {
  background: #1d4ed8;
}

.demo-actions button {
  background: #2563eb;
}

.demo-picker {
  display: grid;
  gap: 0.55rem;
  max-width: none;
  margin-top: 0.9rem;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #fff;
  padding: 0.7rem;
}

.sidebar-tools .demo-picker,
.workbench-left .demo-picker {
  margin-top: 0;
}

.demo-picker label {
  display: grid;
  gap: 0.35rem;
  font-weight: 900;
}

.demo-picker label span {
  color: #007181;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.demo-picker select {
  width: 100%;
  min-height: 2.25rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.42rem 0.52rem;
  font: inherit;
  font-weight: 800;
  color: #111827;
  background: #fff;
}

.demo-picker p {
  margin: 0;
  color: #526071;
  font-size: 0.86rem;
}

.export-row button {
  background: #111827;
}

.workbench-actions button.secondary,
.demo-actions button.secondary,
.export-row button.secondary {
  background: #475569;
}

.import-button {
  display: inline-flex;
  align-items: center;
  background: #475569;
}

.import-button input {
  display: none;
}

.invite-mail-link {
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.workbench-actions button:disabled,
.demo-actions button:disabled,
.export-row button:disabled,
.workspace-actions button:disabled,
.invite-admin-form button:disabled,
.invite-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.workbench-status {
  max-width: 520px;
  min-height: auto;
  font-weight: 800;
  color: #0f766e;
  text-align: right;
  font-size: 0.86rem;
}

.audit-busy-overlay[hidden] {
  display: none;
}

.audit-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  cursor: wait;
}

.audit-busy-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(520px, 100%);
  border: 1px solid #99f6e4;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
  padding: 1.05rem 1.15rem;
  color: #0f172a;
}

.audit-busy-card strong {
  display: block;
  color: #0f766e;
  font-size: 1.05rem;
}

.audit-busy-card p {
  margin: 0.2rem 0 0;
  color: #475569;
  line-height: 1.45;
}

.audit-hourglass {
  position: relative;
  width: 42px;
  height: 58px;
  flex: 0 0 auto;
  border: 3px solid #0f766e;
  border-radius: 12px;
  animation: csaHourglassFlip 1.5s ease-in-out infinite;
}

.audit-hourglass::before,
.audit-hourglass::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
}

.audit-hourglass::before {
  top: 8px;
  border-top: 17px solid #5eead4;
}

.audit-hourglass::after {
  bottom: 8px;
  border-bottom: 17px solid #0f766e;
}

body[data-audit-busy="true"] .app-shell button,
body[data-audit-busy="true"] .app-shell input,
body[data-audit-busy="true"] .app-shell select,
body[data-audit-busy="true"] .app-shell textarea,
body[data-audit-busy="true"] .app-shell a,
body[data-transaction-busy="true"] .app-shell button,
body[data-transaction-busy="true"] .app-shell input,
body[data-transaction-busy="true"] .app-shell select,
body[data-transaction-busy="true"] .app-shell textarea,
body[data-transaction-busy="true"] .app-shell a,
body[data-cloud-busy="true"] .app-shell button,
body[data-cloud-busy="true"] .app-shell input,
body[data-cloud-busy="true"] .app-shell select,
body[data-cloud-busy="true"] .app-shell textarea,
body[data-cloud-busy="true"] .app-shell a {
  pointer-events: none;
}

body[data-audit-busy="true"] .audit-busy-overlay,
body[data-transaction-busy="true"] .audit-busy-overlay,
body[data-cloud-busy="true"] .audit-busy-overlay {
  pointer-events: auto;
}

@keyframes csaHourglassFlip {
  0%,
  42% {
    transform: rotate(0deg);
  }
  58%,
  100% {
    transform: rotate(180deg);
  }
}

.science-brief {
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #ffffff;
  margin-bottom: 0.75rem;
  padding: 0.85rem;
}

.brief-main {
  max-width: 960px;
}

.brief-main h2 {
  margin: 0 0 0.35rem;
  color: #111827;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  line-height: 1.15;
}

.brief-main p {
  color: #475569;
  margin: 0;
  max-width: 860px;
}

.brief-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.75rem;
}

.brief-grid section {
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.68rem;
}

.brief-grid strong,
.brief-grid span {
  display: block;
}

.brief-grid strong {
  color: #0f172a;
  font-size: 0.92rem;
}

.brief-grid span {
  color: #526071;
  font-size: 0.86rem;
  line-height: 1.38;
  margin-top: 0.25rem;
}

.interpretation-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.interpretation-chain span {
  border: 1px solid #99f6e4;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0.32rem 0.55rem;
}

.workbench-dashboard {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.workbench-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #fff;
  padding: 0.35rem;
}

.workbench-tabs button {
  border: 0;
  border-radius: 6px;
  padding: 0.45rem 0.62rem;
  background: #eef2f7;
  color: #111827;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: background-color 120ms ease, box-shadow 120ms ease, color 120ms ease, transform 120ms ease;
}

.workbench-tabs button:hover:not(.active),
.workbench-tabs button:focus-visible:not(.active) {
  background: #dbeafe;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
  color: #0f3f46;
  outline: none;
  transform: translateY(-1px);
}

.workbench-tabs button.active {
  color: #fff;
  background: #0f766e;
}

.workbench-tabs button[data-tab="human"] {
  white-space: nowrap;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 0.5rem;
}

.kpi {
  border: 1px solid #d7dde5;
  border-radius: 8px;
  padding: 0.58rem;
  background: #f8fafc;
}

.kpi span {
  display: block;
  color: #526071;
  font-size: 0.78rem;
  font-weight: 800;
}

.kpi strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.15rem;
  line-height: 1.05;
  color: #111827;
  overflow-wrap: anywhere;
}

.formula-band {
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.62rem;
  overflow-x: auto;
}

.audit-warning-list {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.4rem;
}

.audit-warning-item {
  border: 1px solid #facc15;
  border-left: 4px solid #ca8a04;
  border-radius: 8px;
  background: #fff7ed;
  color: #713f12;
  padding: 0.55rem 0.65rem;
  font-weight: 750;
}

.research-start {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.research-start section {
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.65rem;
}

.research-start strong,
.research-start span {
  display: block;
}

.research-start strong {
  color: #111827;
  font-size: 0.9rem;
}

.research-start span {
  margin-top: 0.3rem;
  color: #526071;
  font-size: 0.84rem;
  line-height: 1.35;
}

.chart-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #fff;
  padding: 0.55rem;
}

.priority-chart-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.3rem;
}

.chart-wrap svg {
  display: block;
  min-width: 720px;
  width: 100%;
  height: auto;
}

.chart-wrap svg.priority-delta-chart {
  min-width: 0;
  width: auto;
  max-width: none;
  flex: 0 0 auto;
}

.workbench-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  margin-top: 0.55rem;
}

.workbench-table th,
.workbench-table td {
  border-bottom: 1px solid #d7dde5;
  text-align: left;
  padding: 0.42rem;
  vertical-align: top;
}

.workbench-table th {
  background: #f8fafc;
  font-size: 0.82rem;
}

.data-table-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.55rem;
  color: #526071;
}

.table-note.strong {
  font-weight: 800;
  color: #0f766e;
}

.data-plot-card {
  margin: 0.75rem 0;
  padding: 0.9rem;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #ffffff;
}

.data-plot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.data-plot-header h3 {
  margin: 0.15rem 0 0;
  font-size: 1rem;
}

.data-plot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.data-plot-header button {
  min-height: 2.2rem;
  border: 1px solid #0f766e;
  border-radius: 6px;
  background: #0f766e;
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

.data-plot-header button:hover,
.data-plot-header button:focus {
  background: #115e59;
  outline: none;
}

.data-plot-header button.secondary {
  border-color: #cbd5e1;
  background: #eef2f7;
  color: #111827;
}

.data-plot-header button.secondary:hover,
.data-plot-header button.secondary:focus {
  background: #dbe4ee;
}

.data-plot-header button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.data-plot-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.data-plot-controls label {
  display: grid;
  gap: 0.35rem;
  color: #111827;
  font-size: 0.82rem;
  font-weight: 900;
}

.data-plot-controls select {
  width: 100%;
  min-height: 2.45rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-weight: 800;
  padding: 0.4rem 0.55rem;
}

.data-plot-status {
  margin-top: 0.65rem;
  color: #526071;
  font-size: 0.86rem;
}

.scope-warning {
  margin-top: 0.65rem;
  border: 1px solid #b8f7ee;
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: #f0fdfa;
  color: #0f766e;
  padding: 0.55rem 0.65rem;
  font-size: 0.86rem;
  font-weight: 800;
}

.scope-warning.warn {
  border-color: #fed7aa;
  border-left-color: #f97316;
  background: #fff7ed;
  color: #9a3412;
}

.data-plot-formula {
  margin-top: 0.65rem;
  padding: 0.65rem;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #f8fafc;
  color: #111827;
  text-align: center;
}

.data-line-chart {
  margin-top: 0.75rem;
  min-height: 260px;
  overflow: auto;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #f8fafc;
  color: #526071;
  display: grid;
  place-items: center;
  padding: 0.75rem;
}

.data-line-chart > svg.csa-fallback-plot {
  min-width: 720px;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.data-line-chart .modebar svg {
  min-width: 0;
  width: 1em;
  max-width: none;
  height: 1em;
}

.data-line-chart .js-plotly-plot,
.data-line-chart .plot-container {
  width: 100% !important;
}

.curve-fit-panel {
  margin-top: 0.75rem;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #f8fafc;
}

.curve-fit-panel summary {
  cursor: pointer;
  padding: 0.65rem 0.75rem;
  color: #006b76;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.curve-fit-panel p,
.curve-fit-panel label,
.curve-fit-result {
  margin: 0;
  padding: 0 0.75rem 0.75rem;
}

.curve-fit-panel label {
  display: grid;
  gap: 0.35rem;
  color: #111827;
  font-weight: 900;
}

.curve-fit-panel input {
  min-height: 2.35rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font: inherit;
}

.local-api-command {
  margin: 0 0.75rem 0.75rem;
  padding: 0.55rem;
  border-radius: 8px;
  background: #111827;
  color: #e5eefb;
  font-family: Consolas, "Courier New", monospace;
  overflow-x: auto;
}

.curve-fit-health {
  margin: 0 0.75rem 0.75rem;
  width: calc(100% - 1.5rem);
  min-height: 2.25rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #eef2f7;
  color: #111827;
  font: inherit;
  font-weight: 900;
}

.curve-fit-result {
  color: #526071;
}

.curve-fit-error {
  color: #991b1b;
  font-weight: 800;
}

.curve-fit-kicker {
  color: #006b76;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.curve-fit-latex {
  margin: 0.45rem 0;
  padding: 0.65rem;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #ffffff;
  overflow-x: auto;
  text-align: center;
}

.curve-fit-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.55rem 0;
}

.curve-fit-metrics span {
  border: 1px solid #b8f7ee;
  border-radius: 999px;
  background: #e0fffa;
  color: #005e66;
  padding: 0.24rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 900;
}

.curve-fit-status-note {
  margin: 0 0.75rem 0.75rem;
  padding: 0.65rem 0.75rem;
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: #e0fffa;
  color: #064e3b;
  line-height: 1.45;
}

.curve-fit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0 0.75rem 0.75rem;
}

.curve-fit-grid section {
  min-width: 0;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.65rem;
}

.curve-fit-grid h4 {
  margin: 0 0 0.5rem;
  color: #111827;
  font-size: 0.9rem;
}

.curve-fit-table-wrap {
  overflow-x: auto;
}

.curve-fit-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.curve-fit-table th,
.curve-fit-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.42rem;
  text-align: left;
  vertical-align: top;
}

.curve-fit-table th {
  color: #006b76;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .data-plot-controls {
    grid-template-columns: 1fr;
  }

  .curve-fit-grid {
    grid-template-columns: 1fr;
  }
}

.curve-fit-warnings {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}

.plot-loading {
  color: #0f766e;
  font-weight: 900;
}

.plot-bg {
  fill: #ffffff;
}

.plot-grid {
  stroke: #e5e7eb;
  stroke-width: 1;
}

.plot-axis {
  stroke: #64748b;
  stroke-width: 1.5;
}

.plot-line {
  fill: none;
  stroke: #0f766e;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.plot-priority-dot {
  fill: #f97316;
  stroke: #ffffff;
  stroke-width: 1.5;
}

.plot-sample-dot {
  fill: #0f766e;
  opacity: 0.72;
}

.plot-tick,
.plot-label {
  fill: #475569;
  font-size: 12px;
  font-weight: 800;
}

.data-table-wrap {
  max-height: 64vh;
  overflow: auto;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #ffffff;
}

.data-preview-table {
  margin-top: 0;
  min-width: 980px;
  font-size: 0.82rem;
}

.data-preview-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}

.sort-header {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.sort-header:hover,
.sort-header:focus {
  color: #0f766e;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 0.18rem;
}

html[data-theme="dark"] .sort-header:hover,
html[data-theme="dark"] .sort-header:focus {
  color: #67e8f9;
}

html[data-theme="dark"] .data-plot-card,
html[data-theme="dark"] .data-line-chart,
html[data-theme="dark"] .data-plot-formula,
html[data-theme="dark"] .curve-fit-panel,
html[data-theme="dark"] .curve-fit-latex,
html[data-theme="dark"] .advanced-stats-panel,
html[data-theme="dark"] .advanced-stat-cards span {
  border-color: #243348;
  background: #101b2b;
  color: #cbd5e1;
}

html[data-theme="dark"] .data-plot-controls label,
html[data-theme="dark"] .data-plot-controls select,
html[data-theme="dark"] .curve-fit-panel label,
html[data-theme="dark"] .curve-fit-panel input,
html[data-theme="dark"] .audit-settings-panel select {
  color: #f8fafc;
}

html[data-theme="dark"] .data-plot-controls select,
html[data-theme="dark"] .curve-fit-panel input,
html[data-theme="dark"] .audit-settings-panel select {
  border-color: #334155;
  background: #142238;
}

html[data-theme="dark"] .file-control {
  border-color: #334155;
  background: #111c2d;
}

html[data-theme="dark"] .file-pick-button {
  border-color: #334155;
  background: #17243a;
  color: #e5eefb;
}

html[data-theme="dark"] .file-name {
  color: #cbd5e1;
}

html[data-theme="dark"] .data-plot-header button.secondary {
  border-color: #334155;
  background: #1f2f46;
  color: #e5eefb;
}

html[data-theme="dark"] .curve-fit-health {
  border-color: #334155;
  background: #1f2f46;
  color: #e5eefb;
}

html[data-theme="dark"] .curve-fit-status-note {
  border-left-color: #5eead4;
  background: #102c2f;
  color: #dffcf8;
}

html[data-theme="dark"] .curve-fit-grid section {
  border-color: #243348;
  background: #0f172a;
}

html[data-theme="dark"] .curve-fit-grid h4 {
  color: #f8fafc;
}

html[data-theme="dark"] .curve-fit-table th {
  color: #67e8f9;
}

html[data-theme="dark"] .curve-fit-table th,
html[data-theme="dark"] .curve-fit-table td {
  border-bottom-color: #243348;
}

html[data-theme="dark"] .data-plot-header button.secondary:hover,
html[data-theme="dark"] .data-plot-header button.secondary:focus {
  background: #2b405d;
}

html[data-theme="dark"] .scope-warning {
  border-color: #134e4a;
  border-left-color: #2dd4bf;
  background: #0f2f2d;
  color: #b8fff4;
}

html[data-theme="dark"] .scope-warning.warn {
  border-color: #7c2d12;
  border-left-color: #fb923c;
  background: #2f1d12;
  color: #fed7aa;
}

html[data-theme="dark"] .audit-warning-item {
  border-color: #7c2d12;
  border-left-color: #fb923c;
  background: #2f1d12;
  color: #fed7aa;
}

html[data-theme="dark"] .advanced-stat-cards strong {
  color: #f8fafc;
}

html[data-theme="dark"] .method-note,
html[data-theme="dark"] .advanced-stat-cards em,
html[data-theme="dark"] .stats-cautions,
html[data-theme="dark"] .settings-note {
  color: #cbd5e1;
}

html[data-theme="dark"] .plot-bg {
  fill: #0b1220;
}

html[data-theme="dark"] .plot-grid {
  stroke: #243348;
}

html[data-theme="dark"] .plot-axis {
  stroke: #94a3b8;
}

html[data-theme="dark"] .plot-line {
  stroke: #5eead4;
}

html[data-theme="dark"] .plot-tick,
html[data-theme="dark"] .plot-label {
  fill: #cbd5e1;
}

.data-preview-table td {
  max-width: 260px;
  overflow-wrap: anywhere;
}

.data-preview-table tbody tr {
  cursor: pointer;
}

.data-preview-table tbody tr:hover td {
  background: #f1f5f9;
}

.data-preview-table .line-cell {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 86px;
  min-width: 86px;
  background: #f8fafc;
  color: #0b6b75;
  font-weight: 900;
  white-space: nowrap;
}

.data-preview-table tr.priority-row td {
  background: #ecfeff;
}

.data-preview-table tr.priority-row .line-cell {
  background: #ccfbf1;
}

.data-preview-table tr.jump-highlight td {
  animation: sourceRowPulse 1.8s ease-out;
}

@keyframes sourceRowPulse {
  0% {
    background: #fef3c7;
  }
  100% {
    background: inherit;
  }
}

.table-note {
  color: #526071;
  font-size: 0.84rem;
}

.event-scope-note {
  border: 1px solid #b7efe8;
  background: #ecfeff;
  color: #0f3f46;
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  margin: 0.65rem 0 0.4rem;
  line-height: 1.45;
}

.line-jump {
  border: 1px solid #b7efe8;
  background: #f0fdfa;
  color: #0b6b75;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.line-jump:hover,
.line-jump:focus {
  outline: 2px solid #2dd4bf;
  outline-offset: 2px;
}

.cause-label {
  color: #0f766e;
  font-weight: 900;
  white-space: nowrap;
}

.source-neighborhood {
  margin: 0.9rem 0;
}

.source-neighborhood-card {
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.85rem;
}

.source-neighborhood-empty {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: #526071;
}

.source-neighborhood-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.source-neighborhood-header h3 {
  margin: 0.15rem 0 0;
}

.inspection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.inspection-grid section {
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.65rem;
}

.inspection-grid strong,
.inspection-grid span {
  display: block;
}

.inspection-grid strong {
  margin-bottom: 0.3rem;
  color: #0b6b75;
}

.source-check-list {
  margin: 0.25rem 0 0.75rem;
  padding-left: 1.15rem;
  color: #334155;
}

.source-action-block {
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #f8fafc;
  margin: 0 0 0.7rem;
  padding: 0.65rem;
}

.source-action-block > strong,
.source-falsification strong {
  color: #0b6b75;
}

.source-action-block .source-check-list {
  margin-bottom: 0;
}

.source-falsification {
  border-left: 4px solid #0f766e;
  color: #334155;
  margin: 0 0 0.75rem;
  padding: 0.45rem 0.7rem;
  background: #f0fdfa;
}

.correlation-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.correlation-chip {
  border: 1px solid #99f6e4;
  border-radius: 999px;
  background: #ecfeff;
  color: #0f5f67;
  display: inline-block;
  font-weight: 800;
  padding: 0.28rem 0.5rem;
}

.source-neighborhood-table-wrap {
  overflow: auto;
  max-height: 340px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.source-neighborhood-table {
  margin: 0;
  border: 0;
}

.source-neighborhood-table .source-neighborhood-offset {
  min-width: 72px;
  color: #526071;
  font-weight: 800;
  white-space: nowrap;
}

.source-neighborhood-table tr.source-neighborhood-row-main td {
  background: #ecfeff;
  box-shadow: inset 0 1px 0 #67e8f9, inset 0 -1px 0 #67e8f9;
}

.event-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.55rem 0 0.4rem;
  color: #526071;
  font-size: 0.92rem;
}

.event-pager div {
  display: flex;
  gap: 0.45rem;
}

.event-pager button {
  width: auto;
  padding: 0.42rem 0.7rem;
}

html[data-theme="dark"] .event-scope-note {
  background: #102a36;
  border-color: #155e75;
  color: #d6fbff;
}

html[data-theme="dark"] .event-pager {
  color: #cbd5e1;
}

html[data-theme="dark"] .line-jump {
  background: #0f3f46;
  border-color: #2dd4bf;
  color: #d6fbff;
}

html[data-theme="dark"] .cause-label {
  color: #99f6e4;
}

html[data-theme="dark"] .source-neighborhood-card {
  background: #101b2b;
  border-color: #243348;
}

html[data-theme="dark"] .source-neighborhood-empty,
html[data-theme="dark"] .source-check-list {
  color: #cbd5e1;
}

html[data-theme="dark"] .inspection-grid section {
  background: #0b1220;
  border-color: #243348;
}

html[data-theme="dark"] .inspection-grid strong {
  color: #5eead4;
}

html[data-theme="dark"] .source-action-block {
  background: #0b1220;
  border-color: #243348;
}

html[data-theme="dark"] .source-action-block > strong,
html[data-theme="dark"] .source-falsification strong {
  color: #5eead4;
}

html[data-theme="dark"] .source-falsification {
  background: #102a36;
  color: #cbd5e1;
}

html[data-theme="dark"] .correlation-chip {
  background: #0f3f46;
  border-color: #2dd4bf;
  color: #d6fbff;
}

html[data-theme="dark"] .source-neighborhood-table-wrap {
  border-color: #243348;
}

html[data-theme="dark"] .source-neighborhood-table .source-neighborhood-offset {
  color: #cbd5e1;
}

html[data-theme="dark"] .source-neighborhood-table tr.source-neighborhood-row-main td {
  background: #12313e;
  box-shadow: inset 0 1px 0 #155e75, inset 0 -1px 0 #155e75;
}

html[data-theme="dark"] .data-preview-table tbody tr:hover td {
  background: #111f33;
}

.workbench-code,
.json-preview,
.markdown-preview {
  font-family: Consolas, "Courier New", monospace;
  overflow-wrap: anywhere;
}

.json-preview,
.markdown-preview {
  white-space: pre-wrap;
  max-height: 420px;
  overflow: auto;
  color: #e5eefb;
  background: #111827;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.82rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.55rem;
}

.control-result-card {
  display: grid;
  gap: 0.25rem;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.75rem;
}

.control-result-card.pass {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.control-result-card.warn {
  border-color: #fed7aa;
  background: #fff7ed;
}

.control-result-card span {
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.control-result-card strong {
  color: #0f172a;
  font-size: 1.45rem;
  line-height: 1.05;
}

.control-result-card small {
  color: #526071;
  font-size: 0.88rem;
  line-height: 1.35;
}

.method-item {
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.6rem;
}

.method-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.8rem;
  margin-bottom: 0.45rem;
  border-radius: 6px;
  background: #0f766e;
  color: #fff;
  font-weight: 900;
}

.method-help {
  margin-top: 0.75rem;
}

.method-steps-compact {
  margin: 0.55rem 0 0;
  padding-left: 1.25rem;
  color: #334155;
}

.method-steps-compact li {
  margin-bottom: 0.35rem;
  line-height: 1.38;
}

.advanced-stats-panel {
  margin: 0.8rem 0;
  padding: 0.75rem;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #f8fafc;
}

.advanced-stats-panel h3,
.advanced-stats-panel h4 {
  margin: 0 0 0.55rem;
}

.method-note {
  color: #526071;
  line-height: 1.45;
}

.stat-result-line {
  margin: 0.55rem 0;
  color: #334155;
  line-height: 1.45;
}

.advanced-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5rem;
  margin: 0.65rem 0;
}

.advanced-stat-cards span {
  display: grid;
  gap: 0.15rem;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.55rem;
}

.advanced-stat-cards strong {
  color: #0f172a;
  font-size: 1.25rem;
}

.advanced-stat-cards em {
  color: #526071;
  font-style: normal;
  font-size: 0.82rem;
}

.stats-table-wrap {
  overflow: auto;
  margin: 0.55rem 0 0.75rem;
}

.compact-stats-table {
  min-width: 760px;
}

.stats-cautions {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
  color: #526071;
}

.stats-help,
.inline-help {
  margin-top: 0.65rem;
}

.human-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.55rem;
}

.singularity-headline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.38fr);
  gap: 0.55rem;
  align-items: start;
  margin-bottom: 0.55rem;
}

.audit-help {
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.55rem 0.65rem;
}

.audit-help summary {
  cursor: pointer;
  color: #0f766e;
  font-weight: 800;
  list-style-position: inside;
  outline: none;
  transition: color 140ms ease, transform 140ms ease;
}

.audit-help summary:hover,
.audit-help summary:focus-visible {
  color: #0b5f59;
  transform: translateX(2px);
}

.audit-help p {
  color: #334155;
  line-height: 1.42;
  margin: 0.5rem 0 0;
}

.audit-help ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.audit-help li {
  color: #334155;
  line-height: 1.4;
}

.integrity-help {
  margin-top: 0.65rem;
}

.audit-help .formula-band {
  margin: 0.6rem 0 0;
}

.human-card {
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.65rem;
}

.human-card h3 {
  margin: 0 0 0.45rem;
  color: #0f172a;
  font-size: 0.98rem;
}

.human-card p,
.human-card li {
  color: #334155;
  line-height: 1.42;
}

.human-card p {
  margin: 0;
}

.human-card ul {
  margin: 0;
  padding-left: 1.05rem;
}

.human-card.wide {
  grid-column: 1 / -1;
}

.human-card-illustrated {
  display: grid;
  gap: 0.65rem;
  align-content: start;
}

.human-card-illustrated.wide {
  grid-template-columns: minmax(240px, 0.36fr) minmax(0, 1fr);
  align-items: center;
}

.human-card-figure {
  display: block;
  width: 100%;
  max-height: 170px;
  object-fit: contain;
  padding: 0.35rem;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 850px) {
  .singularity-headline {
    grid-template-columns: 1fr;
  }

  .human-card-illustrated.wide {
    grid-template-columns: 1fr;
  }
}

.candidate-lemma-card {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.candidate-lemma-list {
  margin: 0.65rem 0 0;
  padding-left: 1.25rem;
}

.candidate-lemma-list li {
  margin-bottom: 0.65rem;
}

.candidate-card-note {
  color: #475569;
  margin: 0.2rem 0 0.65rem;
}

.candidate-lemma-item {
  border: 1px solid #99f6e4;
  border-radius: 8px;
  background: #ffffff;
  list-style-position: inside;
  padding: 0.65rem;
}

.candidate-lemma-head {
  align-items: center;
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.candidate-lemma-head span {
  border: 1px solid #99f6e4;
  border-radius: 999px;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0.18rem 0.45rem;
}

.candidate-lemma-list small,
.candidate-lemma-list em {
  display: block;
  margin-top: 0.25rem;
}

.candidate-lemma-list small {
  color: #0f766e;
  font-weight: 800;
}

.candidate-lemma-cause {
  color: #7c2d12 !important;
}

.candidate-review-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 0.45rem 0;
}

.candidate-review-grid div {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.55rem;
}

.candidate-review-grid dt,
.candidate-check-block strong {
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.candidate-review-grid dd {
  color: #334155;
  margin: 0.25rem 0 0;
}

.candidate-check-block {
  margin-top: 0.55rem;
}

.candidate-lemma-checks {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
}

.candidate-falsification {
  color: #334155;
  margin: 0.45rem 0 0;
}

.claim-bridge {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.claim-bridge p {
  color: #475569;
  margin: 0 0 0.6rem;
}

.claim-bridge-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.claim-bridge-links a {
  background: #0f766e;
  border-radius: 8px;
  color: #ffffff;
  display: inline-block;
  font-weight: 900;
  padding: 0.45rem 0.6rem;
  text-decoration: none;
}

.human-stance {
  border-color: #99f6e4;
  background: #ecfeff;
}

html[data-theme="dark"] .candidate-lemma-item {
  background: #0b1220;
  border-color: #1f7a74;
}

html[data-theme="dark"] .candidate-lemma-head span {
  border-color: #2dd4bf;
  color: #99f6e4;
}

html[data-theme="dark"] .candidate-card-note,
html[data-theme="dark"] .candidate-review-grid dd {
  color: #cbd5e1;
}

html[data-theme="dark"] .candidate-review-grid div {
  border-color: #1f7a74;
}

html[data-theme="dark"] .candidate-falsification {
  color: #cbd5e1;
}

html[data-theme="dark"] .audit-help {
  background: #0b1220;
  border-color: #1f7a74;
}

html[data-theme="dark"] .audit-help p,
html[data-theme="dark"] .audit-help li {
  color: #cbd5e1;
}

html[data-theme="dark"] .human-stance {
  background: #0b1f2a;
  border-color: #1f7a74;
}

.status-pill {
  display: inline;
  margin: 0;
  border-radius: 0;
  padding: 0;
  font-weight: 800;
  color: #475569;
}

.status-pill.pass {
  color: #065f46;
  background: transparent;
}

.status-pill.fail {
  color: #991b1b;
  background: transparent;
}

.status-pill.priority {
  color: #155e75;
  background: transparent;
}

.status-pill + .status-pill::before,
.status-pill + .table-note::before {
  content: " · ";
  color: #94a3b8;
  font-weight: 400;
}

.method-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0;
}

.method-summary span {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  padding: 0.32rem 0.55rem;
  color: #111827;
  font-weight: 900;
}

.explain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.45rem;
}

.explain-pill {
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #dcfce7;
  color: #065f46;
}

.explain-pill.fail {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.explain-pill summary {
  cursor: pointer;
  padding: 0.42rem 0.55rem;
  font-weight: 900;
  list-style-position: inside;
}

.explain-body {
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.58);
  padding: 0.55rem;
}

.explain-body h4 {
  margin: 0 0 0.35rem;
  color: #111827;
  font-size: 0.92rem;
}

.explain-body p {
  margin: 0;
  color: #1f2933;
  font-size: 0.86rem;
  line-height: 1.42;
}

.tutorial-overlay[hidden] {
  display: none;
}

.tutorial-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.18);
}

.tutorial-card {
  position: fixed;
  z-index: 90;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.28);
  padding: 0.9rem;
}

.tutorial-card h2 {
  margin: 0 0 0.45rem;
  color: #111827;
  font-size: 1.1rem;
}

.tutorial-card p {
  margin: 0;
  color: #334155;
  line-height: 1.45;
}

.tutorial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.tutorial-actions button {
  border: 0;
  border-radius: 6px;
  background: #0f766e;
  color: #fff;
  padding: 0.45rem 0.62rem;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.tutorial-actions button.secondary {
  background: #475569;
}

.tutorial-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.tutorial-progress {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.75rem;
}

.tutorial-progress span {
  width: 1.15rem;
  height: 0.32rem;
  border-radius: 999px;
  background: #cbd5e1;
}

.tutorial-progress span.active {
  background: #0f766e;
}

.tutorial-highlight {
  position: relative;
  z-index: 85;
  outline: 3px solid #facc15;
  outline-offset: 4px;
  box-shadow: 0 0 0 8px rgba(250, 204, 21, 0.22);
}

.workspace-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.55rem;
  max-height: 52vh;
  overflow: auto;
}

.queue-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.workspace-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.55rem;
}

.queue-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.55rem;
}

.workspace-row input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
}

.workspace-title {
  font-weight: 900;
  color: #111827;
}

.workspace-meta {
  color: #526071;
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

.workspace-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  grid-column: 1 / -1;
}

.snapshot-select {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.34rem 0.42rem;
  font: inherit;
  background: #fff;
}

.mini-button {
  padding: 0.36rem 0.5rem;
  background: #2563eb;
}

.mini-button.delete {
  background: #991b1b;
}

.comparison-note {
  color: #526071;
  margin: 0.5rem 0 0;
}

.chart-stack {
  display: grid;
  gap: 0.9rem;
}

.chart-stack svg {
  border: 1px solid #d7dde5;
  border-radius: 8px;
  background: #fff;
}

.print-report table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0 1.1rem;
}

.print-report th,
.print-report td {
  border: 1px solid #d7dde5;
  padding: 0.5rem;
  text-align: left;
  vertical-align: top;
}

.print-section {
  break-inside: avoid;
  margin-bottom: 1rem;
}

.print-report {
  display: none;
}

@media (max-width: 1080px) {
  .brief-grid {
    grid-template-columns: 1fr;
  }

  .workbench-left {
    position: static;
    max-height: none;
  }

  .workbench-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .workbench-status {
    max-width: none;
    text-align: left;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .research-start {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .sidebar,
  .workbench-topbar,
  .workbench-console,
  .export-row,
  .workspace-actions,
  .screen-only {
    display: none !important;
  }

  .app-shell {
    display: block !important;
  }

  .content {
    margin: 0 !important;
    max-width: none !important;
  }

  .print-report {
    display: block;
  }

  .workbench-dashboard {
    display: none;
  }
}
