/* Copyright Chemryt Informatics Private Limited */
/* ChemrytSC scientific UI rule: keep molecule controls compact so structure, identity, and screening context stay primary. */
:root {
  --chemrytsc-ink: var(--chemrytiq-text, #12304d);
  --chemrytsc-muted: var(--chemrytiq-text-soft, #445d73);
  --chemrytsc-soft-muted: var(--chemrytiq-text-muted, #6f8498);
  --chemrytsc-line: var(--chemrytiq-border, #d7e3ef);
  --chemrytsc-line-strong: var(--chemrytiq-border-strong, #c5d4e5);
  --chemrytsc-panel: var(--chemrytiq-surface, #ffffff);
  --chemrytsc-soft: var(--chemrytiq-surface-soft, #f7fbff);
  --chemrytsc-font-sans: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --chemrytsc-blue: #1976d2;
  --chemrytsc-blue-soft: #eef6ff;
  --chemrytsc-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  --chemrytsc-align-left: max(15px, calc((100vw - 1170px) / 2));
  --chemrytsc-align-right: max(15px, calc((100vw - 1170px) / 2));
  --chemrytsc-align-width: min(1170px, calc(100vw - var(--chemrytsc-align-left) - var(--chemrytsc-align-right)));
  --chemrytsc-align-trim: 3px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: #f3f7fb;
  color: var(--chemrytsc-ink);
  font-family: var(--chemrytsc-font-sans);
}

.chemrytsc-shell {
  box-sizing: border-box;
  width: calc(var(--chemrytsc-align-width) - var(--chemrytsc-align-trim)) !important;
  max-width: none !important;
  margin: 1.25rem auto 3rem var(--chemrytsc-align-left) !important;
  padding-inline: 0 !important;
  overflow-x: clip;
}

.chemryt-module-navbar .chemryt-module-navbar__list {
  box-sizing: border-box;
  width: calc(var(--chemrytsc-align-width) - var(--chemrytsc-align-trim)) !important;
  max-width: none !important;
  margin-left: var(--chemrytsc-align-left) !important;
  margin-right: auto !important;
  padding-inline: 0 !important;
}

.chemrytsc-page {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  margin: 0 auto;
  padding: 0 0 24px;
  font-size: 11px !important;
}

.chemrytsc-page > * {
  min-width: 0;
}

.chemrytsc-page h1,
.chemrytsc-page h2,
.chemrytsc-page h3,
.chemrytsc-page p {
  margin: 0;
}

.chemrytsc-topbar,
.chemrytsc-workbench,
.chemrytsc-panel {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 12px;
}

.chemrytsc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(13, 65, 98, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(12, 54, 88, 0.95), rgba(32, 110, 136, 0.92)),
    linear-gradient(120deg, #0e334d, #1f6c86);
  box-shadow: 0 18px 40px rgba(20, 46, 67, 0.08);
  color: #f5fbff;
  padding: 12px 16px;
}

.chemrytsc-kicker {
  display: block;
  margin-bottom: 3px;
  color: rgba(226, 244, 255, 0.86);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.chemrytsc-page h1 {
  color: #f5fbff !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
}

.chemrytsc-page h2 {
  color: var(--chemrytsc-ink);
  font-size: 13px !important;
  font-weight: 600;
  line-height: 1.2 !important;
}

.chemrytsc-page p {
  color: var(--chemrytsc-muted);
  font-size: 11px !important;
  line-height: 1.3 !important;
}

.chemrytsc-topbar p {
  max-width: 680px;
  color: rgba(233, 245, 255, 0.84) !important;
  font-size: 12px !important;
}

.chemrytsc-workbench {
  display: grid;
  gap: 12px;
  max-width: 100%;
}

.chemrytsc-editor-panel,
.chemrytsc-panel {
  border: 1px solid var(--chemrytsc-line);
  border-radius: 8px;
  background: var(--chemrytsc-panel);
  box-shadow: var(--chemrytsc-shadow);
  padding: 10px;
}

.chemrytsc-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.chemrytsc-panel-head > div {
  min-width: 0;
  flex: 1 1 auto;
}

.chemrytsc-panel-head > span {
  flex: 0 1 320px;
  min-width: 0;
  color: var(--chemrytsc-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

.chemrytsc-loader-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: -2px 0 8px;
}

.chemrytsc-loader-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.chemrytsc-loader-actions .chemrytsc-molecule-mode {
  flex: 0 1 auto;
  margin-left: auto;
  margin-right: 10px;
  min-width: 0;
  max-width: 100%;
}

.chemrytsc-loader-actions .chemrytsc-view-toggle {
  flex: 0 0 auto;
  margin-left: 2px;
}

.chemrytsc-page button {
  min-height: 30px;
  border: 1px solid #bad2e8;
  border-radius: 7px;
  background: #f8fbfe;
  color: var(--chemrytsc-blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chemrytsc-page button:hover {
  border-color: var(--chemrytsc-blue);
  background: var(--chemrytsc-blue-soft);
}

.chemrytsc-page button.primary {
  border-color: var(--chemrytsc-blue);
  background: var(--chemrytsc-blue);
  color: #ffffff;
}

.chemrytsc-loader-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, calc((100% - 10px) / 2)));
  gap: 10px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.chemrytsc-prerun-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  border: 1px solid #dbe7f2;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5fb 100%);
  padding: 12px;
}

.chemrytsc-prerun-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.chemrytsc-prerun-panel__head strong {
  font-size: 13px;
  color: var(--chemrytsc-ink);
}

.chemrytsc-prerun-panel__head span {
  color: var(--chemrytsc-soft-muted);
  font-size: 11px;
}

.chemrytsc-prerun-panel__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.chemrytsc-prerun-card {
  border: 1px solid rgba(25, 118, 210, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 10px;
}

.chemrytsc-prerun-card h3 {
  margin: 0 0 6px;
  font-size: 12px !important;
  color: var(--chemrytsc-ink);
}

.chemrytsc-prerun-card p {
  color: var(--chemrytsc-muted);
}

.chemrytsc-progress {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
  border: 1px solid #dbe6f0;
  border-radius: 10px;
  background: #ffffff;
  padding: 8px 10px;
}

.chemrytsc-progress__bar {
  position: relative;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e8f0f8;
}

.chemrytsc-progress__bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -35%;
  width: 35%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1976d2, #23a783);
  animation: chemrytsc-progress-slide 1.2s linear infinite;
}

.chemrytsc-progress span {
  color: #35526c;
  font-size: 11px !important;
  line-height: 1.3;
}

@keyframes chemrytsc-progress-slide {
  from { left: -35%; }
  to { left: 100%; }
}

.chemrytsc-structure-viewer {
  display: grid;
  gap: 6px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.chemrytsc-editor-frame {
  position: relative;
  min-width: 0;
  min-height: 300px;
  height: 300px;
  border: 1px solid var(--chemrytsc-line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.chemrytsc-jsme,
.chemrytsc-3d-viewer {
  width: 100%;
  height: 100%;
}

.chemrytsc-jsme {
  min-height: 300px;
}

.chemrytsc-live-structure-map {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 251, 255, 0.98));
}

.chemrytsc-live-structure-map__svg {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  overflow: hidden;
  position: relative;
}

.chemrytsc-live-structure-map__svg svg {
  display: block;
  width: 100%;
  height: 100%;
}

.chemrytsc-live-structure-map__badge {
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 248, 0.96);
  color: #8a2230;
  padding: 8px 10px;
  line-height: 1.3;
}

.chemrytsc-editor-frame.is-live-map.is-depict .chemrytsc-jsme {
  opacity: 0.06;
  pointer-events: none;
}

.chemrytsc-editor-frame.is-live-map .chemrytsc-live-structure-map[hidden] {
  display: none;
}

.chemrytsc-editor-frame:not(.is-depict) .chemrytsc-live-structure-map {
  display: none;
}

.chemrytsc-live-structure-map .chemrytsc-atom-hit,
.chemrytsc-live-structure-map .chemrytsc-bond-hit {
  transition: opacity 140ms ease, transform 140ms ease, stroke-width 140ms ease, fill-opacity 140ms ease;
}

.chemrytsc-live-structure-map .chemrytsc-bond-hit {
  stroke-linecap: round;
}

.chemrytsc-live-structure-map .chemrytsc-atom-hit.is-muted,
.chemrytsc-live-structure-map .chemrytsc-bond-hit.is-muted {
  opacity: 0.12;
}

.chemrytsc-live-structure-map .chemrytsc-atom-hit.is-selected,
.chemrytsc-live-structure-map .chemrytsc-bond-hit.is-selected {
  opacity: 1;
  filter: drop-shadow(0 0 7px rgba(220, 38, 38, 0.3));
}

.chemrytsc-live-structure-map .chemrytsc-bond-hit.is-selected path,
.chemrytsc-live-structure-map .chemrytsc-bond-hit.is-selected line {
  stroke: #dc2626 !important;
  stroke-width: 3.6px !important;
}

.chemrytsc-live-structure-map .chemrytsc-atom-hit.is-selected ellipse,
.chemrytsc-live-structure-map .chemrytsc-atom-hit.is-selected path,
.chemrytsc-live-structure-map .chemrytsc-atom-hit.is-selected text {
  fill: #dc2626 !important;
  stroke: #dc2626 !important;
}

.chemrytsc-3d-viewer {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
  background: linear-gradient(180deg, #fcfdff, #f3f7fb);
  color: var(--chemrytsc-muted);
  font-size: 12px;
  text-align: center;
  padding: 12px;
}

.chemrytsc-3d-stage {
  min-width: 0;
  min-height: 0;
  height: 100%;
  border: 1px solid #dbe6f0;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.chemrytsc-3d-canvas {
  width: 100%;
  height: 100%;
  min-height: 248px;
}

.chemrytsc-3d-viewer > span {
  display: block;
  color: var(--chemrytsc-muted);
  font-size: 11px;
  line-height: 1.2;
}

.chemrytsc-editor-frame.is-3d .chemrytsc-jsme {
  display: none;
}

.chemrytsc-editor-frame:not(.is-3d) .chemrytsc-3d-viewer {
  display: none;
}

.chemrytsc-molecule-info {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  min-height: 300px;
  height: 300px;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--chemrytsc-line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 9px;
}

.chemrytsc-info-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #e1ebf3;
  padding-bottom: 7px;
}

.chemrytsc-info-head strong {
  color: var(--chemrytsc-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.chemrytsc-info-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--chemrytsc-soft-muted);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.chemrytsc-loader-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.chemrytsc-loader-fields .wide {
  grid-column: 1 / -1;
}

.chemrytsc-loader-fields label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--chemrytsc-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

.chemrytsc-loader-fields input {
  min-width: 0;
  min-height: 30px;
  width: 100%;
  border: 1px solid var(--chemrytsc-line-strong);
  border-radius: 7px;
  background: #ffffff;
  color: var(--chemrytsc-ink);
  font-size: 12px;
  font-weight: 400;
  padding: 0 9px;
}

.chemrytsc-loader-fields input[readonly],
.chemrytsc-loader-fields .chemrytsc-readonly-output {
  border-color: #dbe6f0;
  background: linear-gradient(180deg, #f8fbfe, #f2f6fa);
  color: #254762;
  box-shadow: inset 3px 0 0 rgba(25, 118, 210, 0.18);
  cursor: default;
}

.chemrytsc-loader-fields .chemrytsc-readonly-output {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #dbe6f0;
  border-radius: 7px;
}

.chemrytsc-loader-fields input[readonly]:focus {
  outline: none;
}

.chemrytsc-view-toggle,
.chemrytsc-molecule-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chemrytsc-view-toggle {
  padding: 0 !important;
  min-height: 21px !important;
  height: 21px !important;
  border: 1px solid var(--chemrytsc-line);
  border-radius: 4px !important;
  background: #fbfdff;
  overflow: hidden;
}

.chemrytsc-view-toggle button {
  min-width: 44px;
  min-height: 26px;
  border-color: transparent;
  padding: 0 8px;
}

.chemrytsc-view-toggle button.is-active {
  border-color: var(--chemrytsc-blue);
  background: var(--chemrytsc-blue);
  color: #ffffff;
}

.chemrytsc-molecule-mode {
  margin: 0;
  padding: 0 !important;
  min-height: 21px !important;
  height: 21px !important;
  max-width: calc(100% - 10px);
  border: 1px solid var(--chemrytsc-line);
  border-radius: 4px !important;
  background: #fbfdff;
  overflow: hidden;
}

.chemrytsc-molecule-mode label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--chemrytsc-ink);
  font-size: 12px;
  font-weight: 500;
}

.chemrytsc-molecule-mode input {
  margin: 0;
}

.chemrytsc-dropzone,
.chemrytsc-blueprint-panel {
  border: 1px dashed var(--chemrytsc-line-strong);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.chemrytsc-mixture-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.chemrytsc-mixture-table {
  display: grid;
  gap: 6px;
}

.chemrytsc-mixture-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 0.7fr 1.2fr;
  gap: 6px;
}

.chemrytsc-mixture-row span,
.chemrytsc-mixture-row input {
  min-width: 0;
  font-size: 11px;
}

.chemrytsc-mixture-row-head span {
  color: var(--chemrytsc-soft-muted);
  font-weight: 600;
}

.chemrytsc-loader-readouts {
  display: grid;
  gap: 8px;
}

.chemrytsc-loader-readouts > div {
  display: grid;
  gap: 4px;
}

.chemrytsc-loader-readouts dt {
  color: var(--chemrytsc-muted);
  font-size: 11px;
  font-weight: 600;
}

.chemrytsc-loader-readouts dd {
  margin: 0;
  color: var(--chemrytsc-ink);
  font-size: 12px;
  line-height: 1.3;
  word-break: break-word;
}

.chemrytsc-prediction-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chemrytsc-model-rationale {
  border: 1px solid var(--chemrytsc-line);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.chemrytsc-model-rationale > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.chemrytsc-model-rationale strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.chemrytsc-model-rationale ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.chemrytsc-decomp-plot-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.chemrytsc-decomp-plot-head h3 {
  margin-bottom: 4px;
}

.chemrytsc-decomp-plot-head p {
  margin: 0;
  color: var(--chemrytsc-muted);
  line-height: 1.4;
}

.chemrytsc-decomp-plot-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.chemrytsc-decomp-plot-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.chemrytsc-decomp-plot-readout {
  border: 1px solid var(--chemrytsc-line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 8px 10px;
  color: var(--chemrytsc-ink);
  line-height: 1.35;
  min-height: 38px;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.chemrytsc-decomp-plot-shell {
  border: 1px solid var(--chemrytsc-line);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  padding: 10px;
}

.chemrytsc-decomp-plot-canvas {
  display: block;
  width: 100%;
  height: 300px;
}

.chemrytsc-decomp-plot-science {
  display: grid;
  gap: 8px;
}

.chemrytsc-decomp-plot-science > div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.chemrytsc-decomp-plot-science span {
  color: var(--chemrytsc-soft-muted);
}

.chemrytsc-decomp-plot-science strong {
  color: var(--chemrytsc-ink);
  line-height: 1.35;
}

.chemrytsc-decomp-plot-legend {
  display: grid;
  gap: 8px;
  color: var(--chemrytsc-muted);
}

.chemrytsc-decomp-plot-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chemrytsc-decomp-plot-legend i {
  display: inline-block;
  width: 18px;
  height: 0;
  border-top: 3px solid currentColor;
}

.chemrytsc-decomp-plot-legend .is-tga {
  color: #0f766e;
}

.chemrytsc-decomp-plot-legend .is-dtg {
  color: #c2410c;
}

.chemrytsc-decomp-plot-legend .is-stage {
  color: rgba(196, 53, 67, 0.45);
}

.chemrytsc-decomp-plot-legend .is-mixture {
  color: #1d4ed8;
}

.chemrytsc-decomp-plot-legend .is-selected {
  color: rgba(221, 107, 32, 0.85);
}

.chemrytsc-decomp-matrix-lab {
  margin-top: 12px;
  border: 1px solid var(--chemrytsc-line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fb 100%);
  padding: 10px;
  display: grid;
  gap: 10px;
}

.chemrytsc-decomp-matrix-lab__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.chemrytsc-decomp-matrix-lab__head h4 {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--chemrytsc-ink);
}

.chemrytsc-decomp-matrix-lab__head p {
  margin: 0;
}

.chemrytsc-decomp-matrix-lab__delta {
  min-width: 200px;
  border: 1px solid rgba(25, 118, 210, 0.18);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
  color: var(--chemrytsc-blue);
  line-height: 1.35;
}

.chemrytsc-decomp-matrix-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chemrytsc-decomp-matrix-pills button.is-active {
  border-color: #2b6cb0;
  background: #eaf4ff;
  color: #134d80;
}

.chemrytsc-decomp-shielding {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.chemrytsc-decomp-shielding input[type="range"] {
  width: 100%;
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
}

.chemrytsc-decomp-triage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.chemrytsc-decomp-triage-grid > div {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
  display: grid;
  gap: 4px;
}

.chemrytsc-decomp-triage-grid span {
  color: var(--chemrytsc-soft-muted);
}

.chemrytsc-decomp-triage-grid strong {
  color: var(--chemrytsc-ink);
  line-height: 1.35;
}

.chemrytsc-decomp-kinetics {
  margin-top: 12px;
  border: 1px solid var(--chemrytsc-line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf8 0%, #fff8ef 100%);
  padding: 12px;
  display: grid;
  gap: 12px;
}

.chemrytsc-decomp-kinetics__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chemrytsc-decomp-kinetics__head h4 {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--chemrytsc-ink);
}

.chemrytsc-decomp-kinetics__head p {
  margin: 0;
}

.chemrytsc-decomp-kinetics__badge {
  min-width: 190px;
  border: 1px solid rgba(194, 65, 12, 0.18);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
  color: #9a3412;
  line-height: 1.35;
}

.chemrytsc-decomp-kinetics__controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.chemrytsc-decomp-kinetics__controls label {
  display: grid;
  gap: 6px;
}

.chemrytsc-decomp-kinetics__controls span {
  color: var(--chemrytsc-soft-muted);
}

.chemrytsc-decomp-kinetics__controls input,
.chemrytsc-decomp-kinetics__controls select {
  width: 100%;
}

.chemrytsc-decomp-kinetics__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.chemrytsc-decomp-kinetics__grid > div {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
  display: grid;
  gap: 4px;
}

.chemrytsc-decomp-kinetics__grid span {
  color: var(--chemrytsc-soft-muted);
}

.chemrytsc-decomp-kinetics__grid strong {
  color: var(--chemrytsc-ink);
  line-height: 1.35;
}

.chemrytsc-decomp-copyrolysis {
  margin-top: 12px;
  border: 1px solid var(--chemrytsc-line);
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fcff 0%, #eef6fb 100%);
  padding: 12px;
  display: grid;
  gap: 12px;
}

.chemrytsc-decomp-copyrolysis__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chemrytsc-decomp-copyrolysis__head h4 {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--chemrytsc-ink);
}

.chemrytsc-decomp-copyrolysis__head p {
  margin: 0;
}

.chemrytsc-decomp-copyrolysis__badge {
  min-width: 190px;
  border: 1px solid rgba(25, 118, 210, 0.18);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
  color: var(--chemrytsc-blue);
  line-height: 1.35;
}

.chemrytsc-decomp-copyrolysis__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.chemrytsc-decomp-copyrolysis__grid > div {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
  display: grid;
  gap: 4px;
}

.chemrytsc-decomp-copyrolysis__grid span {
  color: var(--chemrytsc-soft-muted);
}

.chemrytsc-decomp-copyrolysis__grid strong {
  color: var(--chemrytsc-ink);
  line-height: 1.35;
}

.chemrytsc-decomp-table-wrap {
  overflow-x: auto;
}

.chemrytsc-decomp-table {
  width: max-content;
  min-width: 100%;
}

.chemrytsc-decomp-table th,
.chemrytsc-decomp-table td {
  white-space: nowrap;
  vertical-align: top;
}

.chemrytsc-decomp-risk-flag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.chemrytsc-decomp-risk-flag.is-corrosive {
  color: #b42318;
}

.chemrytsc-decomp-risk-flag.is-flammable {
  color: #c2410c;
}

.chemrytsc-decomp-risk-flag.is-char {
  color: #166534;
}

.chemrytsc-decomp-risk-flag.is-watch {
  color: #1d4ed8;
}

.chemrytsc-decomp-vapor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chemrytsc-decomp-vapor-head h3 {
  margin: 0 0 4px;
}

.chemrytsc-decomp-vapor-head p {
  margin: 0;
}

.chemrytsc-decomp-vapor-badge {
  min-width: 220px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 8px 10px;
  color: var(--chemrytsc-ink);
  line-height: 1.35;
}

.chemrytsc-decomp-vapor-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chemrytsc-decomp-vapor-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.chemrytsc-decomp-vapor-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.chemrytsc-decomp-vapor-card__top strong,
.chemrytsc-decomp-vapor-card__top span {
  display: block;
}

.chemrytsc-decomp-vapor-card__top span {
  color: var(--chemrytsc-soft-muted);
}

.chemrytsc-decomp-vapor-tone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.chemrytsc-decomp-vapor-tone.is-corrosive {
  background: #fee4e2;
  color: #b42318;
}

.chemrytsc-decomp-vapor-tone.is-toxic {
  background: #fff0c2;
  color: #9a6700;
}

.chemrytsc-decomp-vapor-tone.is-flammable {
  background: #ffedd5;
  color: #c2410c;
}

.chemrytsc-decomp-vapor-tone.is-watch {
  background: #dbeafe;
  color: #1d4ed8;
}

.chemrytsc-decomp-vapor-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.chemrytsc-decomp-vapor-meta > div {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: #ffffff;
  padding: 7px 8px;
  display: grid;
  gap: 4px;
}

.chemrytsc-decomp-vapor-meta span {
  color: var(--chemrytsc-soft-muted);
}

.chemrytsc-decomp-vapor-meta strong {
  color: var(--chemrytsc-ink);
  line-height: 1.35;
}

.chemrytsc-decomp-mitigation-results {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.chemrytsc-decomp-mitigation-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.chemrytsc-decomp-mitigation-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.chemrytsc-decomp-mitigation-card__head strong,
.chemrytsc-decomp-mitigation-card__head span {
  display: block;
}

.chemrytsc-decomp-mitigation-card__head span {
  color: var(--chemrytsc-soft-muted);
}

.chemrytsc-decomp-mitigation-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eaf4ff;
  color: #134d80;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.chemrytsc-decomp-mitigation-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.chemrytsc-decomp-mitigation-meta > div {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: #ffffff;
  padding: 7px 8px;
  display: grid;
  gap: 4px;
}

.chemrytsc-decomp-mitigation-meta span {
  color: var(--chemrytsc-soft-muted);
}

.chemrytsc-decomp-mitigation-meta strong {
  color: var(--chemrytsc-ink);
  line-height: 1.35;
}

.chemrytsc-decomp-mitigation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 991px) {
  .chemrytsc-loader-layout {
    grid-template-columns: 1fr;
  }

  .chemrytsc-molecule-info,
  .chemrytsc-editor-frame,
  .chemrytsc-jsme {
    min-height: 340px;
    height: 340px;
  }
}

@media (max-width: 767px) {
  .chemrytsc-shell {
    width: var(--chemrytsc-align-width) !important;
    margin: 1rem auto 2rem var(--chemrytsc-align-left) !important;
    padding-inline: 0 !important;
  }

  .chemrytsc-panel-head,
  .chemrytsc-loader-toolbar,
  .chemrytsc-info-head {
    flex-direction: column;
    align-items: stretch;
  }

  .chemrytsc-loader-actions .chemrytsc-molecule-mode {
    margin-left: 0;
  }

  .chemrytsc-decomp-plot-head {
    flex-direction: column;
  }

  .chemrytsc-decomp-plot-layout {
    grid-template-columns: 1fr;
  }

  .chemrytsc-decomp-matrix-lab__head,
  .chemrytsc-decomp-shielding,
  .chemrytsc-decomp-kinetics__head,
  .chemrytsc-decomp-copyrolysis__head,
  .chemrytsc-decomp-vapor-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .chemrytsc-decomp-matrix-lab__delta {
    min-width: 0;
  }

  .chemrytsc-decomp-triage-grid,
  .chemrytsc-decomp-kinetics__controls,
  .chemrytsc-decomp-kinetics__grid,
  .chemrytsc-decomp-copyrolysis__grid,
  .chemrytsc-decomp-vapor-grid,
  .chemrytsc-decomp-vapor-meta,
  .chemrytsc-decomp-mitigation-meta {
    grid-template-columns: 1fr 1fr;
  }

  .chemrytsc-loader-fields,
  .chemrytsc-mixture-row {
    grid-template-columns: 1fr;
  }

  .chemrytsc-decomp-plot-canvas {
    height: 280px;
  }

  .chemrytsc-decomp-triage-grid {
    grid-template-columns: 1fr;
  }

  .chemrytsc-decomp-kinetics__controls,
  .chemrytsc-decomp-kinetics__grid,
  .chemrytsc-decomp-copyrolysis__grid,
  .chemrytsc-decomp-vapor-grid,
  .chemrytsc-decomp-vapor-meta,
  .chemrytsc-decomp-mitigation-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .chemrytsc-shell {
    width: var(--chemrytsc-align-width) !important;
    margin: 1rem auto 2rem var(--chemrytsc-align-left) !important;
    padding-inline: 0 !important;
  }
}

/* ChemrytWT compact guideline layer copied for ChemrytSC so the final control
   density matches the scientist-first WT module instead of only the base shell. */
.chemrytsc-page label,
.chemrytsc-page output,
.chemrytsc-page dt,
.chemrytsc-page dd,
.chemrytsc-page td,
.chemrytsc-page th,
.chemrytsc-page span {
  font-size: 11px !important;
}

.chemrytsc-page button,
.chemrytsc-page .chemrytsc-actions a {
  min-height: 21px !important;
  height: 21px !important;
  width: fit-content !important;
  border-radius: 4px !important;
  font-size: 9px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  padding: 0 9px !important;
}

.chemrytsc-page input,
.chemrytsc-page textarea,
.chemrytsc-page select {
  font-size: 11px !important;
}

.chemrytsc-page input,
.chemrytsc-page select {
  min-height: 26px !important;
  height: 26px !important;
  padding: 0 7px !important;
}

.chemrytsc-page input[type="file"] {
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
}

.chemrytsc-page textarea {
  min-height: 104px !important;
  line-height: 1.35 !important;
  padding: 7px !important;
}

.chemrytsc-page .chemrytsc-editor-panel,
.chemrytsc-page .chemrytsc-panel,
.chemrytsc-page .chemrytsc-molecule-info {
  padding: 8px !important;
}

.chemrytsc-page .chemrytsc-panel-head {
  margin-bottom: 6px !important;
}

.chemrytsc-page .chemrytsc-loader-toolbar {
  margin: -2px 0 6px !important;
}

.chemrytsc-page .chemrytsc-topbar {
  padding: 9px 13px !important;
}

.chemrytsc-page .chemrytsc-kicker {
  font-size: 9px !important;
  line-height: 1.1 !important;
}

.chemrytsc-page h1 {
  font-size: 17px !important;
}

.chemrytsc-page h2 {
  font-size: 12px !important;
}

.chemrytsc-page .chemrytsc-topbar p {
  max-width: 680px;
  font-size: 12px !important;
  line-height: 1.15 !important;
}

.chemrytsc-page .chemrytsc-loader-fields input,
.chemrytsc-page .chemrytsc-loader-fields .chemrytsc-readonly-output {
  min-height: 26px !important;
  height: 26px !important;
}

.chemrytsc-page .chemrytsc-molecule-mode label {
  min-height: 21px !important;
  height: 21px !important;
  width: auto !important;
  min-width: fit-content !important;
  border-radius: 4px !important;
  font-size: 9px !important;
  font-weight: 500 !important;
  padding: 0 8px !important;
}

.chemrytsc-page .chemrytsc-molecule-mode input {
  width: 12px !important;
  height: 12px !important;
  min-height: 12px !important;
  padding: 0 !important;
}

.chemrytsc-page .chemrytsc-molecule-mode label:has(input:checked) {
  border-color: #9bc5e6;
  background: var(--chemrytsc-blue-soft);
  color: #145074;
}

.chemrytsc-page .chemrytsc-view-toggle button {
  min-height: 21px !important;
  height: 21px !important;
  max-height: 21px !important;
  min-width: 44px !important;
  font-size: 9px !important;
  font-weight: 500 !important;
  line-height: 9px !important;
  padding: 0 8px !important;
  border-radius: 4px !important;
}

.chemrytsc-page .chemrytsc-view-toggle button + button {
  margin-left: 0 !important;
}

.chemrytsc-page .chemrytsc-mixture-head button {
  min-height: 23px !important;
  height: 23px !important;
  font-size: 10px !important;
}

.chemrytsc-page .chemrytsc-blueprint-panel .chemrytsc-mixture-row input {
  min-height: 23px !important;
  height: 23px !important;
  padding: 0 6px !important;
  font-size: 10px !important;
}

.chemrytsc-page .chemrytsc-prediction-actions > button,
.chemrytsc-page .chemrytsc-model-rationale button {
  min-height: 21px !important;
  height: 21px !important;
}

.chemrytsc-page .chemrytsc-structure-map-legend-item {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  padding: 8px !important;
  line-height: 1.2 !important;
}

.chemrytsc-page button[data-chemrytsc-analyze] {
  min-height: 21px !important;
  height: 21px !important;
  max-height: 21px !important;
  font-size: 9px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  padding: 0 9px !important;
  border-radius: 4px !important;
}

.chemrytsc-page .chemrytsc-loader-actions > button,
.chemrytsc-page .chemrytsc-loader-actions > .chemrytsc-view-toggle button {
  min-height: 21px !important;
  height: 21px !important;
  max-height: 21px !important;
  min-width: unset !important;
  font-size: 9px !important;
  font-weight: 500 !important;
  line-height: 9px !important;
  vertical-align: top !important;
  align-self: center !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  box-sizing: border-box !important;
}

.chemrytsc-page .chemrytsc-loader-actions > button.primary,
.chemrytsc-page .chemrytsc-loader-actions > .chemrytsc-view-toggle button.is-active {
  min-height: 21px !important;
  height: 21px !important;
  max-height: 21px !important;
  line-height: 9px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  box-shadow: none !important;
}

.chemrytsc-page .chemrytsc-loader-actions {
  align-items: center !important;
  min-height: 21px !important;
}

.chemrytsc-page .chemrytsc-loader-actions > .chemrytsc-view-toggle,
.chemrytsc-page .chemrytsc-loader-actions > .chemrytsc-molecule-mode {
  align-self: center !important;
  min-height: 21px !important;
  height: 21px !important;
  box-sizing: border-box !important;
}

@media (max-width: 900px) {
  .chemrytsc-prerun-panel__grid {
    grid-template-columns: 1fr;
  }

  .chemrytsc-prerun-panel__head {
    align-items: flex-start;
    flex-direction: column;
  }
}
