:root {
  color-scheme: light;
  --library-navy: #102139;
  --library-ink: #17283c;
  --library-teal: #17655e;
  --library-paper: #f8f3e8;
  --library-gold: #ffca60;
  --library-coral: #ffa78d;
  --library-muted: #495963;
  --library-line: #d9d4c7;
}

body {
  margin: 0;
  background: var(--library-paper);
  color: var(--library-ink);
  font: 17px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a:focus-visible, button:focus-visible, video:focus-visible { outline: 3px solid #b26b0d; outline-offset: 4px; }
.library-wrap { width: min(1150px, calc(100% - 48px)); margin-inline: auto; }
.pda-fallback-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 24px;
  padding: 9px max(24px, calc((100% - 1150px) / 2));
  border-bottom: 1px solid var(--library-line);
  background: #fffdf8;
}
.pda-fallback-nav div { display: flex; flex-wrap: wrap; gap: 0 19px; }
.pda-fallback-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 700; }
.pda-fallback-nav a:hover, .pda-fallback-nav a[aria-current="page"] { color: var(--library-teal); text-decoration: underline; text-underline-offset: 4px; }

.library-hero {
  padding-block: clamp(34px, 5vw, 66px);
  background: radial-gradient(ellipse at 90% 15%, #28585a 0, transparent 60%), var(--library-navy);
  color: #fffcf4;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: clamp(25px, 5vw, 68px); }
.library-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 28px; font-size: 14px; font-weight: 750; letter-spacing: .04em; line-height: 1.3; }
.library-brand img { flex: none; border-radius: 10px; background: #fff; padding: 3px; }
.library-kicker { margin: 0 0 8px; color: var(--library-teal); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.library-hero .library-kicker, .library-next .library-kicker { color: var(--library-coral); }
.library-hero h1 { margin: 0 0 16px; font-size: clamp(47px, 7vw, 85px); font-weight: 850; line-height: .99; letter-spacing: -.055em; }
.library-intro { max-width: 43ch; margin: 0; color: #e0e9eb; font-size: clamp(17px, 2.1vw, 21px); }
.library-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
.library-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid var(--library-gold);
  border-radius: 8px;
  background: var(--library-gold);
  color: var(--library-navy);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}
.library-button:hover { background: #ffdc8e; }
.library-button-outline { border-color: #9db1bc; background: transparent; color: #fffcf4; }
.library-button-outline:hover { background: #fff2; }
.library-hero a:focus-visible, .library-next a:focus-visible { outline-color: var(--library-gold); }
.hero-feature {
  position: relative;
  display: grid;
  align-items: end;
  width: min(100%, 410px);
  min-height: clamp(250px, 30vw, 365px);
  justify-self: center;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #a2b4ab;
  border-radius: 19px;
  background: #253648;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 14px 40px #0005;
}
.hero-feature img, .hero-feature::before { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-feature img { z-index: -2; object-fit: cover; object-position: center 40%; }
.hero-feature::before { z-index: -1; content: ""; background: linear-gradient(0deg, #07121ef5, #07121e00 72%); }
.hero-feature-copy { display: flex; align-items: center; gap: 13px; padding: 18px; }
.hero-feature-copy strong, .hero-feature-copy small { display: block; }
.hero-feature-copy strong { font-size: 19px; }
.hero-feature-copy small { color: #e4ebee; font-size: 14px; }
.hero-play { display: grid; width: 43px; height: 43px; flex: none; place-items: center; border-radius: 50%; background: var(--library-gold); color: var(--library-navy); }
.hero-feature:hover strong { text-decoration: underline; text-underline-offset: 4px; }

.library-main { padding-block: 44px 25px; }
.collection-browser, .collection, .cut { scroll-margin-top: 25px; }
.library-main h2 { margin: 0; font-size: clamp(31px, 4.2vw, 46px); font-weight: 850; letter-spacing: -.045em; line-height: 1.12; }
.collection-folders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.collection-folder {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--library-line);
  border-radius: 12px;
  background: #fffdf7;
  color: var(--library-ink);
  text-decoration: none;
}
.collection-folder:hover { border-color: var(--library-teal); background: #fff; }
.folder-index { display: grid; place-items: center; width: 39px; height: 43px; border-radius: 6px; background: #d8ece6; color: #174a46; font-weight: 800; font-size: 14px; }
.collection-folder:nth-child(2) .folder-index { background: #ffdc90; color: #594021; }
.collection-folder:nth-child(3) .folder-index { background: #fbd4c5; color: #623721; }
.collection-folder strong, .collection-folder small { display: block; }
.collection-folder strong { font-size: 16px; line-height: 1.3; }
.collection-folder small { margin-top: 2px; font-size: 14px; color: var(--library-muted); }
.folder-arrow { color: var(--library-teal); font-size: 19px; }

.collection { margin-top: 50px; padding-top: 26px; border-top: 1px solid var(--library-line); }
.collection-heading { margin-bottom: 20px; }
.collection-heading > p:last-child { max-width: 65ch; margin: 8px 0 0; color: var(--library-muted); }
.collection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cut { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--library-line); border-radius: 15px; background: #fffdf7; box-shadow: 0 9px 25px #17283c0a; }
.cut-header { padding: 18px 21px 16px; }
.cut-duration { margin: 0 0 6px; color: var(--library-teal); font-size: 13px; font-weight: 750; }
.cut-header h3 { margin: 0; font-size: clamp(21px, 2.6vw, 28px); font-weight: 800; line-height: 1.2; letter-spacing: -.03em; }
.watch-page-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.player { display: grid; place-items: center; padding: 5px; background: #0a1424; }
.player video { display: block; width: min(100%, 238px); aspect-ratio: 9 / 16; object-fit: contain; background: #0a1424; }
.player video:focus-visible { outline-color: var(--library-gold); outline-offset: 1px; }
.cut-copy { display: flex; flex: 1; flex-direction: column; padding: 15px 21px 18px; }
.cut-copy .description { margin: 0; color: var(--library-muted); font-size: 16px; }
.transcript-link { align-self: start; display: inline-flex; align-items: center; min-height: 44px; margin-top: 3px; color: var(--library-teal); font-size: 15px; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.file-status { margin: 0 0 8px; color: #8b351d; font-size: 14px; }
.file-status:empty { margin: 0; }
.cut .video-sharing { margin-top: auto; padding-top: 13px; }
.cut .video-share-status:empty { min-height: 0; margin: 0; }

.library-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 20px;
  margin-top: 46px;
  padding: clamp(22px, 4vw, 42px);
  border-radius: 16px;
  background: var(--library-navy);
  color: #fffcf4;
}
.library-next p:last-child { margin: 9px 0 0; color: #e0e9eb; }
.library-next .library-actions { margin: 0; }
.library-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; margin-top: 20px; color: var(--library-muted); font-size: 14px; }
.library-footer p { display: flex; align-items: center; margin: 0; }
.library-footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 870px) {
  .library-next { grid-template-columns: 1fr; }
  .collection-folders { gap: 8px; }
  .collection-folder { gap: 8px; }
}
@media (max-width: 640px) {
  .library-wrap { width: calc(100% - 28px); }
  .pda-fallback-nav { padding-inline: 14px; }
  .hero-grid, .collection-grid, .collection-folders { grid-template-columns: 1fr; }
  .library-brand { margin-bottom: 18px; }
  .hero-feature { justify-self: start; min-height: 254px; }
  .hero-feature img { object-position: center 34%; }
  .collection-folder { min-height: 66px; }
  .collection { margin-top: 32px; }
  .cut-header, .cut-copy { padding-inline: 15px; }
  .player video { width: min(100%, 220px); }
  .library-next .library-actions > a { flex-grow: 1; }
}
