:root {
  color-scheme: light;
  --paper: #f8f8f1;
  --surface: #fffefa;
  --ink: #143333;
  --muted: #516660;
  --teal: #1c655c;
  --dark: #082c2e;
  --mint: #c5e9d1;
  --line: #dce5d9;
  --focus: #00796e;
  --gutter: clamp(20px, 6.25vw, 104px);
  --sans: 'DM Sans', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button:not(:disabled) { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, video:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
[hidden] { display: none !important; }

.wrap { width: min(100% - 2 * var(--gutter), 1320px); margin-inline: auto; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  z-index: 10;
  top: 0;
  left: var(--gutter);
  padding: 12px 18px;
  color: white;
  background: var(--dark);
  transform: translateY(-120%);
}
.skip-link:focus { transform: translateY(0); }

.site-header { background: var(--paper); }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: clamp(24px, 5vw, 76px); }
.brand { display: inline-flex; align-items: center; flex: none; gap: 10px; font-size: 21px; font-weight: 700; letter-spacing: -.035em; }
.brand b { font-weight: 500; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  color: #d7f1de;
  background: #104a43;
}
.brand-icon i { display: block; width: 15px; height: 12px; border: 1.4px solid currentColor; border-radius: 2px; }
.brand-icon i::after {
  content: '';
  display: block;
  width: 0;
  margin: 2px 0 0 5px;
  border-block: 3px solid transparent;
  border-left: 4px solid currentColor;
}
.navigation { display: flex; align-items: center; gap: 28px; color: var(--muted); font-size: 14px; font-weight: 600; }
.navigation a { padding-block: 10px; white-space: nowrap; }
.navigation a:hover, .site-footer a:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 4px; }
.navigation .nav-library { color: var(--ink); }
.navigation span, .site-footer a span { margin-inline-start: 2px; }
.header-access { margin-inline-start: auto; flex: none; }
.auth-notice { color: #823427; background: #f8eae1; }
.auth-notice p { padding-block: 12px; margin-block: 0; font-size: 14px; line-height: 1.45; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 700;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.button-header { min-height: 40px; border-color: #cddacf; background: transparent; }
.button-header:hover, .button-outline:hover { border-color: #7baa98; background: #e9f1e5; }
.button-outline { border-color: #b8cdc0; background: transparent; }
.button-solid { color: white; background: #16594f; }
.button-solid:hover { background: #0d443d; }

.hero {
  position: relative;
  isolation: isolate;
  color: #fcfff4;
  background: #0b2a2c;
}
.hero::before, .hero::after { position: absolute; z-index: -1; inset: 0; content: ''; }
.hero::before { background: url('/videos/operating-room.jpg') 64% 49% / cover no-repeat; }
.hero::after { background: linear-gradient(90deg, #061e20e8 0%, #062124cc 34%, #07252648 67%, #08272815 100%); }
.hero-inner { display: flex; align-items: center; min-height: clamp(430px, 42vw, 576px); padding-block: 54px 66px; }
.hero-copy { width: min(100%, 590px); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .135em; text-transform: uppercase; }
.hero-kicker { margin: 0 0 22px; color: #c8e5d5; }
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 6.6vw, 101px);
  line-height: .94;
  letter-spacing: -.064em;
}
.hero h1 em { color: #c9e4d3; font-weight: 400; }
.hero-summary { max-width: 390px; margin: 24px 0 28px; color: #ebf5ec; font-size: clamp(15px, 1.3vw, 18px); line-height: 1.6; }
.button-hero { min-height: 49px; padding-inline: 19px; color: #143b33; background: var(--mint); }
.button-hero:hover { background: #e3f7e4; }
.button-hero:focus-visible { outline-color: white; }

.library { padding-block: clamp(42px, 5.8vw, 80px) clamp(52px, 6.5vw, 90px); scroll-margin-top: 24px; }
.library-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 26px; }
.section-kicker { margin: 0 0 9px; color: var(--teal); }
.library h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 4vw, 63px);
  line-height: 1;
  letter-spacing: -.053em;
}
.access-note { display: inline-flex; align-items: center; gap: 9px; flex: none; margin: 0 0 5px; color: var(--teal); font-size: 13px; font-weight: 700; }
.lock { position: relative; display: inline-block; flex: none; width: 12px; height: 9px; margin-top: 5px; border: 1.4px solid currentColor; border-radius: 2px; }
.lock::before {
  position: absolute;
  top: -7px;
  left: 1.3px;
  width: 6.5px;
  height: 6px;
  border: 1.4px solid currentColor;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  content: '';
}
.library-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 390px) auto minmax(0, 1fr);
  grid-template-areas:
    "search specialty results"
    "collections collections collections"
    "topics topics topics";
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 24px;
}
.search-field, .filter-field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}
.search-field { grid-area: search; min-width: 0; }
.filter-field { grid-area: specialty; justify-self: start; }
.search-field input, .filter-field select {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}
.search-field input { padding: 0 13px 0 43px; }
.search-field input::placeholder { color: var(--muted); }
.filter-field select { min-width: 162px; padding: 0 10px; }
.search-icon { position: absolute; left: 15px; width: 13px; height: 13px; border: 1.5px solid var(--teal); border-radius: 50%; pointer-events: none; }
.search-icon::after { position: absolute; width: 6px; height: 1.5px; right: -5px; bottom: -2px; background: var(--teal); transform: rotate(48deg); content: ''; }
.tag-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.collection-filters { grid-area: collections; }
.topic-filters { grid-area: topics; }
.tag-filters button {
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid #b8cdc0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--teal);
  font-size: 14px;
  font-weight: 700;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.tag-filters button:hover { border-color: var(--teal); background: #e9f1e5; }
.tag-filters button[aria-pressed="true"] { border-color: var(--teal); background: var(--teal); color: white; }
.topic-filters button {
  min-height: 34px;
  padding: 5px 12px;
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.topic-filters button[aria-pressed="true"] { background: #dbeee1; color: var(--dark); }
.library-results {
  grid-area: results;
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  align-items: center;
  gap: 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.clear-filters {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.results { margin: 0; }

.library-state {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 19px;
  min-height: 112px;
  padding: 19px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.state-icon, .member-icon { display: grid; place-items: center; width: 47px; height: 47px; border-radius: 12px; color: var(--teal); background: #e8f1e4; }
.screen-icon { display: grid; place-items: center; width: 20px; height: 15px; border: 1.5px solid currentColor; border-radius: 3px; }
.screen-icon::after, .play-icon { display: block; width: 0; border-block: 4px solid transparent; border-left: 6px solid currentColor; content: ''; }
.library-state h3 { margin: 0 0 4px; font-size: 16px; line-height: 1.3; }
.library-state p, .noscript-note { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.noscript-note { margin-top: 14px; }

.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.video-card { min-width: 0; }
.card-button {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  text-align: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.card-button:hover, .card-button:focus-visible { border-color: #a7c7b7; box-shadow: 0 10px 24px #163b2812; }
.card-art, .dialog-art {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  overflow: hidden;
  color: #cee7d4;
  background: radial-gradient(ellipse at 78% 7%, #346c5b, transparent 73%), linear-gradient(130deg, #0e3637, #1f5149);
}
.card-art { aspect-ratio: 16 / 8.5; }
.card-art::before, .dialog-art::before {
  position: absolute;
  inset: 13px;
  z-index: -1;
  border: 1px solid #d4eeda3d;
  border-radius: 5px;
  content: '';
}
.card-art .screen-icon, .dialog-art .screen-icon { width: 45px; height: 33px; border-width: 1px; border-radius: 6px; }
.card-art .screen-icon::after, .dialog-art .screen-icon::after { border-block-width: 6px; border-left-width: 9px; }
.card-art img, .dialog-art img { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-art:has(.preview-restriction) .screen-icon,
.dialog-art:has(.preview-restriction) .screen-icon { display: none; }
.preview-restriction {
  padding: 6px 10px;
  border: 1px solid #f1ca7b80;
  border-radius: 6px;
  background: #1d342d;
  color: #ffe1a4;
  font-size: 13px;
  font-weight: 700;
}
.card-duration { position: absolute; right: 13px; bottom: 13px; z-index: 2; padding: 4px 7px; border-radius: 4px; color: white; background: #092525e8; font-size: 12px; font-weight: 700; }
.card-body { display: flex; flex: 1; flex-direction: column; width: 100%; padding: 17px 17px 14px; }
.card-meta { color: var(--teal); font-size: 12px; font-weight: 700; }
.card-title { margin-top: 5px; font-size: 19px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.card-summary {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-top: auto; padding-top: 15px; color: var(--teal); font-size: 13px; font-weight: 700; }
.card-access { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }

.member-section { border-top: 1px solid var(--line); background: #ecf2e8; }
.member-inner { display: flex; align-items: center; gap: 18px; padding-block: 26px; }
.member-icon { flex: none; background: #dfece0; }
.member-copy h2 { margin: 0 0 5px; font-size: 17px; }
.member-copy p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.member-inner .button { margin-inline-start: auto; flex: none; }
.site-footer { background: var(--paper); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 64px; color: var(--muted); font-size: 13px; }
.footer-inner p { margin: 0; }
.footer-inner a { font-weight: 700; }

.video-dialog {
  width: min(760px, 100% - 28px);
  max-height: calc(100% - 28px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 28px 85px #00171177;
}
.video-dialog::backdrop { background: #051d20be; }
.dialog-inner { position: relative; }
.dialog-close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #ffffff70;
  border-radius: 50%;
  background: #102e2de8;
  color: white;
  font-size: 25px;
  line-height: 1;
}
.dialog-close:hover { background: #1e5951; }
.dialog-close:focus-visible { outline-color: #f1fff2; }
.dialog-art { height: clamp(115px, 25vw, 222px); }
.dialog-body { padding: clamp(19px, 3.5vw, 37px); }
.dialog-body h2 { margin: 0; font-family: var(--serif); font-size: clamp(29px, 4vw, 52px); font-weight: 400; line-height: 1.06; letter-spacing: -.036em; overflow-wrap: anywhere; }
.video-facts { display: flex; flex-wrap: wrap; gap: 14px 28px; margin: 19px 0 0; }
.video-facts:empty { display: none; }
.video-facts div { min-width: 80px; }
.video-facts dt { margin: 0 0 2px; color: var(--muted); font-size: 12px; }
.video-facts dd { margin: 0; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.video-summary { margin: 19px 0 0; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 23px; }
.dialog-actions p, .player-error { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.player-shell { margin-top: 16px; }
.player-shell video { display: block; width: 100%; max-height: 60vh; aspect-ratio: 16 / 9; border-radius: 7px; background: #081a1a; }
.player-shell .player-error { margin-top: 10px; color: #8c3028; }
.video-dialog:has(.player-shell:not([hidden])) .dialog-art { display: none; }
.video-dialog:has(.player-shell:not([hidden])) .dialog-close { top: 8px; right: 8px; }
.video-dialog:has(.player-shell:not([hidden])) .dialog-body { padding-top: 47px; }
.video-dialog:has(.player-shell:not([hidden])) .dialog-close:focus-visible { outline-color: var(--focus); }

@media (max-width: 880px) {
  .header-inner, .navigation { gap: 18px; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero::before { background-position: 63% center; }
}
@media (max-width: 700px) {
  .header-inner { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding-top: 10px; }
  .brand { font-size: 19px; }
  .brand-icon { width: 31px; height: 31px; border-radius: 8px; }
  .navigation { grid-column: 1 / -1; grid-row: 2; }
  .header-access { grid-column: 2; grid-row: 1; }
  .header-access .button { min-height: 36px; padding-inline: 10px; font-size: 12px; }
}
@media (max-width: 620px) {
  .navigation .nav-library { display: none; }
  .hero-inner { min-height: 432px; align-items: end; padding-block: 70px 36px; }
  .hero::before { background-position: 68% 35%; }
  .hero::after { background: linear-gradient(0deg, #072729fa, #072729bb 52%, #06232627 100%); }
  .hero h1 { font-size: clamp(48px, 12.2vw, 67px); }
  .hero-kicker { margin-bottom: 14px; }
  .hero-summary { margin-block: 17px 21px; }
  .library-heading { align-items: start; flex-direction: column; gap: 12px; margin-bottom: 21px; }
  .access-note { margin-bottom: 0; }
  .library-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "search search"
      "specialty results"
      "collections collections"
      "topics topics";
    margin-bottom: 18px;
  }
  .library-results { max-width: 110px; }
  .library-state { min-height: 100px; grid-template-columns: auto 1fr; gap: 12px; padding-inline: 14px; }
  .library-state button { grid-column: 2; justify-self: start; }
  .member-inner { flex-wrap: wrap; gap: 12px; }
  .member-copy { flex: 1 1 200px; }
  .member-inner .button { margin-inline-start: 59px; }
  .video-grid { gap: 12px; }
  .card-body { padding: 12px; }
  .card-title { font-size: 16px; }
}
@media (max-width: 435px) {
  .video-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
