.chemryt-home-container {
  padding-bottom: 10px;
}

.chemryt-home-container .chemryt-home-section {
  background: #fff;
  border: 1px solid #d8e2ee;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(18, 44, 79, 0.08);
  padding: 28px 30px;
}

.chemryt-home-section-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.chemryt-home-title {
  color: #12315c;
  font-size: 26px;
  font-weight: 700;
  margin: 0;
}

.chemryt-home-subtitle {
  color: #61738d;
  font-size: 14px;
  line-height: 1.6;
  margin: 8px 0 0;
  max-width: 720px;
}

.chemryt-home-link {
  color: #0d6da8;
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
  text-decoration: none;
}

.chemryt-home-link:hover,
.chemryt-home-link:focus {
  color: #0b5a8b;
  text-decoration: underline;
}

.chemryt-home-container .mol-divider {
  border-top-color: #e4ebf3;
  margin: 18px 0 24px;
}

.chemryt-motd-grid {
  align-items: stretch;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
}

.chemryt-motd-left,
.chemryt-motd-right {
  min-width: 0;
}

.chemryt-motd-viewer-shell,
.chemryt-motd-info-card,
.chemryt-motd-empty-state {
  background: linear-gradient(180deg, #fdfefe 0%, #f7fafc 100%);
  border: 1px solid #dbe5ef;
  border-radius: 16px;
  min-height: 100%;
}

.chemryt-motd-viewer-shell {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.chemryt-motd-viewer {
  background: #fff;
  border: 1px solid #d5dfeb;
  border-radius: 14px;
  flex: 1 1 auto;
  min-height: 340px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.chemryt-motd-viewer.is-editing {
  min-height: 340px;
}

.chemryt-motd-viewer-meta {
  align-items: center;
  color: #64748b;
  display: flex;
  flex: 0 0 auto;
  font-size: 13px;
  gap: 16px;
  justify-content: space-between;
  line-height: 1.5;
  margin-top: 14px;
}

.chemryt-motd-debug {
  background: #0f172a;
  border-radius: 10px;
  color: #cbd5e1;
  display: none; /* hidden in production; JS reveals on localhost only */
  flex: 0 0 auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 12px;
  max-height: 140px;
  overflow: auto;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.chemryt-motd-viewer-status {
  color: #0d6da8;
  font-weight: 600;
}

.chemryt-motd-viewer-hint {
  color: #7b8798;
}

.chemryt-motd-info-card {
  padding: 22px 22px 20px;
}

.chemryt-motd-kicker {
  color: #0d6da8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.chemryt-motd-name {
  color: #12233b;
  font-size: 20px;
  line-height: 1.35;
  margin: 0 0 16px;
  word-break: break-word;
}

.chemryt-motd-info-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.chemryt-motd-info-row {
  align-items: center;
  background: #edf5fb;
  border: 1px solid #b8d8ee;
  border-radius: 8px;
  display: inline-flex;
  gap: 6px;
  padding: 10px 14px;
}

.chemryt-motd-info-row:last-child {
  padding-bottom: 10px;
}

.chemryt-motd-info-row dt {
  color: #3a4d67;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
  text-transform: none;
}

.chemryt-motd-info-row dd {
  color: #0d6da8;
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
  word-break: break-word;
}

.chemryt-motd-highlight {
  background: #eef8e8;
  border: 1px solid #b8dfaa;
  border-radius: 8px;
  color: #3b7b34;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 14px;
  padding: 12px 16px;
}

.chemryt-motd-actions {
  border-top: 1px solid #e4ebf2;
  margin-top: 18px;
  padding-top: 18px;
}

.chemryt-motd-button {
  background: linear-gradient(180deg, #0e7bb6 0%, #0b689a 100%);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(13, 109, 168, 0.24);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 190px;
  padding: 12px 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.chemryt-motd-button:hover,
.chemryt-motd-button:focus {
  background: linear-gradient(180deg, #0f87c6 0%, #0d74a9 100%);
  box-shadow: 0 12px 22px rgba(13, 109, 168, 0.28);
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

.chemryt-motd-button[disabled] {
  background: #b8c8d8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.chemryt-motd-action-note,
.chemryt-motd-fallback-copy {
  color: #6b7c93;
  font-size: 13px;
  line-height: 1.6;
  margin: 12px 0 0;
}

.chemryt-motd-empty-state,
.chemryt-motd-unavailable {
  align-items: center;
  color: #52657e;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  justify-content: center;
  line-height: 1.7;
  min-height: 260px;
  padding: 28px;
  text-align: center;
}

.chemryt-motd-empty-state strong,
.chemryt-motd-unavailable {
  color: #16345c;
  font-weight: 700;
}

.chemryt-home-copy p:last-child {
  margin-bottom: 0;
}

.chemryt-home-pagination {
  margin-top: 18px;
}

.chemryt-home-container .table-bordered > thead > tr > td,
.chemryt-home-container .table-bordered > tbody > tr > td {
  border-color: #dde6ef;
}

.chemryt-home-container .pagination > li > a,
.chemryt-home-container .pagination > li > span {
  border-color: #d7e3ef;
  color: #12315c;
}

.chemryt-home-container .pagination > .active > a,
.chemryt-home-container .pagination > .active > span,
.chemryt-home-container .pagination > .active > a:hover,
.chemryt-home-container .pagination > .active > span:hover,
.chemryt-home-container .pagination > .active > a:focus,
.chemryt-home-container .pagination > .active > span:focus {
  background-color: #0d6da8;
  border-color: #0d6da8;
  color: #fff;
}

@media (max-width: 991px) {
  .chemryt-home-container .chemryt-home-section {
    padding: 24px 22px;
  }

  .chemryt-motd-grid {
    grid-template-columns: 1fr;
  }

  .chemryt-home-section-header {
    flex-direction: column;
  }
}

/* ── JSME SVG render fix ─────────────────────────────────────────────── */
/*
 * JSME's GWT bootstrap injects three global <style> rules into the host page:
 *
 *   svg  { height: 150px }        → clips the molecule SVG (should be 100%)
 *   text { font-size: 14px }      → overrides JSME's font-size="390px" SVG attribute;
 *                                    after scale(0.0333): 0.47 px — invisible
 *   line { stroke-width: 1 }      → overrides JSME's stroke-width="30" SVG attribute;
 *                                    after scale(0.0333): 0.033 px — bonds invisible
 *
 * These scoped !important overrides restore the correct values without touching
 * anything else on the page.
 */
#chemrytMotdJsme svg {
  height: 100% !important;
}

#chemrytMotdJsme svg text,
#chemrytMotdJsme svg tspan {
  font-size: 390px !important;
}

#chemrytMotdJsme svg line {
  stroke-width: 30 !important;
}

/* ── SMILES code display ──────────────────────────────────────────────── */

.chemryt-motd-smiles-row {
  background: #f4f8fc;
  border: 1px solid #d5dfeb;
  border-radius: 8px;
  margin-top: 14px;
  padding: 10px 14px;
}

.chemryt-motd-smiles-label {
  color: #3a4d67;
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.chemryt-motd-smiles-code {
  color: #0d6da8;
  display: block;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.55;
  max-height: 54px;
  overflow: hidden;
  word-break: break-all;
}

/* ── Viewer status states ─────────────────────────────────────────────── */

.chemryt-motd-viewer-status--error {
  color: #c0392b;
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 767px) {
  .chemryt-home-title {
    font-size: 22px;
  }

  .chemryt-motd-name {
    font-size: 18px;
  }

  .chemryt-motd-viewer,
  .chemryt-motd-viewer.is-editing {
    min-height: 260px;
  }

  .chemryt-motd-viewer-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .chemryt-motd-button {
    width: 100%;
  }
}
