.chemryttga-control-card,
.chemryttga-hero-card {
  background: var(--chemryttga-surface);
  border: 1px solid var(--chemryttga-border);
  border-radius: var(--chemryttga-radius-lg);
  box-shadow: var(--chemryttga-shadow);
}

.chemryttga-hero-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-height: 112px;
  padding: 0.95rem 2.2rem 1.05rem;
  margin-bottom: 1rem;
  border-radius: 34px;
  background: linear-gradient(135deg, #1d4f69 0%, #2a7891 100%);
  border-color: rgba(23, 68, 95, 0.92);
  box-shadow: 0 14px 30px rgba(18, 48, 77, 0.18);
}

.chemryttga-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.chemryttga-hero-header {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.chemryttga-hero-copy,
.chemryttga-hero-actions {
  position: relative;
  z-index: 1;
}

.chemryttga-eyebrow,
.chemryttga-card-kicker,
.chemryttga-metric-label,
.chemryttga-mini-metric__label {
  display: inline-flex;
  color: #0f3f69;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.chemryttga-page-title,
.chemryttga-card-title,
.chemryttga-section-title {
  margin: 0;
  color: var(--chemryttga-text);
  font-weight: 500;
}

.chemryttga-page-title {
  margin-top: 0.35rem;
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
  line-height: 1.18;
}

.chemryttga-page-subtitle,
.chemryttga-section-copy,
.chemryttga-helper,
.chemryttga-inline-note,
.chemryttga-empty-state,
.chemryttga-prose,
.chemryttga-side-copy,
.chemryttga-data-value {
  color: var(--chemryttga-text-soft);
}

.chemryttga-hero-card .chemryttga-eyebrow {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
}

.chemryttga-hero-card .chemryttga-page-title {
  color: #ffffff;
  margin-top: 0.25rem;
  font-size: clamp(2rem, 2.7vw, 2.4rem);
  font-weight: 500;
  line-height: 1.12;
}

.chemryttga-hero-card .chemryttga-page-subtitle {
  color: rgba(255, 255, 255, 0.88);
  margin-top: 0.45rem;
  max-width: 980px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.45;
}

.chemryttga-page-subtitle {
  margin: 0.4rem 0 0;
  max-width: 740px;
  font-size: 0.94rem;
  line-height: 1.5;
}

.chemryttga-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.55rem 1.9rem 1rem;
  border-bottom: 1px solid var(--chemryttga-border);
}


.chemryttga-card-title {
  margin-top: 0.35rem;
  font-size: 1.05rem;
  line-height: 1.32;
}

.chemryttga-section-title {
  font-size: 0.98rem;
  line-height: 1.3;
}

.chemryttga-card-body,
.chemryttga-side-stack,
.chemryttga-control-card {
  padding: 1.5rem;
}

.chemryttga-control-card {
  margin: 1.5rem 0;
  text-align: center;
}

.chemryttga-status {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--chemryttga-radius-md);
  font-weight: 700;
  border: 1px solid transparent;
}

.chemryttga-status--info {
  color: #1f5e87;
  background: #eaf3fb;
  border-color: #cfe0f2;
}

.chemryttga-status--success {
  color: var(--chemryttga-success);
  background: #e8f5ed;
  border-color: #c8e6d2;
}

.chemryttga-status--warning {
  color: var(--chemryttga-warning);
  background: #fff4db;
  border-color: #f6ddae;
}

.chemryttga-status--error {
  color: var(--chemryttga-danger);
  background: #fdebec;
  border-color: #f4c7cb;
}

.chemryttga-label {
  display: block;
  margin-bottom: 0.5rem;
  color: #375069;
  font-size: 0.85rem;
  font-weight: 700;
}

.chemryttga-input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--chemryttga-border-strong);
  border-radius: 1rem;
  background: #fff;
  color: var(--chemryttga-text);
  font: inherit;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.chemryttga-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.chemryttga-textarea {
  min-height: 6rem;
  resize: vertical;
}

.chemryttga-textarea--mono {
  font-family: Consolas, Monaco, monospace;
}

.chemryttga-btn {
  appearance: none;
  height: 21px;
  min-height: 21px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 0.89rem;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}

.chemryttga-btn:hover {
  transform: translateY(-1px);
}

.chemryttga-btn:disabled {
  opacity: 0.65;
  cursor: progress;
  transform: none;
}

.chemryttga-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #0d6e8a 0%, #1793aa 100%);
  border-color: #0d6e8a;
  box-shadow: 0 14px 32px rgba(13, 110, 138, 0.22);
}

.chemryttga-btn--primary:hover {
  border-color: #0d6e8a;
  box-shadow: 0 14px 32px rgba(13, 110, 138, 0.22);
}

.chemryttga-btn--secondary {
  background: #f4fafc;
  color: #163347;
  border-color: #d6e4ed;
}

.chemryttga-btn--secondary:hover {
  background: #f4fafc;
  border-color: #d6e4ed;
  box-shadow: none;
}

.chemryttga-btn--ghost {
  background: transparent;
  color: #5c7386;
  border-color: #d6e4ed;
}

.chemryttga-btn--ghost:hover {
  border-color: #d6e4ed;
  box-shadow: none;
}

.chemryttga-run-button {
  min-width: min(100%, 22rem);
  height: 21px;
  min-height: 21px;
  font-size: 0.89rem;
}

