.sm-patient-banner,
.sm-legal {
  --sm-ink: #163238;
  --sm-muted: #49646a;
  --sm-accent: #006979;
  --sm-action-hover: #005464;
  --sm-line: #c6dbdb;
  --sm-panel: #e8f4f2;
  --sm-paper: #fff;
  color: var(--sm-ink);
}

.sm-patient-banner { margin-block: clamp(1.75rem, 5vw, 4rem); }
.sm-patient-banner .sm-banner-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(10rem, .8fr);
  align-items: center;
  gap: clamp(1rem, 4vw, 3.5rem);
  padding: clamp(1.375rem, 4vw, 3.5rem);
  background: var(--sm-panel);
  border: 1px solid var(--sm-line);
  border-radius: 16px;
}
.sm-patient-banner h2 { margin: 0; color: inherit; font-size: clamp(1.65rem, 3.4vw, 2.85rem); line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
.sm-patient-banner p { margin: .8rem 0 1.3rem; max-width: 42ch; color: var(--sm-muted); }
.sm-patient-banner .sm-banner-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.sm-patient-banner .sm-banner-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 48px;
  max-width: 100%;
  padding: .65rem 1rem;
  border: 1px solid var(--sm-accent);
  border-radius: 10px;
  background: var(--sm-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.sm-patient-banner .sm-banner-action:hover { background: var(--sm-action-hover); color: #fff; }
.sm-patient-banner .sm-banner-action:active { background: #004653; }
.sm-patient-banner .sm-banner-action--secondary { background: var(--sm-paper); color: var(--sm-accent); }
.sm-patient-banner :is(a,summary):focus-visible,
.sm-legal :is(a,summary):focus-visible { outline: 2px solid var(--sm-accent); outline-offset: 3px; }
.sm-banner-visual { display: grid; place-items: center; min-width: 0; }
.sm-max-device {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .6rem;
  width: clamp(8.5rem, 18vw, 12rem);
  aspect-ratio: 4 / 5;
  border: 5px solid #23484f;
  border-radius: 1.6rem;
  background: var(--sm-paper);
  color: var(--sm-ink);
}
.sm-max-device img { width: clamp(3.35rem, 8vw, 5rem); height: auto; border-radius: 50%; }
.sm-max-device strong { font-size: 1.125rem; }
.sm-max-device span { color: var(--sm-muted); font-size: .85rem; }
.sm-patient-banner--licenses .sm-banner-card { grid-template-columns: minmax(8rem, .55fr) minmax(0, 1.6fr); background: var(--sm-paper); }
.sm-license-preview { width: clamp(5rem, 11vw, 8rem); height: auto; display: block; border: 1px solid var(--sm-line); border-radius: 8px; }

.sm-legal { padding-block: 1.5rem 3.5rem; overflow-wrap: anywhere; }
.sm-legal > section { margin-block: 2.5rem; scroll-margin-top: 7rem; }
.sm-legal h2 { margin: 0 0 1rem; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.18; color: inherit; }
.sm-legal h3 { margin: 0 0 .75rem; font-size: 1.2rem; line-height: 1.3; color: inherit; }
.sm-legal p { margin: .75rem 0; }
.sm-legal a { color: var(--sm-accent); text-decoration: underline; text-underline-offset: .18em; }
.sm-legal-nav { display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; }
.sm-legal-nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.sm-legal-orgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.5rem; }
.sm-legal-org { padding: 1rem 1.15rem; border: 1px solid var(--sm-line); border-radius: 14px; background: var(--sm-paper); }
.sm-legal-org p { margin: 0; color: var(--sm-muted); }
.sm-legal details { margin: 0 0 .55rem; border: 1px solid var(--sm-line); border-radius: 12px; background: var(--sm-paper); }
.sm-legal summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; min-height: 48px; cursor: pointer; list-style: none; font-weight: 700; }
.sm-legal summary::-webkit-details-marker { display: none; }
.sm-legal summary::after { content: ""; flex: 0 0 .45rem; width: .45rem; height: .45rem; margin-inline-end: .22rem; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sm-legal details[open] > summary::after { transform: rotate(225deg); }
.sm-legal summary:hover { color: var(--sm-accent); }
.sm-legal summary:active { background: var(--sm-panel); }
.sm-legal-doc { padding: .1rem 1rem 1rem; }
.sm-legal-copy { max-width: 80ch; }
.sm-legal-doc iframe { display: block; width: 100%; height: clamp(22rem, 65vh, 48rem); margin-top: .65rem; border: 1px solid var(--sm-line); border-radius: 8px; }
.sm-legal-doc a[id] { scroll-margin-top: 7rem; }

@media (max-width: 720px) {
  .sm-patient-banner .sm-banner-card { grid-template-columns: minmax(0, 1fr); }
  .sm-patient-banner--max .sm-banner-visual { display: none; }
  .sm-patient-banner--licenses .sm-banner-card { grid-template-columns: auto minmax(0, 1fr); gap: 1rem; }
  .sm-license-preview { width: clamp(3rem, 12vw, 5rem); }
  .sm-legal-orgs { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 410px) {
  .sm-patient-banner--licenses .sm-banner-card { grid-template-columns: minmax(0, 1fr); }
  .sm-patient-banner--licenses .sm-banner-visual { display: none; }
}
