.chemrytiq-aem-page,
.chemrytiq-aem-page * {
  box-sizing: border-box;
}

.chemrytiq-page .chemrytiq-aem,
.chemrytiq-page .chemrytiq-aem *,
.chemrytiq-aem-page {
  font-family: inherit;
}

.chemrytiq-aem-page {
  color: #172235;
}

.chemrytiq-aem-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.4rem;
  margin: 1.1rem 0;
  border: 1px solid #d9e5f2;
  border-radius: 0.75rem;
  background: #f8fbff;
}

.chemrytiq-aem-kicker,
.chemrytiq-aem-small-label {
  color: #42607d;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.chemrytiq-aem-hero h1,
.chemrytiq-aem-panel h2 {
  margin: 0;
  color: #12304d;
  line-height: 1.25;
}

.chemrytiq-aem-hero h1 {
  font-size: 2rem;
}

.chemrytiq-aem-hero p,
.chemrytiq-aem-panel-head p,
.chemrytiq-aem-muted {
  color: #5b6f84;
  line-height: 1.55;
}

.chemrytiq-aem-hero-actions,
.chemrytiq-aem-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.chemrytiq-aem-link,
.chemrytiq-aem-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.68rem 0.95rem;
  border: 1px solid #1f6fb8;
  border-radius: 0.5rem;
  background: #1669b2;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}

.chemrytiq-aem-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chemrytiq-aem-button--secondary,
.chemrytiq-aem-link {
  background: #fff;
  color: #175c9f;
}

.chemrytiq-aem-button--ghost,
.chemrytiq-aem-button--quiet {
  border-color: #d4e1ef;
  background: #eef5fc;
  color: #284761;
}

.chemrytiq-aem-grid,
.chemrytiq-aem-view-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.chemrytiq-aem-view-grid--analysis {
  grid-template-columns: minmax(24rem, 1.08fr) minmax(20rem, 0.92fr);
  align-items: stretch;
}

.chemrytiq-aem-panel {
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid #d9e5f2;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 43, 71, 0.05);
}

.chemrytiq-aem-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.9rem;
}

.chemrytiq-aem-panel h2 {
  font-size: 1.12rem;
}

.chemrytiq-aem-viewer {
  position: relative;
  height: clamp(20rem, 34vh, 24rem);
  min-height: 20rem;
  border: 1px solid #dbe7f3;
  border-radius: 0.65rem;
  background: #f7fbff;
  overflow: hidden;
}

.chemrytiq-aem-viewer > span {
  position: absolute;
  inset: auto 1rem 1rem 1rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d7e3ee;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.94);
  color: #526b83;
  font-weight: 700;
}

.chemrytiq-aem-label {
  display: block;
  margin: 0.9rem 0 0.45rem;
  color: #263d55;
  font-size: 0.88rem;
  font-weight: 800;
}

.chemrytiq-aem-textarea {
  width: 100%;
  resize: vertical;
  padding: 0.85rem;
  border: 1px solid #cfddea;
  border-radius: 0.55rem;
  color: #18283a;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.86rem;
  line-height: 1.45;
}

.chemrytiq-aem-status,
.chemrytiq-aem-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.38rem 0.62rem;
  border: 1px solid #d7e3ee;
  border-radius: 999px;
  background: #f6fbff;
  color: #375972;
  font-size: 0.78rem;
  font-weight: 800;
}

.chemrytiq-aem-chip--ok {
  border-color: #bfe7cf;
  background: #f0fdf5;
  color: #166534;
}

.chemrytiq-aem-molecule-card,
.chemrytiq-aem-options,
.chemrytiq-aem-report-body {
  display: grid;
  gap: 0.75rem;
}

.chemrytiq-aem-molecule-card {
  grid-template-columns: minmax(0, 1.25fr) minmax(7rem, 0.58fr) minmax(9rem, 0.72fr) minmax(8rem, 0.68fr) minmax(7rem, 0.52fr);
  padding: 0.85rem;
  border: 1px solid #e0eaf4;
  border-radius: 0.65rem;
  background: #f9fcff;
}

