/* ─── Bootstrap 3 conflict resets ─────────────────────────────────────────
   chemryt.com loads Bootstrap 3 which overrides <code>, <table>, <button>,
   <h2-h6>, and <a> globally. These scoped rules restore the correct styles
   inside the ChemRyt card without touching the rest of the page.
   ─────────────────────────────────────────────────────────────────────── */

/* code tags (SMILES, InChI, InChIKey, formula) — Bootstrap 3 makes them red */
.cxp60-card code {
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  background: #eff6ff;
  color: #1d4ed8 !important;   /* override Bootstrap 3's #c7254e red */
  font-family: monospace;
  font-size: 0.82rem;
  font-weight: 600;
  word-break: break-all;
}

/* table — Bootstrap 3 adds borders/padding we don't want here */
.cxp60-card .cxp60-table {
  border: none;
  margin-bottom: 0;
}
.cxp60-card .cxp60-table > tbody > tr > th,
.cxp60-card .cxp60-table > tbody > tr > td {
  border: none;
  border-top: 1px solid #e5edf5;
  padding: 0.82rem 0.95rem;
  vertical-align: top;
  line-height: 1.4;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  font-family: inherit !important;
}

.cxp60-card .cxp60-table > tbody > tr > td {
  color: #0f2236 !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
}
.cxp60-card .cxp60-table > tbody > tr:first-child > th,
.cxp60-card .cxp60-table > tbody > tr:first-child > td {
  border-top: none;
}

/* tab buttons — Bootstrap 3 resets button text/background */
.cxp60-card .cxp60-tab {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6e4f2 !important;
  background: #f6faff !important;
  color: #4d647c !important;
  border-radius: 999px !important;
  padding: 0.55rem 0.9rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  cursor: pointer;
  box-shadow: none !important;
  outline: none;
  text-shadow: none;
  font-family: inherit !important;
}
.cxp60-card .cxp60-tab:hover {
  background: #edf5fd !important;
  border-color: #bfd7ee !important;
  color: #16324d !important;
}
.cxp60-card .cxp60-tab.active {
  background: #16324d !important;
  border-color: #16324d !important;
  color: #ffffff !important;
}

/* headings — Bootstrap 3 sets h2-h6 to light grey font-weight:300 */
.cxp60-card h2,
.cxp60-card h3,
.cxp60-card h4 {
  font-weight: 700;
  color: inherit;
  margin-top: 0;
}

/* links inside the card — Bootstrap 3 overrides to bright cyan #33C7FF */
.cxp60-card a {
  color: #0b6fbf;
}
.cxp60-card a:hover {
  color: #074f99;
  text-decoration: underline;
}

/* value cells */
.cxp60-card .cxp60-value {
  color: #0f2236 !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  font-family: inherit !important;
}

/* label cells */
.cxp60-card .cxp60-table th {
  color: #1e3550 !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  background: #f8fbff !important;
  border-right: 1px solid #e5edf5;
  width: 38%;
  min-width: 200px;
}

/* ─── End Bootstrap conflict resets ─────────────────────────────────────── */

.cxp60-card {
  border: 1px solid #dbe4ef;
}

.cxp60-title-wrap h2 {
  margin: 0;
  color: #17324d;
  font-size: 1.05rem;
}

.cxp60-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.cxp60-hero-title {
  margin-top: 0.35rem;
  color: #17324d;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
}

.cxp60-subtitle {
  margin-top: 0.25rem;
  color: #5f6f85;
  font-size: 0.88rem;
}

.cxp60-subtitle a {
  color: #0b6fbf;
  font-weight: 600;
}

.cxp60-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cxp60-badge {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #dbe4ef;
  background: #f8fbff;
  color: #24425f;
  font-size: 0.78rem;
  font-weight: 700;
}

.cxp60-badge.pass {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #166534;
}

.cxp60-badge.warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.cxp60-badge.fail {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.cxp60-body {
  padding: 0.95rem;
  background: #ffffff;
}

.cxp60-section + .cxp60-section {
  margin-top: 1rem;
}

.cxp60-tabs {
  margin-top: 1rem;
}

.cxp60-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}