.chemryttga-helper {
  margin: 0.8rem 0 0;
  font-size: 0.92rem;
}

.chemryttga-loading {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--chemryttga-primary-soft);
  color: var(--chemryttga-primary);
  font-weight: 700;
}

.chemryttga-loading__spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 2px solid rgba(15, 109, 187, 0.2);
  border-top-color: var(--chemryttga-primary);
  animation: chemryttga-spin 0.8s linear infinite;
}

.chemryttga-editor-frame {
  position: relative;
  padding: 0.85rem;
  min-height: 25rem;
  border: 1px solid var(--chemryttga-border);
  border-radius: 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.chemryttga-jsme-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  cursor: pointer;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: background 0.15s;
}
.chemryttga-jsme-overlay:hover {
  background: rgba(55, 80, 105, 0.06);
}
.chemryttga-jsme-overlay__hint {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #d7e0ea;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  font-size: 0.78rem;
  font-weight: 600;
  color: #375069;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.chemryttga-jsme-overlay:hover .chemryttga-jsme-overlay__hint {
  opacity: 1;
}

.chemryttga-jsme {
  width: 100%;
  height: 380px;
}

.chemryttga-editor-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.chemryttga-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.chemryttga-chip--soft {
  background: var(--chemryttga-accent-soft);
  color: var(--chemryttga-warning);
}

.chemryttga-molecule-summary,
.chemryttga-subcard,
.chemryttga-side-section {
  padding: 1rem;
  border: 1px solid var(--chemryttga-border);
  border-radius: 1.1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--chemryttga-shadow-soft);
}

.chemryttga-mini-metric,
.chemryttga-metric-card,
.chemryttga-data-item {
  padding: 0.9rem 1rem;
  border: 1px solid var(--chemryttga-border);
  border-radius: 1rem;
  background: var(--chemryttga-surface-soft);
}

.chemryttga-mini-metric__value,
.chemryttga-metric-number {
  display: block;
  margin-top: 0.45rem;
  color: var(--chemryttga-text);
  font-size: 1.3rem;
}

.chemryttga-tab {
  min-height: 2.8rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--chemryttga-border);
  border-radius: 999px;
  background: var(--chemryttga-surface-soft);
  color: var(--chemryttga-text-soft);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.chemryttga-tab:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
}

.chemryttga-tab.is-active {
  background: var(--chemryttga-primary-soft);
  border-color: #93c5fd;
  color: var(--chemryttga-primary);
}

.chemryttga-tab-panel {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}

.chemryttga-tab-panel.is-active {
  opacity: 1;
  transform: translateY(0);
}

.chemryttga-chart-intro,
.chemryttga-metrics-block {
  margin-bottom: 1rem;
}

.chemryttga-chart-shell {
  position: relative;
  min-height: 24rem;
}

.chemryttga-chart {
  width: 100% !important;
  height: 24rem !important;
}

.chemryttga-empty-state {
  padding: 1rem;
}

.chemryttga-data-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.chemryttga-data-label {
  color: var(--chemryttga-text);
  font-weight: 700;
}

.chemryttga-side-copy,
.chemryttga-prose {
  line-height: 1.6;
}

.chemryttga-disclaimer-card {
  background: #fffbeb;
  border-color: #f6ddae;
  color: var(--chemryttga-warning);
}

.chemryttga-disclaimer-card p {
  margin: 0;
  padding: 1.1rem 1.25rem;
  font-weight: 600;
}

.chemryttga-inline-validation {
  min-height: 1.4rem;
  padding-top: 0.9rem;
  color: var(--chemryttga-danger);
  font-weight: 700;
}

.chemryttga-stage-table {
  width: 100%;
  border-collapse: collapse;
}

.chemryttga-stage-table th,
.chemryttga-stage-table td {
  padding: 0.8rem 0.6rem;
  border-bottom: 1px solid var(--chemryttga-border);
  text-align: left;
  vertical-align: top;
}

.chemryttga-stage-table th {
  color: var(--chemryttga-text);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@keyframes chemryttga-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 960px) {
  .chemryttga-hero-header,
  .chemryttga-card-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .chemryttga-card-head,
  .chemryttga-card-body,
  .chemryttga-control-card,
  .chemryttga-tab-panel,
  .chemryttga-side-stack {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .chemryttga-jsme,
  .chemryttga-chart {
    height: 20rem !important;
  }

  .chemryttga-stage-table {
    display: block;
    overflow-x: auto;
  }
}

.chemryttga-debug-card {
  margin-bottom: 1rem;
}

.chemryttga-debug-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.chemryttga-debug-item {
  padding: 0.9rem 1rem;
  border: 1px solid var(--chemryttga-border);
  border-radius: 1rem;
  background: var(--chemryttga-surface-soft);
}

.chemryttga-debug-label {
  display: block;
  color: var(--chemryttga-text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chemryttga-debug-value {
  display: block;
  margin-top: 0.45rem;
  color: var(--chemryttga-text);
  font-size: 1rem;
}

.chemryttga-debug-paths {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed var(--chemryttga-border-strong);
  border-radius: 1rem;
  background: #fff;
}

.chemryttga-debug-paths p {
  margin: 0.25rem 0;
  color: var(--chemryttga-text-soft);
  line-height: 1.5;
  word-break: break-all;
}

@media (max-width: 760px) {
  .chemryttga-debug-grid {
    grid-template-columns: 1fr;
  }
}