.chemrytiq-aem-molecule-card strong {
  display: block;
  margin-top: 0.2rem;
  overflow-wrap: anywhere;
}

.chemrytiq-aem-performance-alert {
  padding: 0.72rem 0.85rem;
  border: 1px solid #f6d58f;
  border-radius: 0.65rem;
  background: #fff8e6;
  color: #73510b;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.45;
}

.chemrytiq-aem-performance-alert--danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.chemrytiq-aem-options {
  grid-template-columns: minmax(13rem, 1.2fr) minmax(8rem, 0.72fr) minmax(8rem, 0.72fr) minmax(12rem, 1.1fr);
  margin-top: 1rem;
}

.chemrytiq-aem-options label {
  display: grid;
  gap: 0.35rem;
  color: #334e67;
  font-weight: 800;
}

.chemrytiq-aem-options input,
.chemrytiq-aem-options select {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid #cfddea;
  border-radius: 0.5rem;
  background: #fff;
  color: #18283a;
}

.chemrytiq-aem-options select:disabled {
  color: #64748b;
}

.chemrytiq-aem-forcefield-note {
  padding: 0.66rem 0.8rem;
  border: 1px solid #d7e3ee;
  border-radius: 0.6rem;
  background: #f8fbff;
  color: #375972;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.45;
}

.chemrytiq-aem-forcefield-note--warn {
  border-color: #f6d58f;
  background: #fff8e6;
  color: #73510b;
}

.chemrytiq-aem-progress {
  height: 0.6rem;
  margin: 1rem 0 0.7rem;
  border-radius: 999px;
  background: #e8f0f8;
  overflow: hidden;
}

.chemrytiq-aem-progress-bar {
  width: 0%;
  height: 100%;
  background: #1f7ac5;
  transition: width 0.18s ease;
}

.chemrytiq-aem-readout {
  min-height: 3.2rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid #e0eaf4;
  border-radius: 0.6rem;
  background: #fbfdff;
  color: #52677d;
  line-height: 1.5;
}

.chemrytiq-aem-graph {
  min-height: 20rem;
  padding: 0.85rem;
  border: 1px solid #e0eaf4;
  border-radius: 0.6rem;
  background: #fbfdff;
}

.chemrytiq-aem-graph-panel {
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid #d9e5f2;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 43, 71, 0.05);
}

.chemrytiq-aem-graph-empty {
  display: grid;
  min-height: 7.4rem;
  place-items: center;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.chemrytiq-aem-graph-svg {
  display: block;
  width: 100%;
  height: auto;
}

.chemrytiq-aem-graph-svg line {
  stroke: #cbd9e7;
  stroke-width: 1.5;
}

.chemrytiq-aem-graph-svg path {
  fill: none;
  stroke: #1f7ac5;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chemrytiq-aem-graph-point {
  fill: #1f7ac5;
  stroke: #ffffff;
  stroke-width: 1.4;
  cursor: pointer;
  transition: r 0.15s ease, fill 0.15s ease;
}

.chemrytiq-aem-graph-point:hover,
.chemrytiq-aem-graph-point:focus {
  fill: #0f5f9f;
  outline: none;
  r: 6.5;
}

.chemrytiq-aem-graph-svg text {
  fill: #52677d;
  font-size: 10.5px;
  font-weight: 700;
}

.chemrytiq-aem-report {
  margin-bottom: 1.5rem;
}

.chemrytiq-aem-empty {
  display: grid;
  gap: 0.65rem;
  padding: 1.25rem;
  color: #52677d;
}

.chemrytiq-aem-empty strong {
  color: #143250;
  font-size: 1rem;
}

.chemrytiq-aem-empty ul {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}

.chemrytiq-aem-tab {
  display: grid;
  gap: 1rem;
}

.chemrytiq-aem-tab-hero {
  padding: 1.05rem 1.1rem;
  border: 1px solid #d9e5f2;
  border-radius: 0.75rem;
  background: #f8fbff;
  box-shadow: 0 10px 24px rgba(20, 43, 71, 0.05);
}

.chemrytiq-aem-tab-hero h3 {
  margin: 0;
  color: #12304d;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.chemrytiq-aem-titlebar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  flex-wrap: wrap;
  min-width: 0;
}

.chemrytiq-aem-titlebar .chemrytiq-aem-kicker {
  flex: 0 0 auto;
}

.chemrytiq-aem-titlebar h3 {
  flex: 0 1 auto;
  min-width: min(16rem, 100%);
}

.chemrytiq-aem-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 0.75rem 0 0.85rem;
}

