/* Shared interaction contract across all clinical modules. */
.home-access {
  margin: 28px 0 32px;
}
.home-access > h2 {
  font-size: 1.1rem;
  margin: 0 0 14px;
}
.home-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}
.home-access-grid .si-card {
  height: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.home-access-grid .si-card p {
  font-size: 0.9rem;
  line-height: 1.5;
}
.context-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 24px;
  padding: 12px 16px;
  background: #edf5f3;
  border: 1px solid #d5e7e2;
  border-radius: 12px;
  font-size: 0.875rem;
}
.context-links > span {
  color: #4b6662;
  font-weight: 600;
  margin-right: 4px;
}
.context-links > a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 10px;
  color: #125f57;
  text-decoration: none;
  border-radius: 7px;
  background: white;
  border: 1px solid #d5e7e2;
  line-height: 1.4;
}
.context-links > a:hover {
  background: #dceee8;
  border-color: #89b4a9;
}
.clinical-bullets {
  margin: 0;
  padding-left: 1.35em;
  line-height: 1.7;
}
.clinical-bullets > li + li {
  margin-top: 0.65em;
}
.clinical-bullets > li::marker {
  color: #176f68;
}
.flow-body > p,
.si-box > p,
.panel > p {
  line-height: 1.7;
}
.flow-body p + p {
  margin-top: 1em;
}
@media (max-width: 600px) {
  .context-links {
    padding: 10px;
    gap: 8px;
  }
  .context-links > span {
    flex-basis: 100%;
  }
  .context-links > a {
    min-height: 44px;
  }
}
:root {
  --ui-accent: #176f68;
  --ui-border: #d8e4e6;
  --ui-radius: 12px;
  --ui-focus: #148579;
}
[hidden] {
  display: none !important;
}
#main :where(fieldset, .field, .panel, .si-box, .pv-card, .atb-inputs, .result-panel) {
  min-width: 0;
}
#main :where(input, select, textarea, button) {
  font: inherit;
}
#main :where(input:not([type='checkbox']):not([type='radio']), select, textarea) {
  max-width: 100%;
  box-sizing: border-box;
}
#main :where(input:not([type='checkbox']):not([type='radio']), select) {
  min-height: 44px;
}
#main :where(input[type='checkbox'], input[type='radio']) {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  accent-color: var(--ui-accent);
}
:where(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--ui-focus);
  outline-offset: 3px;
}
:where(button, input, select, textarea):disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
:where(button):disabled:hover {
  transform: none;
  box-shadow: none;
}
:where(.chip, .btn.secondary, .pv-reset)[aria-pressed='true'],
.si-chips a[aria-current='page'] {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: white;
}
:where(.chip, .btn, .pv-reset):not(:disabled):active {
  transform: translateY(1px);
}
#main :where(.si-card, .pv-card, .atb-card) {
  border-radius: var(--ui-radius);
}
#main :where(.si-card, .pv-card, .atb-card) :where(h2, h3, p) {
  overflow-wrap: break-word;
}
:where(.si-icon, .sidebar nav a > svg) {
  flex-shrink: 0;
}
:where(.atb-dialog, .pv-dialog, .flow-dialog, .command-dialog) {
  max-height: 90dvh;
  overscroll-behavior: contain;
}
:where(.atb-dialog, .pv-dialog, .flow-dialog, .command-dialog)::backdrop {
  background: #142e426b;
}
:where(.atb-dialog, .pv-dialog, .flow-dialog) select {
  max-width: 100%;
  min-height: 44px;
  font-size: 1rem;
}
#main :where(.actions, .atb-wrap) {
  gap: 10px;
  flex-wrap: wrap;
}
#main :where(.result-row) {
  gap: 12px;
}
@media (max-width: 600px) {
  #main :where(.result-row) {
    flex-wrap: wrap;
  }
  #main :where(input, select, textarea) {
    font-size: 1rem;
  }
  .dose-posology {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Health programmes share a distinct, restrained blue tone. */
.sidebar nav a.nav-health-program {
  background: #edf2f8;
  color: #385b7a;
}
.sidebar nav a.nav-health-program:hover {
  background: #e0eaf4;
  color: #264c6f;
}
.sidebar nav a.nav-health-program.active {
  background: #385b7a;
  color: #fff;
}
.sidebar nav a.nav-health-program:focus-visible {
  outline-color: #385b7a;
}

.atb-cross-primary {
  background: #b42318;
  color: white;
  border: 1px solid #8f1c13;
  box-shadow: 0 3px 10px #b4231833;
  min-height: 46px;
  white-space: nowrap;
}
.atb-cross-primary:hover {
  background: #8f1c13;
  border-color: #72160f;
}
.resource-favorite {
  height: 100%;
  min-width: 0;
  position: relative;
}
.resource-favorite > a {
  height: 100%;
  box-sizing: border-box;
  padding-right: 60px;
}
.resource-favorite .favorite-toggle {
  top: 12px;
  right: 12px;
  z-index: 2;
}
.resource-favorite:hover > a {
  transform: none;
  box-shadow: 0 8px 20px #163d3912;
  border-color: #94bcb6;
}
.resource-favorite:hover {
  transform: translateY(-3px);
}
.resource-favorite > a:hover {
  transform: none;
}
.resource-favorite:focus-within {
  outline: 2px solid #148579;
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .atb-cross-primary {
    width: 100%;
  }
}
/* Keep the Guide link a full card after adding its sibling favourite button. */
.atb-cards > .resource-favorite {
  display: flex;
  align-items: stretch;
  height: auto;
}
.atb-cards > .resource-favorite > .atb-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 122px;
  padding: 18px 60px 34px 18px;
}
.atb-cards .atb-card h3 {
  font-size: 1rem;
  line-height: 1.4;
  margin: 8px 0;
  overflow-wrap: break-word;
}
.atb-cards .atb-card-arrow {
  top: auto;
  bottom: 14px;
  right: 18px;
}
.atb-cards .favorite-toggle {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
}