.cxp60-tab {
  border: 1px solid #d6e4f2;
  background: #f6faff;
  color: #4d647c;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.cxp60-tab:hover {
  background: #edf5fd;
  border-color: #bfd7ee;
  color: #16324d;
}

.cxp60-tab.active {
  background: #16324d;
  border-color: #16324d;
  color: #ffffff;
}

.cxp60-tab-panels {
  min-width: 0;
}

.cxp60-tab-panel {
  display: none;
}

.cxp60-tab-panel.active {
  display: block;
}

.cxp60-tab-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.cxp60-tab-panel-head h3 {
  margin: 0;
  color: #18324d;
  font-size: 0.94rem;
}

.cxp60-tab-panel-head span {
  color: #6b7d93;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cxp60-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  width: 100%;
  border: 0;
  background: #f6faff;
  padding: 0.8rem 0.9rem;
  cursor: pointer;
  text-align: left;
  border: 1px solid #dce6f0;
  border-radius: 12px;
}

.cxp60-section-head h3 {
  margin: 0;
  color: #18324d;
  font-size: 0.94rem;
}

.cxp60-section-head span {
  color: #6b7d93;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cxp60-section.collapsed .cxp60-section-body {
  display: none;
}

.cxp60-section-head::after {
  content: "▼";
  color: #6b7d93;
  font-size: 0.8rem;
  font-weight: 700;
  margin-left: auto;
}

.cxp60-section.collapsed .cxp60-section-head::after {
  content: "►";
}

.cxp60-table-wrap {
  overflow-x: auto;
  border: 1px solid #dce6f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(18, 38, 63, 0.05);
}

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

.cxp60-table tr + tr {
  border-top: 1px solid #e5edf5;
}

.cxp60-table tr:nth-child(even) td {
  background: #fcfdff;
}

.cxp60-table th,
.cxp60-table td {
  padding: 0.82rem 0.95rem;
  vertical-align: top;
}

.cxp60-table th {
  width: 38%;
  min-width: 210px;
  background: #f8fbff;
  color: #4e6278;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  border-right: 1px solid #e5edf5;
}

.cxp60-label {
  color: #607288;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}

.cxp60-value {
  color: #0f2236;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

.cxp60-value code {
  display: inline-block;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.8rem;
}

.cxp60-loading,
.cxp60-error {
  padding: 1rem;
  color: #304861;
  font-size: 0.95rem;
}

.cxp60-error {
  color: #b91c1c;
}

.cxp60-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0 0.9rem;
}

.cxp60-overview-item {
  border: 1px solid #dce6f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.72rem 0.82rem;
}

.cxp60-overview-label {
  color: #2d4a62;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cxp60-overview-value {
  margin-top: 0.3rem;
  color: #0f2236;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  word-break: break-word;
}

.cxp60-overview-value.is-pass {
  color: #166534;
}

.cxp60-overview-value.is-warn {
  color: #9a3412;
}

.cxp60-priority-grid,
.cxp60-dual-grid,
.cxp60-support-grid {
  display: grid;
  align-items: stretch;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.cxp60-priority-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cxp60-dual-grid,
.cxp60-support-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cxp60-stack-column {
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.cxp60-dashboard-card {
  border: 1px solid #dce6f0;
  border-radius: 16px;
  background: #ffffff;
  padding: 0.9rem;
  box-shadow: 0 8px 20px rgba(15, 35, 58, 0.055);
}

.cxp60-priority-grid > .cxp60-dashboard-card {
  height: 100%;
}

.cxp60-dashboard-card .cxp60-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
  margin-bottom: 0.72rem;
}

.cxp60-card-kicker {
  color: #0b6fbf;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cxp60-dashboard-card h3 {
  margin: 0;
  color: #16324d;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}

.cxp60-dashboard-card p {
  margin: 0.22rem 0 0;
  color: #52667e;
  font-size: 0.9rem;
  line-height: 1.45;
}

.cxp60-inline-note {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
  border: 1px solid #d8e5f1;
  background: #f5f9fd;
  color: #44627d;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.cxp60-score-card {
  background:
    radial-gradient(circle at top right, rgba(11, 111, 191, 0.12), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f3f8fd 100%);
}

.cxp60-score-panel {
  display: grid;
  gap: 0.7rem;
}

.cxp60-score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
}

.cxp60-score-value {
  color: #16324d;
  font-size: 2.35rem;
  line-height: 1;
  font-weight: 900;
}

.cxp60-score-label {
  margin-top: 0.2rem;
  color: #0b6fbf;
  font-size: 0.9rem;
  font-weight: 800;
}

.cxp60-score-helper,
.cxp60-footnote,
.cxp60-muted-note {
  color: #52667e;
  font-size: 0.9rem;
  line-height: 1.42;
}

.cxp60-footnote,
.cxp60-muted-note {
  margin-top: 0.55rem;
}

.cxp60-score-meter {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #dce8f4;
  overflow: hidden;
}

.cxp60-score-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0b6fbf 0%, #3ea0de 100%);
}

.cxp60-score-details {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #dfe9f3;
  display: grid;
  gap: 0.75rem;
}

.cxp60-inline-section {
  display: grid;
  gap: 0.45rem;
}

.cxp60-inline-title {
  color: #16324d;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.cxp60-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.cxp60-metric-card {
  border: 1px solid #e2ebf3;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
  padding: 0.74rem 0.8rem;
}

.cxp60-metric-label {
  color: #29455e;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.35;
}

.cxp60-metric-value {
  margin-top: 0.28rem;
  color: #0f2236;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.18;
}

.cxp60-metric-helper {
  margin-top: 0.32rem;
  color: #52667e;
  font-size: 0.9rem;
  line-height: 1.38;
}

.cxp60-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.cxp60-rule-list,
.cxp60-bullet-list,
.cxp60-risk-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  list-style: none;
}

