.safety-table-2-wrapper {
  width: 100%;
  padding-bottom: 0;
  overflow-x: auto;
}

.safety-table-2 {
  --st2-purple: #39134b;
  --st2-pink: #ff084d;
  --st2-text: rgba(0, 0, 0, 0.7);
  --st2-mobile-text: #3e3c3f;
  --st2-stripe: #f5f3f6;
  --st2-border: #b0c8d5;
  --st2-white: #ffffff;
  width: 100%;
  margin: 0 auto;
  table-layout: fixed;
  border-collapse: collapse;
  color: var(--st2-text);
  background: var(--st2-white);
  font-family: "Roboto", sans-serif;
}

/* Desktop Figma: 965 / 311 / 320 across the 1596px table. */
.safety-table-2 .description-column { width: 60.5%; }
.safety-table-2 .hibsago-column { width: 19.5%; }
.safety-table-2 .placebo-column { width: 20%; }
.safety-table-2 th,
.safety-table-2 td { box-sizing: border-box; }

.safety-table-2 thead th {
  height: 68px;
  padding: 5.5px 11px;
  vertical-align: middle;
}
.safety-table-2 .table-title {
  color: var(--st2-text);
  background: var(--st2-white);
  text-align: left;
  font-size: 16px !important;
  line-height: 28px;
  font-weight: 700;
  border: 0;
}
.safety-table-2 .treatment-heading {
  color: var(--st2-white);
  background: var(--st2-pink);
  text-align: center;
  font-size: 16px !important;
  line-height: 22px;
  font-weight: 700;
  border-right: 1px solid var(--st2-white);
}
.safety-table-2 .treatment-heading:last-child { border-right: 0; }
.safety-table-2 .treatment-main,
.safety-table-2 .desktop-header-detail { display: inline; }
.safety-table-2 .mobile-marker { display: none; }

.safety-table-2 tbody th,
.safety-table-2 tbody td {
  height: 38px;
  padding: 6px 13px;
  vertical-align: middle;
  font-size: 16px;
  line-height: 26px;
  border-right: 1px solid var(--st2-border);
}
.safety-table-2 tbody th { text-align: left; font-weight: 400; }
.safety-table-2 tbody td { text-align: center; white-space: nowrap; }
.safety-table-2 tbody td:last-child { border-right: 0; }
.safety-table-2 tbody tr:nth-child(odd) th,
.safety-table-2 tbody tr:nth-child(odd) td { background: var(--st2-white); }
.safety-table-2 tbody tr:nth-child(even) th,
.safety-table-2 tbody tr:nth-child(even) td { background: var(--st2-stripe); }

/* Desktop-only body text size. */
@media (min-width: 768px) {
  .safety-table-2 tbody th,
  .safety-table-2 tbody td {
    font-size: 14px !important;
  }
}

/* Preserve the two-line Figma header at narrower desktop widths. */
@media (min-width: 768px) and (max-width: 1439px) {
  .safety-table-2 .treatment-heading { font-size: 16px; line-height: 22px; }
  .safety-table-2 .treatment-main { white-space: nowrap; }
}

@media (max-width: 767px) {
  .safety-table-2-wrapper { overflow: visible; }
  .safety-table-2 {
    width: calc(100% + 40px);
    margin-left: -20px;
  }
  /* Mobile Figma: 190 / 90 / 80 across the 360px table. */
  .safety-table-2 .description-column { width: 52.7778%; }
  .safety-table-2 .hibsago-column { width: 25%; }
  .safety-table-2 .placebo-column { width: 22.2222%; }
  .safety-table-2 thead th {
    height: 90px;
    padding: 5px 10px;
  }
  .safety-table-2 .table-title {
    font-size: 12px !important;
    line-height: 16px;
  }
  .safety-table-2 .treatment-heading {
    background: var(--st2-purple);
    font-size: 12px !important;
    line-height: 16px;
  }
  .safety-table-2 .treatment-main {
    display: inline;
    white-space: normal;
  }
  .safety-table-2 .desktop-header-detail,
  .safety-table-2 .desktop-marker { display: none; }
  .safety-table-2 .mobile-marker { display: inline; }
  .safety-table-2 tbody th,
  .safety-table-2 tbody td {
    height: 38px;
    padding: 5px 10px;
    font-size: 12px;
    line-height: 14px;
    border-right: 1px solid var(--st2-white);
    border-bottom: 1px solid var(--st2-white);
  }
  .safety-table-2 tbody th { overflow-wrap: break-word; }
  .safety-table-2 tbody td {
    color: var(--st2-mobile-text);
    padding-inline: 4px;
    white-space: nowrap;
  }
  .safety-table-2 tbody tr:last-child th,
  .safety-table-2 tbody tr:last-child td { border-bottom: 0; }
}

/* Prevent global rich-text span rules from overriding Figma table headers. */
.safety-table-2 .treatment-heading .treatment-main,
.safety-table-2 .treatment-heading .desktop-header-detail {
  color: #ffffff !important;
  font-family: "Roboto", sans-serif !important;
  font-size: inherit !important;
  font-weight: 700 !important;
  line-height: inherit !important;
}


/* Mobile first-row typography, colors and vertical padding. */
@media (max-width: 767px) {
  .safety-table-2 thead > tr:first-child > th {
    font-family: "Roboto", sans-serif !important;
    font-size: 12px !important;
    line-height: 16px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }
  .safety-table-2 thead > tr:first-child > th span {
    font-family: "Roboto", sans-serif !important;
    font-size: 12px !important;
    line-height: 16px !important;
  }
  .safety-table-2 thead > tr:first-child > th.table-title {
    color: rgba(0, 0, 0, 0.7) !important;
    background-color: #ffffff !important;
  }
  .safety-table-2 thead > tr:first-child > th.treatment-heading,
  .safety-table-2 thead > tr:first-child > th.treatment-heading span {
    color: #ffffff !important;
  }
  .safety-table-2 thead > tr:first-child > th.treatment-heading {
    background-color: #39134b !important;
  }
}


/* Mobile header geometry and unbroken parenthetical phrases. */
@media (max-width: 767px) {
  .safety-table-2 .description-column { width: 52.77777778%; }
  .safety-table-2 .hibsago-column { width: 25%; }
  .safety-table-2 .placebo-column { width: 22.22222222%; }
  .safety-table-2 thead > tr:first-child > th {
    height: 82px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
  }
  .safety-table-2 thead > tr:first-child > th .mobile-header-parenthetical {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }
  .safety-table-2 thead > tr:first-child > th .mobile-header-wrap {
    display: inline !important;
  }
}

/* Rounded outer corners, matching the study-design table. */
.safety-table-2 {
  border-collapse: separate;
  border-spacing: 0;
}
.safety-table-2 thead > tr:first-child > .treatment-heading:nth-child(2) {
  border-top-left-radius: 24px;
}
.safety-table-2 thead > tr:first-child > .treatment-heading:last-child {
  border-top-right-radius: 24px;
}
.safety-table-2 tbody > tr:last-child > :first-child {
  border-bottom-left-radius: 24px;
}
.safety-table-2 tbody > tr:last-child > :last-child {
  border-bottom-right-radius: 24px;
}
