.masterclass {
  margin-block: clamp(30px, 5vw, 72px);
  padding-block: 0;
  color: #173d61;
  scroll-margin-top: 36px;
}

.mc-panel {
  padding: clamp(20px, 4vw, 58px);
  border: 1px solid #cddeeb;
  border-radius: 22px;
  background: radial-gradient(ellipse at 75% 34%, #fff 0%, transparent 50%),
    linear-gradient(144deg, #fbfcfd 6%, #edf4f9 73%, #dfeaf3);
}

.mc-heading { text-align: center; }
.mc-heading h2 {
  margin: 0;
  color: #143d61;
  font: 700 clamp(25px, 6.6vw, 72px)/1.08 "Times New Roman", "Nimbus Roman", Georgia, serif;
  letter-spacing: .035em;
}
.mc-wordmark { display: inline-block; }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .mc-wordmark {
    background:
      linear-gradient(117deg, transparent 17%, #f6fcff65 23%, transparent 30%, transparent 56%, #ecfaff85 63%, transparent 70%),
      linear-gradient(180deg, #0b263f 9%, #24699c 27%, #82c7e8 37%, #2b7db2 41%, #0d3c64 51%, #153c5d 65%, #4a9bc8 77%, #13466b 87%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: .65px #0b2c48;
    filter: drop-shadow(0 1px 0 #c5deeb);
  }
}
@media (forced-colors: active) {
  .mc-wordmark {
    background: none;
    color: CanvasText;
    -webkit-text-stroke: 0;
    filter: none;
  }
}
.mc-heading p {
  margin: 14px 0 0;
  color: #4c667a;
  font-size: 1rem;
  line-height: 1.55;
}
.mc-layout {
  display: grid;
  grid-template-columns: minmax(185px, 1fr) minmax(0, 2.55fr);
  align-items: center;
  gap: 30px;
  margin-top: 16px;
}
.mc-copy { padding-block: 12px; }
.mc-category {
  margin: 0 0 9px;
  color: #426483;
  font-size: .875rem;
  font-weight: 600;
}
.mc-copy h3 {
  margin: 0;
  max-width: 20ch;
  color: #10344f;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.16;
  letter-spacing: -.035em;
}
.mc-description {
  margin: 14px 0 17px;
  max-width: 35ch;
  color: #3e596d;
  font-size: 1rem;
  line-height: 1.62;
}
.mc-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.mc-actions a, .mc-controls button, .mc-dialog button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid #b4c9db;
  border-radius: 6px;
  background: #f9fcff;
  color: #153c5a;
  font: 600 .875rem/1.35 var(--sans);
  cursor: pointer;
}
.mc-actions a:hover, .mc-controls button:hover, .mc-dialog button:hover { background: #d6e8f5; }
.mc-actions .mc-watch { border-color: #163b5b; background: #163b5b; color: #fff; }
.mc-actions .mc-watch:hover { background: #23577b; }
.mc-actions .mc-watch[aria-disabled="true"] { background: #e4edf5; color: #294760; border-color: #b4c9db; cursor: default; }
.masterclass [hidden] { display: none; }
.mc-gallery { min-width: 0; }
.mc-stage {
  --mc-first-gap: 19cqw;
  --mc-second-gap: 13cqw;
  --mc-third-gap: 10cqw;
  --mc-visible-slots: 3;
  container-type: inline-size;
  position: relative;
  isolation: isolate;
  height: clamp(310px, 33vw, 415px);
  overflow: hidden;
}
.mc-stage[data-mc-draggable] {
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}
.mc-stage::before {
  content: '';
  position: absolute;
  inset: 76% 3% 2%;
  background: radial-gradient(ellipse, #173d6142, #173d6111 44%, transparent 71%);
  pointer-events: none;
}
.mc-book {
  --mc-distance: max(var(--mc-slot), calc(-1 * var(--mc-slot)));
  --mc-near: clamp(0, var(--mc-distance), 1);
  --mc-middle: clamp(0, calc(var(--mc-distance) - 1), 1);
  --mc-far: clamp(0, calc(var(--mc-distance) - 2), 1);
  --mc-edge: clamp(0, calc(var(--mc-distance) - 3), 1);
  --mc-cover-x: calc(var(--mc-side) * (
    var(--mc-near) * var(--mc-first-gap) + var(--mc-middle) * var(--mc-second-gap)
    + var(--mc-far) * var(--mc-third-gap) + var(--mc-edge) * 8cqw));
  --mc-cover-y: calc(-5px + 13px * var(--mc-near) + 15px * var(--mc-middle) + 11px * var(--mc-far) + 7px * var(--mc-edge));
  --mc-cover-scale: calc(1 - .16 * var(--mc-near) - .15 * var(--mc-middle) - .13 * var(--mc-far) - .09 * var(--mc-edge));
  --mc-cover-angle: calc(-6deg * (1 - var(--mc-near)) - var(--mc-side) * (
    23deg * var(--mc-near) + 6deg * var(--mc-middle) + 4deg * var(--mc-far) + 3deg * var(--mc-edge)));
  --dim: calc(1 - .05 * var(--mc-near) - .01 * var(--mc-middle) - .02 * var(--mc-far));
  position: absolute;
  z-index: calc(100 - 10 * var(--mc-distance));
  top: 48%;
  left: 50%;
  width: clamp(164px, 17.7vw, 242px);
  aspect-ratio: .72;
  padding: 0;
  border: 0;
  border-radius: 3px 7px 7px 3px;
  background: #b6cddd;
  box-shadow: 0 15px 22px #1b385a38;
  cursor: pointer;
  transform: translate3d(calc(-50% + var(--mc-cover-x)), calc(-50% + var(--mc-cover-y)), 0)
    perspective(800px) rotateY(var(--mc-cover-angle)) scale(var(--mc-cover-scale));
  opacity: clamp(0, calc(1 - (var(--mc-distance) - var(--mc-visible-slots)) / .65), 1);
  filter: brightness(var(--dim));
}
.mc-stage[data-mc-draggable] .mc-book { cursor: grab; }
.mc-stage[data-mc-dragging], .mc-stage[data-mc-dragging] .mc-book { cursor: grabbing; }
.mc-stage[data-mc-dragging] .mc-book,
.mc-stage[data-mc-gliding] .mc-book { will-change: transform, opacity; }
.mc-book:hover { --dim: 1; }
.mc-book[aria-current="true"] { box-shadow: 0 18px 30px #163b5b55; }
.mc-book::after {
  content: '';
  position: absolute;
  inset: 3px -6px 4px auto;
  width: 9px;
  z-index: -1;
  border-radius: 0 2px 3px 0;
  background: repeating-linear-gradient(90deg,#9baab3,#dce4e8 2px,#edf2f5 3px);
  transform: skewY(-12deg);
}
.mc-front {
  --mc-ink: #15334c;
  --mc-paper: #dfeaf0;
  --mc-edge: #f9fcfd;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 42% auto;
  gap: 5px;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 13px 11px 11px 14px;
  border: 1px solid #22445826;
  border-radius: inherit;
  color: var(--mc-ink);
  background: linear-gradient(139deg, var(--mc-edge), var(--mc-paper));
  text-align: left;
}
.mc-tone-ink { --mc-ink: #f5f9fd; --mc-paper: #102a43; --mc-edge: #25465e; }
.mc-tone-ivory { --mc-ink: #2f3740; --mc-paper: #e6d6bd; --mc-edge: #fbf7ee; }
.mc-tone-slate { --mc-ink: #f6fafb; --mc-paper: #294e68; --mc-edge: #44708d; }
.mc-tone-pearl { --mc-ink: #193a50; --mc-paper: #c7dfdf; --mc-edge: #f1f9f8; }
.mc-front::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 9px;
  background: linear-gradient(90deg, #14202c47, transparent 67%, #fff3, #172c3b16);
  pointer-events: none;
}
.mc-imprint {
  font: 700 .8125rem/1.15 Georgia, 'Times New Roman', serif;
  letter-spacing: .1em;
}
.mc-book-title {
  align-self: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
  font: 700 clamp(17px, 2.2vw, 30px)/1.01 Georgia, 'Times New Roman', serif;
  letter-spacing: -.025em;
}
.mc-art {
  overflow: hidden;
  background: linear-gradient(130deg, var(--mc-edge), var(--mc-paper));
  box-shadow: inset 0 0 0 1px #fff3;
}
.mc-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mc-art-right img { object-position: right; }
.mc-book-category {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 600 .75rem/1.28 var(--sans);
}
.mc-front.mc-front-illustrated {
  container-type: inline-size;
  display: block;
  padding: 0;
  border-color: #14294142;
  background: #faf8f4;
  text-align: center;
}
.mc-front-illustrated::after {
  z-index: 1;
  width: 100%;
  background: linear-gradient(103deg, #11283b26, transparent 12%, transparent 86%, #fff3);
  box-shadow: inset 1px 1px #fff9, inset -1px -1px #253a4e24;
}
.mc-cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mc-cover-imprint {
  position: absolute;
  inset: 5.6% 10% auto 13%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9%;
  color: #152d47;
  font: 600 clamp(7px, 4.1cqi, 10px)/1.15 var(--sans);
  letter-spacing: .24em;
}
.mc-cover-imprint::before, .mc-cover-imprint::after {
  content: '';
  width: 12%;
  height: 1px;
  background: var(--cover-accent);
  opacity: .65;
}
.mc-cover-title {
  position: absolute;
  inset: 12% 5% auto 8%;
  min-height: 23%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .06em;
  color: #102844;
  font: 700 clamp(12px, 9.8cqi, 24px)/1.38 'Be Vietnam Pro', Arial, sans-serif;
  letter-spacing: 0;
}
.mc-cover-title span + span {
  color: var(--cover-accent);
  font-size: .87em;
}
.mc-cover-edge {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5.2%;
  background: linear-gradient(90deg, #111e32 0%, var(--cover-accent) 46%, #162942 79%, #efdfb7 83%, #fffffa7d 93%, #101f3354 100%);
  box-shadow: 2px 0 3px #18283e38;
}
.mc-controls { display: flex; justify-content: center; gap: 10px; }
.mc-controls button {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
}
.mc-controls svg, .mc-video-nav svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.masterclass :is(button, a, summary):focus-visible {
  outline: 2px solid #174871;
  outline-offset: 3px;
}
.mc-archive { margin-top: 26px; border-top: 1px solid #bcccda; }
.mc-archive summary {
  width: fit-content;
  padding: 13px 4px 0;
  font-weight: 600;
  cursor: pointer;
}
.mc-archive ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px 22px;
  margin: 16px 0 0;
  padding: 0 0 0 20px;
}
.mc-archive a, .mc-youtube { text-decoration: underline; text-underline-offset: .2em; }
.mc-dialog {
  --mc-edge-space: 28px;
  --mc-vertical-gutter: 28px;
  --mc-player-padding: 18px;
  --mc-arrow-diameter: 44px;
  position: fixed;
  inset: 0;
  width: min(900px, calc(100% - var(--mc-edge-space)));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  color: #163b5b;
}
.mc-dialog-panel {
  max-height: calc(100dvh - var(--mc-vertical-gutter));
  padding: var(--mc-player-padding);
  overflow: auto;
  border: 1px solid #c9dbe9;
  border-radius: 12px;
  background: #f8fbfd;
}
.mc-dialog::backdrop { background: #071d32c9; }
.mc-dialog-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title close" "youtube close";
  align-items: center;
  gap: 4px 12px;
  margin-bottom: 12px;
}
.mc-dialog-header h3 { grid-area: title; margin: 0; font-size: clamp(20px,2.8vw,31px); }
.mc-dialog-header [data-mc-close] { grid-area: close; justify-self: end; }
.mc-video-nav { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.mc-dialog .mc-video-nav button {
  position: absolute;
  top: 50%;
  width: var(--mc-arrow-diameter);
  height: var(--mc-arrow-diameter);
  padding: 0;
  border-color: #d5e8fc;
  border-radius: 50%;
  background: #f8fbfd;
  color: #163b5b;
  box-shadow: 0 4px 16px #071d3259;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}
.mc-dialog .mc-video-nav button:hover { background: #d5e8fc; }
.masterclass .mc-video-nav button:focus-visible { outline-color: #d5e8fc; }
.mc-video-nav [data-mc-video-prev] { left: 22px; }
.mc-video-nav [data-mc-video-next] { left: calc(100% - 22px); }
.mc-video-nav svg { width: 50%; height: 50%; }
.mc-video-frame { aspect-ratio: 16 / 9; background: #081b2e; }
.mc-dialog[data-video-format="portrait"] {
  --mc-edge-space: 16px;
  --mc-vertical-gutter: 16px;
  --mc-player-padding: 10px;
  --mc-portrait-width: max(200px, (100dvh - 128px) * .5625);
  width: min(100% - var(--mc-edge-space), var(--mc-portrait-width) + 2 * var(--mc-player-padding) + 2px);
}
.mc-dialog[data-video-format="portrait"] .mc-dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  column-gap: 10px;
  margin-bottom: 8px;
  background: #f8fbfd;
}
.mc-dialog[data-video-format="portrait"] .mc-dialog-header h3 {
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.mc-dialog[data-video-format="portrait"] .mc-video-frame {
  width: 100%;
  aspect-ratio: 9 / 16;
}
.mc-video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.mc-youtube { grid-area: youtube; justify-self: start; font-size: .875rem; }
.mc-player-status {
  margin: 0 0 8px;
  color: #365675;
  font-size: .875rem;
}

@media (min-width: 641px) {
  .mc-dialog:has(.mc-video-nav) {
    --mc-arrow-diameter: clamp(54px, 6vw, 68px);
    --mc-edge-space: calc(2 * (var(--mc-arrow-diameter) + 18px));
  }
  .mc-video-nav { --mc-side-center: calc((100vw - 100%) / 4); }
  .mc-video-nav [data-mc-video-prev] { left: calc(0px - var(--mc-side-center)); }
  .mc-video-nav [data-mc-video-next] { left: calc(100% + var(--mc-side-center)); }
}

@media (max-width: 760px) {
  .mc-layout {
    grid-template-columns: 1fr;
    gap: 17px;
    margin-top: 6px;
  }
  .mc-gallery { grid-row: 1; }
  .mc-stage {
    --mc-first-gap: 21cqw;
    --mc-second-gap: 14cqw;
    --mc-visible-slots: 2;
    height: clamp(254px, 54vw, 320px);
  }
  .mc-book { width: clamp(142px, 31vw, 183px); }
  .mc-front { padding: 10px 9px 9px 11px; }
  .mc-copy { padding: 0; }
  .mc-description { max-width: none; }
  .mc-archive ul { grid-template-columns: 1fr; }
}