.cxp60-rule-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  border: 1px solid #dce6f0;
  border-radius: 12px;
  padding: 0.66rem 0.72rem;
  background: #f9fbfe;
}

.cxp60-rule-item.is-fail {
  background: #fff8f1;
  border-color: #f7c99b;
}

.cxp60-rule-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-weight: 900;
  flex: 0 0 auto;
}

.cxp60-rule-item.is-fail .cxp60-rule-icon {
  background: #ffedd5;
  color: #9a3412;
}

.cxp60-rule-title {
  color: #16324d;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.3;
}

.cxp60-rule-threshold {
  margin-top: 0.1rem;
  color: #516a82;
  font-size: 0.86rem;
  font-weight: 700;
}

.cxp60-rule-text,
.cxp60-admet-text {
  margin-top: 0.2rem;
  color: #52667e;
  font-size: 0.9rem;
  line-height: 1.42;
}

.cxp60-bullet-list li,
.cxp60-risk-list li {
  position: relative;
  padding-left: 1rem;
  color: #24425f;
  font-size: 0.92rem;
  line-height: 1.48;
}

.cxp60-bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: #0b6fbf;
}

.cxp60-risk-list li {
  display: flex;
  gap: 0.55rem;
  padding-left: 0;
}

.cxp60-risk-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.78rem;
  font-weight: 900;
  flex: 0 0 auto;
  margin-top: 0.1rem;
}

.cxp60-risk-neutral {
  border: 1px dashed #c8d8e7;
  border-radius: 12px;
  background: #f8fbff;
  padding: 0.78rem 0.88rem;
  color: #46617a;
  font-size: 0.9rem;
  line-height: 1.45;
}

.cxp60-admet-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.cxp60-admet-row {
  display: block;
  border: 1px solid #e2ebf3;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fbff 100%);
  padding: 0.78rem 0.82rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.cxp60-admet-main {
  min-width: 0;
}

.cxp60-admet-topline {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  align-items: center;
}

.cxp60-admet-label {
  color: #16324d;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
}

.cxp60-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.58rem;
  font-size: 0.82rem;
  font-weight: 800;
  border: 1px solid #dbe4ef;
  white-space: nowrap;
  flex: 0 0 auto;
}