.chemrytiq-aem-action-row .chemrytiq-aem-button {
  min-height: 2.25rem;
  padding: 0.58rem 0.82rem;
  font-size: 0.84rem;
}

.chemrytiq-aem-report-body {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chemrytiq-aem-report-item {
  padding: 0.85rem;
  border: 1px solid #e0eaf4;
  border-radius: 0.65rem;
  background: #f9fcff;
}

.chemrytiq-aem-report-item strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #143250;
}

.chemrytiq-aem-strain-table {
  grid-column: 1 / -1;
  overflow-x: auto;
  padding: 0.9rem;
  border: 1px solid #d9e5f2;
  border-radius: 0.65rem;
  background: #fff;
}

.chemrytiq-aem-strain-table h3 {
  margin: 0 0 0.7rem;
  color: #143250;
  font-size: 1rem;
  font-weight: 800;
}

.chemrytiq-aem-strain-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 42rem;
  color: #334e67;
  font-size: 0.86rem;
}

.chemrytiq-aem-strain-table th,
.chemrytiq-aem-strain-table td {
  padding: 0.62rem 0.7rem;
  border-bottom: 1px solid #e2ebf4;
  text-align: left;
}

.chemrytiq-aem-strain-table thead th {
  color: #143250;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.chemrytiq-aem-strain-table tbody th {
  color: #143250;
}

.chemrytiq-aem-enum {
  margin: 1.1rem 0;
  padding: 1rem;
  border: 1px solid #d9e5f2;
  border-radius: 0.65rem;
  background: #fbfdff;
  color: #143250;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
}

.chemrytiq-aem-enum *,
.chemrytiq-aem-enum *::before,
.chemrytiq-aem-enum *::after {
  font-family: inherit;
  letter-spacing: 0;
}

.chemrytiq-aem-enum .chemrytiq-aem-panel-head {
  align-items: center;
  gap: 0.8rem;
}

.chemrytiq-aem-enum .chemrytiq-aem-kicker {
  font-size: 0.72rem;
  font-weight: 900;
}

.chemrytiq-aem-enum .chemrytiq-aem-panel-head h2 {
  margin: 0.18rem 0 0;
  color: #143250;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
}

.chemrytiq-aem-enum .chemrytiq-aem-label {
  color: #143250;
  font-size: 0.78rem;
  font-weight: 900;
}

.chemrytiq-aem-enum .chemrytiq-aem-button {
  font-size: 0.82rem;
  font-weight: 800;
}

.chemrytiq-aem-enum-layout {
  display: grid;
  grid-template-columns: minmax(17.5rem, 22.5rem) 1fr;
  gap: 1rem;
}

.chemrytiq-aem-enum-side,
.chemrytiq-aem-enum-main {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
}

.chemrytiq-aem-enum-table th button,
.chemrytiq-aem-enum-card > button,
.chemrytiq-aem-enum-table td button {
  border: 1px solid #cfe0ef;
  border-radius: 0.45rem;
  background: #fff;
  color: #21425f;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.chemrytiq-aem-enum-inline {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  color: #36516b;
  font-size: 0.82rem;
  font-weight: 800;
}

.chemrytiq-aem-enum-button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  align-items: stretch;
}

.chemrytiq-aem-enum-button-row .chemrytiq-aem-button {
  width: 100%;
  min-width: 0;
  white-space: normal;
}

.chemrytiq-aem-enum-help,
.chemrytiq-aem-enum-source {
  padding: 0.72rem;
  border: 1px solid #d7e4f0;
  border-radius: 0.5rem;
  background: #fff;
  color: #36516b;
}

