.ph-shell {
  --ph-accent: #176f69;
  --ph-line: #dbe6e8;
  max-width: 1180px;
}
.ph-shell .si-hero {
  margin-bottom: 24px;
}
.ph-shell .ph-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ph-cards .si-card {
  min-height: 100px;
  padding: 18px;
}
.ph-cards .si-card h2 {
  font-size: 1.05rem;
}
.ph-shell .si-box {
  margin: 18px 0;
  padding: 22px;
  border: 1px solid var(--ph-line);
}
.ph-search {
  margin-bottom: 18px;
}
.ph-shell input,
.ph-shell select {
  min-height: 44px;
  width: 100%;
  box-sizing: border-box;
}
.ph-shell .field {
  min-width: 0;
}
.ph-choice {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.ph-choice legend {
  margin-bottom: 9px;
  font-size: 0.9rem;
  font-weight: 650;
}
.ph-choice > div,
.ph-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ph-choice button {
  flex: 1;
  min-height: 44px;
}
.ph-shell .btn[aria-pressed='true'] {
  background: var(--ph-accent);
  color: white;
  border-color: var(--ph-accent);
  box-shadow: 0 0 0 2px #176f6925;
}
.ph-shell .btn[aria-pressed='false'] {
  background: white;
  color: #536971;
  border: 1px solid #cadbdd;
}
.ph-shell .btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}
.ph-shell .btn:active {
  transform: translateY(0);
}
.ph-shell .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.ph-shell :is(button, input, select, a, summary):focus-visible {
  outline: 3px solid #318eab;
  outline-offset: 3px;
}
.ph-form .actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ph-form .form-grid {
  gap: 18px;
  align-items: start;
}
.ph-choice {
  grid-column: 1/-1;
}
.ph-checks {
  display: grid;
  gap: 12px;
  grid-column: 1/-1;
  margin: 12px 0;
}
.ph-checks label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
}
.ph-checks input[type='checkbox'] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin-top: 3px;
  accent-color: var(--ph-accent);
}
.ph-result {
  margin-top: 20px;
}
.ph-result > p {
  color: #5b737c;
  font-size: 0.9rem;
}
.ph-notice {
  padding: 16px 18px;
  margin: 16px 0;
  border: 1px solid #d4e4e8;
  border-left: 4px solid #5e8391;
  background: #f2f7f8;
  border-radius: 12px;
  line-height: 1.5;
}
.ph-notice p {
  margin: 6px 0 0;
}
.ph-stop,
.ph-avoid {
  border-color: #e4c7c6;
  border-left-color: #ac4540;
  background: #fff5f4;
}
.ph-important,
.ph-caution {
  border-color: #e4dac4;
  border-left-color: #a47d37;
  background: #fcf9f1;
}
.ph-ok,
.ph-none {
  border-color: #cbe3dd;
  border-left-color: #267c67;
  background: #f0f8f5;
}
.ph-unknown {
  background: #f4f6f7;
  border-left-color: #7e8990;
}
.ph-sources {
  font-size: 0.8rem;
  color: #5d727b;
  margin: 14px 0 4px;
}
.ph-sources summary {
  cursor: pointer;
  font-weight: 600;
}
.ph-sources p {
  margin: 10px 0;
  overflow-wrap: anywhere;
}
.ph-sources a {
  font-size: inherit;
}
.ph-table {
  margin: 16px 0;
  border: 1px solid var(--ph-line);
  border-radius: 12px;
  overflow: hidden;
}
.ph-table table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}
.ph-table th,
.ph-table td {
  padding: 13px 15px;
  vertical-align: top;
  line-height: 1.5;
  border-bottom: 1px solid var(--ph-line);
}
.ph-table thead {
  background: #edf4f4;
}
.ph-table tbody th {
  font-weight: 650;
  min-width: 140px;
}
.ph-table tr:last-child > * {
  border-bottom: 0;
}
.ph-table tr.ph-selected > * {
  background: #e0f0ea;
  box-shadow:
    inset 0 2px #176f69,
    inset 0 -2px #176f69;
}
.ph-measure {
  padding: 12px 0;
  color: #4b6872;
}
.ph-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ph-steps .si-box {
  margin: 0;
}
.ph-steps h2 {
  font-size: 1rem;
}
.ph-plan {
  background: #e7f2ef;
  border: 1px solid #c5e1d8;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  margin-bottom: 20px;
}
.ph-plan h2 {
  margin: 3px 0;
  font-size: 1.2rem;
}
.ph-plan p {
  margin: 6px 0;
}
.ph-plan .btn {
  white-space: nowrap;
}
.ph-drug-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.ph-drug {
  border: 1px solid var(--ph-line);
  border-radius: 10px;
  padding: 12px 14px;
  align-self: start;
}
.ph-drug summary {
  cursor: pointer;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ph-links {
  display: grid;
  gap: 10px;
  padding-top: 14px;
}
.ph-drug-info {
  border-bottom: 1px solid var(--ph-line);
  padding: 14px 0;
}
.ph-drug-info h3 {
  margin: 0 0 6px;
}
.ph-tabs {
  margin-bottom: 18px;
}
.ph-shell h3 {
  font-size: 1rem;
}
.ph-shell .si-box > summary {
  cursor: pointer;
  font-weight: 650;
  min-height: 24px;
}
.ph-shell details[open] > summary {
  margin-bottom: 14px;
}
@media (max-width: 750px) {
  .ph-shell .ph-cards {
    grid-template-columns: 1fr;
  }
  .ph-cards .si-card {
    min-height: 82px;
    padding: 15px;
  }
  .ph-drug-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ph-steps {
    grid-template-columns: 1fr;
  }
  .ph-plan {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
  }
  .ph-shell .si-box {
    padding: 17px;
  }
  .ph-table {
    border: 0;
    overflow: visible;
    background: transparent;
  }
  .ph-table table,
  .ph-table tbody,
  .ph-table tr,
  .ph-table td,
  .ph-table tbody th {
    display: block;
    width: auto;
  }
  .ph-table thead {
    display: none;
  }
  .ph-table tr {
    border: 1px solid var(--ph-line);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background: white;
  }
  .ph-table th,
  .ph-table td {
    padding: 10px 13px;
    border: 0 !important;
    min-width: 0 !important;
  }
  .ph-table td:before {
    content: attr(data-label);
    display: block;
    text-transform: none;
    font-size: 0.73rem;
    font-weight: 650;
    color: #627781;
    margin-bottom: 3px;
  }
  .ph-table tbody th {
    background: #edf4f4;
  }
  .ph-table tr.ph-selected {
    border: 2px solid var(--ph-accent);
  }
  .ph-table tr.ph-selected > * {
    box-shadow: none;
  }
  .ph-form .form-grid {
    grid-template-columns: 1fr;
  }
  .ph-shell .si-hero h1 {
    font-size: 1.65rem;
  }
}
@media (max-width: 380px) {
  .ph-drug-results {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ph-shell * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .ph-shell .btn:hover {
    transform: none;
  }
}
.ph-bi-search {
  margin: 0 0 28px;
}
.ph-bi-search .ph-search {
  margin: 0 0 14px;
}
.ph-bi-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 350px;
  overflow: auto;
  margin-top: 18px;
  padding: 3px;
}
.ph-bi-list a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid #d9e7e5;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  min-height: 58px;
}
.ph-bi-list a:hover {
  background: #edf7f4;
  border-color: #258277;
}
.ph-bi-list span {
  font-size: 0.8rem;
  color: #657a80;
}
.ph-bi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.ph-bi-block {
  min-width: 0;
}
.ph-bi-block p,
.ph-bi-interaction p,
.ph-bi-interaction li {
  font-size: 0.92rem;
  line-height: 1.6;
}
.ph-bi-block .si-table-wrap {
  margin: 10px 0;
}
.ph-bi-block table {
  min-width: 0;
}
.ph-bi-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ph-bi-badge {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  background: #edf1f4;
  color: #687881;
}
.ph-bi-badge.has-info {
  background: #fff2dc;
  color: #805415;
}
.ph-bi-interaction {
  padding: 16px;
  margin: 12px 0;
  border: 1px solid #dce5e8;
  border-left: 4px solid #93a6ad;
  border-radius: 10px;
  background: #f5f7f8;
}
.ph-bi-interaction.is-danger {
  background: #fff1f1;
  border-color: #ecc2c2;
  border-left-color: #ba3535;
  color: #822727;
}
.ph-bi-interaction.is-caution {
  background: #fff8ea;
  border-left-color: #b6822a;
}
.ph-bi-interaction ul {
  padding-left: 20px;
  margin: 8px 0;
}
.ph-bi-interactions .field {
  margin: 12px 0;
}
.ph-interaction-partners {
  font-weight: 600;
}
.ph-external {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin: 15px 0;
}
.ph-missing {
  color: #667984;
}
.ph-bi-list a:focus-visible {
  outline: 3px solid #18756d;
  outline-offset: 1px;
}
@media (max-width: 750px) {
  .ph-bi-grid {
    grid-template-columns: 1fr;
  }
  .ph-bi-list {
    grid-template-columns: 1fr;
    max-height: 300px;
  }
  .ph-bi-block {
    padding: 17px;
  }
  .ph-bi-block table {
    font-size: 0.82rem;
  }
  .ph-bi-block td,
  .ph-bi-block th {
    padding: 10px;
  }
}
.ph-bi-danger-text {
  color: #a42828;
  font-weight: 600;
  border-left: 3px solid #b83333;
  padding-left: 12px;
}
.ph-bi-badge.has-info {
  background: #e3f3ed;
  color: #17654f;
}
.ph-bi-badge.is-caution {
  background: #fff2dc;
  color: #805415;
}
.ph-bi-badge.is-danger {
  background: #fae4e5;
  color: #982f38;
}
.ph-profile-interactions {
  margin: 0;
  padding-left: 20px;
}
.ph-profile-interactions li + li {
  margin-top: 8px;
}
.ph-bi-block .si-table-wrap tbody th {
  width: 24%;
  min-width: 180px;
}
@media (max-width: 750px) {
  .ph-bi-block .si-table-wrap tbody th {
    width: auto;
    min-width: 0;
  }
  .ph-bi-badges {
    gap: 6px;
  }
  .ph-bi-badge {
    font-size: 0.75rem;
  }
}
.ph-bi-profile-grid {
  align-items: stretch;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.ph-bi-card {
  --card-accent: #4f747d;
  --card-tint: #f5f8f8;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce7e8;
  border-top: 5px solid var(--card-accent);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--card-tint), #fff 42%);
  box-shadow: 0 8px 22px rgba(28, 55, 62, 0.055);
}
.ph-bi-card[data-tone='ok'] {
  --card-accent: #278060;
  --card-tint: #edf8f3;
}
.ph-bi-card[data-tone='caution'] {
  --card-accent: #b37b20;
  --card-tint: #fff8e9;
}
.ph-bi-card[data-tone='danger'] {
  --card-accent: #b63e46;
  --card-tint: #fff1f2;
}
.ph-bi-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px 10px;
}
.ph-bi-card h2 {
  font-size: 1.04rem;
  line-height: 1.3;
  margin: 0;
}
.ph-bi-card-body {
  flex: 1;
  min-width: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  padding: 3px 18px 18px;
}
.ph-bi-card-body > p {
  font-size: 0.93rem;
  line-height: 1.58;
  margin: 6px 0;
}
.ph-bi-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-accent) 12%, white);
  color: var(--card-accent);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
}
.ph-bi-card .ph-table {
  width: 100%;
  max-width: 100%;
  margin: 7px 0 0;
  background: #fff;
}
.ph-bi-card .ph-table table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  table-layout: fixed;
}
.ph-bi-card .ph-table th,
.ph-bi-card .ph-table td {
  min-width: 0;
  padding: 10px 12px;
  font-size: 0.93rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}