.cxp60-status-pill.tone-good {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #166534;
}

.cxp60-status-pill.tone-moderate {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.cxp60-status-pill.tone-caution {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.cxp60-chip-list {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-content: flex-start;
}

.cxp60-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  font-size: 0.86rem;
  font-weight: 700;
}

.cxp60-lower-card {
  display: grid;
  align-content: start;
}

.cxp60-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.cxp60-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px !important;
  border: 1px solid #c9d9e8 !important;
  background: #16324d !important;
  color: #fff !important;
  padding: 0.68rem 0.95rem !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
  min-height: 42px;
  text-align: center;
}

.cxp60-action-btn:hover {
  background: #21405e !important;
}

.cxp60-action-btn-secondary {
  background: #f6faff !important;
  color: #24425f !important;
}

.cxp60-action-btn-secondary:hover {
  background: #edf5fd !important;
}

.cxp60-toast {
  position: sticky;
  bottom: 1rem;
  margin-top: 1rem;
  margin-left: auto;
  width: fit-content;
  max-width: min(100%, 320px);
  border-radius: 12px;
  background: rgba(15, 34, 54, 0.94);
  color: #fff;
  padding: 0.7rem 0.9rem;
  font-size: 0.82rem;
  line-height: 1.4;
  box-shadow: 0 12px 24px rgba(15, 34, 54, 0.2);
}

.cxp60-admet-foot {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid #e3edf6;
  color: #52667e;
  font-size: 0.9rem;
  line-height: 1.4;
}

.cxp60-table-label {
  color: #1e3550;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.35;
}

.cxp60-table-helper {
  margin-top: 0.28rem;
  color: #51667d;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
}

.cxp60-table-helper-value {
  display: none;
}

.cxp60-handling {
  display: grid;
  gap: 0.9rem;
}

.cxp60-disclaimer {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cxp60-handling-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cxp60-handling-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.cxp60-handling-card {
  border: 1px solid #dce6f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.95rem;
  box-shadow: 0 1px 2px rgba(18, 38, 63, 0.05);
}

.cxp60-handling-card h4 {
  margin: 0 0 0.7rem;
  color: #16324d;
  font-size: 0.96rem;
}

.cxp60-guidance-list,
.cxp60-reasoning-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.55rem;
}

.cxp60-guidance-item {
  list-style: none;
  border-left: 4px solid #bfdbfe;
  background: #f8fbff;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
}

.cxp60-guidance-item.severity-medium {
  border-left-color: #f59e0b;
  background: #fffaf0;
}

.cxp60-guidance-item.severity-high {
  border-left-color: #ef4444;
  background: #fff5f5;
}

.cxp60-guidance-title {
  color: #16324d;
  font-size: 0.94rem;
  font-weight: 700;
}

.cxp60-guidance-reason {
  margin-top: 0.32rem;
  color: #52667e;
  font-size: 0.9rem;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .cxp60-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cxp60-priority-grid,
  .cxp60-dual-grid,
  .cxp60-support-grid,
  .cxp60-metric-grid {
    grid-template-columns: 1fr;
  }

  .cxp60-rule-grid {
    grid-template-columns: 1fr;
  }

  .cxp60-admet-list,
  .cxp60-action-row {
    grid-template-columns: 1fr;
  }

  .cxp60-handling-grid {
    grid-template-columns: 1fr;
  }

  .cxp60-tab-list {
    gap: 0.45rem;
  }

  .cxp60-tab {
    width: calc(50% - 0.25rem);
    text-align: center;
  }

  .cxp60-table th,
  .cxp60-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .cxp60-table th {
    border-right: 0;
    border-bottom: 1px solid #e5edf5;
    padding-bottom: 0.45rem;
  }

  .cxp60-table td {
    padding-top: 0.55rem;
  }

  .cxp60-section-head,
  .cxp60-badges {
    align-items: flex-start;
  }

  .cxp60-hero,
  .cxp60-admet-row,
  .cxp60-score-row,
  .cxp60-admet-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .cxp60-action-btn {
    width: 100%;
  }
}