.chemrytiq-aem-enum-help {
  display: grid;
  gap: 0.35rem;
}

.chemrytiq-aem-enum-help strong {
  color: #143250;
  font-size: 0.9rem;
  font-weight: 900;
}

.chemrytiq-aem-enum-help span {
  color: #36516b;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
}

.chemrytiq-aem-enum-help code,
.chemrytiq-aem-enum-source {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
}

.chemrytiq-aem-enum .chemrytiq-aem-textarea {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.83rem;
  font-weight: 600;
}

.chemrytiq-aem-enum-library {
  display: grid;
  gap: 0.65rem;
  max-height: 16.25rem;
  overflow: auto;
  padding-right: 0.25rem;
}

.chemrytiq-aem-enum-library fieldset {
  margin: 0;
  padding: 0.65rem;
  border: 1px solid #d7e4f0;
  border-radius: 0.5rem;
  background: #fff;
}

.chemrytiq-aem-enum-library legend {
  padding: 0 0.35rem;
  color: #143250;
  font-size: 0.78rem;
  font-weight: 900;
}

.chemrytiq-aem-enum-library label {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.45rem;
  align-items: center;
  margin: 0.35rem 0;
  color: #36516b;
  font-size: 0.82rem;
  font-weight: 700;
}

.chemrytiq-aem-enum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.6rem, 1fr));
  gap: 0.65rem;
  min-height: 10rem;
}

.chemrytiq-aem-enum-empty {
  grid-column: 1 / -1;
  display: grid;
  min-height: 10rem;
  place-items: center;
  border: 1px dashed #b8cad9;
  border-radius: 0.5rem;
  color: #52677d;
  font-weight: 800;
}

.chemrytiq-aem-enum-card {
  position: relative;
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid #d7e4f0;
  border-radius: 0.5rem;
  background: #fff;
  align-content: start;
}

.chemrytiq-aem-enum-card.is-starred {
  border-color: #d29a22;
  box-shadow: 0 0 0 2px rgba(210, 154, 34, 0.14);
}

.chemrytiq-aem-enum-card > button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.9rem;
  height: 1.9rem;
  color: #a06d00;
}

.chemrytiq-aem-enum-svg {
  display: grid;
  min-height: 9.4rem;
  place-items: center;
  overflow: hidden;
}

.chemrytiq-aem-enum-svg svg {
  max-width: 100%;
  height: auto;
}

.chemrytiq-aem-enum-card strong,
.chemrytiq-aem-enum-card small,
.chemrytiq-aem-enum-table td code,
.chemrytiq-aem-enum-table td small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chemrytiq-aem-enum-card strong {
  color: #263b50;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.3;
}

.chemrytiq-aem-enum-card small,
.chemrytiq-aem-enum-table td small {
  color: #64788d;
  font-size: 0.7rem;
  font-weight: 600;
}

.chemrytiq-aem-enum-table {
  overflow: auto;
}

.chemrytiq-aem-enum-table h3 {
  font-size: 0.98rem;
  font-weight: 900;
}

.chemrytiq-aem-enum-table th button {
  padding: 0.32rem 0.5rem;
}

.chemrytiq-aem-enum-table td code,
.chemrytiq-aem-enum-table td small {
  display: block;
  max-width: 22.5rem;
}

.chemrytiq-aem-enum-table td,
.chemrytiq-aem-enum-table th {
  font-size: 0.8rem;
}

.chemrytiq-aem-enum-table td code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
  font-weight: 600;
}

@media (max-width: 900px) {
  .chemrytiq-aem-hero,
  .chemrytiq-aem-panel-head {
    display: grid;
  }

  .chemrytiq-aem-grid,
  .chemrytiq-aem-view-grid,
  .chemrytiq-aem-report-body,
  .chemrytiq-aem-enum-layout {
    grid-template-columns: 1fr;
  }

  .chemrytiq-aem-molecule-card {
    grid-template-columns: 1fr;
  }

  .chemrytiq-aem-enum-button-row {
    grid-template-columns: 1fr;
  }
}