.ph-bi-card .ph-table thead {
  background: color-mix(in srgb, var(--card-accent) 9%, white);
}
.ph-bi-card .ph-table tbody th {
  min-width: 0;
  width: 34%;
}
.ph-bi-card-footer {
  border-top: 1px solid #e2eaeb;
  padding: 13px 18px 16px;
}
.ph-bi-card-footer a,
.ph-bi-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin: 3px 8px 3px 0;
}
.ph-bi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ph-bi-card .ph-profile-interactions {
  margin: 5px 0 0;
}
.ph-bi-card .ph-profile-interactions li {
  font-size: 0.9rem;
  line-height: 1.5;
}
.ph-bi-card .ph-profile-interactions li + li {
  margin-top: 7px;
}
@media (max-width: 1024px) {
  .ph-bi-profile-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .ph-bi-card > header {
    padding: 15px 15px 9px;
  }
  .ph-bi-card-body {
    padding: 3px 15px 15px;
  }
  .ph-bi-card-footer {
    padding: 12px 15px 14px;
  }
  .ph-bi-card .ph-table {
    border: 0;
    overflow: visible;
    background: transparent;
  }
  .ph-bi-card .ph-table table,
  .ph-bi-card .ph-table tbody,
  .ph-bi-card .ph-table tr,
  .ph-bi-card .ph-table th,
  .ph-bi-card .ph-table td {
    display: block;
    width: 100%;
  }
  .ph-bi-card .ph-table thead {
    display: none;
  }
  .ph-bi-card .ph-table tr {
    overflow: hidden;
    margin: 0 0 10px;
    border: 1px solid var(--ph-line);
    border-radius: 10px;
    background: #fff;
  }
  .ph-bi-card .ph-table th,
  .ph-bi-card .ph-table td {
    box-sizing: border-box;
    padding: 10px 12px;
    border: 0 !important;
  }
  .ph-bi-card .ph-table td:before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #627781;
    font-size: 0.73rem;
    font-weight: 650;
  }
  .ph-bi-card .ph-table tbody th {
    min-width: 0;
    width: 100%;
    background: color-mix(in srgb, var(--card-accent) 9%, white);
  }
  .ph-bi-status {
    white-space: normal;
    max-width: 44%;
  }
}
