/**
 * ACE Demo Page
 *
 * The homepage's and All Courses' system (same tokens, same buttons, same
 * cards, same footer), scoped to .dm so nothing here can reach another page.
 * What is this page's own: the video in a drawing-sheet frame with a title
 * block under it, and the list of the tour's parts beside it.
 *
 * Rules carried over from those two pages, because the site has paid for
 * them:
 *   - anything given a display value also gets an explicit [hidden] rule;
 *   - text in teal uses the lighter teal, white text sits on the deeper one;
 *   - nothing is left invisible if a script fails: hidden-until-revealed
 *     only applies under .dm-js, and .dm-show (a failsafe set from <head>)
 *     undoes it.
 */

/* ============================================================ tokens */

.dm {
  --dm-bg: var(--color-bg, #262624);
  --dm-deep: #1a1918;
  --dm-card: var(--color-bg-alt, #30302e);
  --dm-sheet: #1b1d1d;
  --dm-line: rgba(255, 255, 255, .08);
  --dm-line2: rgba(255, 255, 255, .14);
  --dm-text: var(--color-text, #e8e6dc);
  --dm-head: var(--color-heading, #f5f4ef);
  --dm-muted: var(--color-text-muted, #a39e93);
  --dm-teal: var(--color-primary, #008a81);
  --dm-rgb: var(--ace-primary-rgb, 0, 138, 129);
  --dm-teal-text: #61b6b1;                     /* the two mixes below, precomputed for browsers */
  --dm-teal-fill: #007870;                     /* without color-mix() (iOS 15 and older)         */
  --dm-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --dm-head-font: var(--font-heading, Poppins, system-ui, sans-serif);
  --dm-body-font: var(--font-body, Inter, system-ui, sans-serif);

  /* The ink of a drawing's own lettering: a cool white, as on the other pages' blueprints. */
  --dm-ink: 226, 236, 240;

  color: var(--dm-text);
  font-family: var(--dm-body-font);
  overflow-x: hidden;                          /* older Safari, which has no clip */
  overflow-x: clip;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .dm {
    --dm-teal-text: color-mix(in srgb, var(--dm-teal) 62%, #fff);   /* 5.6:1 on the cards, whatever teal the palette sets */
    --dm-teal-fill: color-mix(in srgb, var(--dm-teal) 87%, #000);   /* white on it: 5.4:1 */
  }
}

/* ============================================================ the theme around it */

.ace-demo-on .site-footer { display: none; }             /* this page carries its own */

/* ============================================================ base */

.dm *, .dm *::before, .dm *::after { box-sizing: border-box; }
.dm h1, .dm h2, .dm h3 { margin: 0; }                    /* beats the theme's heading margins */
:where(.dm) p, :where(.dm) dl, :where(.dm) dd { margin: 0; }   /* no weight: any class setting a margin wins */
:where(.dm) a { color: inherit; }                       /* no weight, so a link's own class decides its colour */
.dm [hidden] { display: none !important; }
.dm-i { display: inline-block; flex: none; vertical-align: middle; }
.dm-i.is-up { transform: rotate(-90deg); }
.dm-i.is-solid { fill: currentColor; }
.dm-sr {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.dm-wrap { max-width: var(--max-width, 1180px); margin: 0 auto; padding: 0 24px; }
.dm section[id], .dm [id^="dm-"] { scroll-margin-top: 100px; }
.dm h1[tabindex="-1"]:focus, .dm h2[tabindex="-1"]:focus { outline: none; }

.dm a:focus-visible, .dm button:focus-visible, .dm summary:focus-visible, .dm-video:focus-visible {
  outline: 2px solid var(--dm-teal-text); outline-offset: 3px;
}
.dm .dm-video:focus-visible { outline-offset: -3px; }          /* inside the frame, which clips what is outside it */

.dm-eyebrow {
  font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dm-teal-text);
}
.dm-head { max-width: 760px; margin-bottom: 22px; }
.dm-head h2 {
  margin-top: 10px;
  font: 700 clamp(1.5rem, 2.4vw, 2rem)/1.16 var(--dm-head-font);
  letter-spacing: -.022em; color: var(--dm-head); text-wrap: balance;
}
.dm-body { margin-top: 12px; font-size: .95rem; line-height: 1.65; color: var(--dm-muted); max-width: 56ch; text-wrap: pretty; }

/* ============================================================ buttons */

.dm-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.dm-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
  font: 600 .92rem/1.2 var(--dm-body-font); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.dm-btn:hover { transform: translateY(-1px); }
.dm-btn:active { transform: translateY(0) scale(.98); }
.dm-btn.is-primary {
  background: var(--dm-teal-fill); color: #fff;
  box-shadow: 0 10px 28px rgba(var(--dm-rgb), .32), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.dm-btn.is-primary:hover { box-shadow: 0 14px 34px rgba(var(--dm-rgb), .42), inset 0 1px 0 rgba(255, 255, 255, .2); }
.dm-btn.is-primary .dm-i { transition: transform .15s ease; }
.dm-btn.is-primary:hover .dm-i { transform: translateX(2px); }
.dm-btn.is-ghost { background: rgba(255, 255, 255, .04); border-color: var(--dm-line2); color: var(--dm-head); }
.dm-btn.is-ghost:hover { border-color: rgba(var(--dm-rgb), .6); background: rgba(var(--dm-rgb), .08); }

/* ============================================================ A. the tour */

.dm-hero { position: relative; padding: 30px 0 34px; isolation: isolate; }
.dm-hero::before {
  content: ""; position: absolute; top: -84px; right: 0; bottom: 0; left: 0; inset: -84px 0 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(760px 420px at 38% 58%, rgba(var(--dm-rgb), .17), transparent 70%),
    radial-gradient(420px 260px at 96% 12%, rgba(var(--dm-rgb), .08), transparent 70%);
}

/* The heading on the left, its one sentence on the right, both sitting on the same line above the video. */
.dm-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px 48px; align-items: end; }
.dm-hero h1 {
  margin-top: 12px;
  font: 800 clamp(2rem, 3.3vw, 2.65rem)/1.07 var(--dm-head-font);
  letter-spacing: -.03em; color: var(--dm-head); text-wrap: balance;
}
.dm-lede { font-size: 1rem; line-height: 1.6; color: var(--dm-muted); max-width: 52ch; padding-bottom: 3px; text-wrap: pretty; }

.dm-theatre { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; margin-top: 24px; align-items: stretch; }

/* The video as a drawing sheet: the picture, and its title block. */
.dm-sheet {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  border-radius: 14px; border: 1px solid var(--dm-line2); overflow: hidden;
  background: var(--dm-sheet);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .3);
}
.dm-frame { position: relative; background: #0d1312; }
.dm-frame::before { content: ""; display: block; padding-top: 56.25%; }       /* 16:9, for browsers without aspect-ratio */
.dm-video { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; background: #0d1312; }
img.dm-video { object-fit: cover; }

.dm-play {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; display: grid; place-items: end center;
  margin: 0; padding: 0 12px 10.5%; border: 0; border-radius: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(8, 12, 12, .46));
  color: #fff; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.dm-play-pill {
  display: inline-flex; align-items: center; gap: 11px; padding: 7px 18px 7px 7px; border-radius: 999px;
  border: 1px solid transparent;                       /* drawn when a system forces its own colours */
  background: var(--dm-teal-fill); color: #fff;
  font: 600 .95rem/1.2 var(--dm-body-font); white-space: nowrap;
  box-shadow: 0 12px 30px rgba(var(--dm-rgb), .45), 0 2px 10px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .2);
  transition: transform .15s ease, box-shadow .2s ease;
}
.dm-play-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .17); }
.dm-play-ico .dm-i { margin-left: 2px; }                  /* a triangle's weight sits left of its box */
.dm-play-time {
  padding-left: 11px; border-left: 1px solid rgba(255, 255, 255, .3);
  font: 600 .8rem/1 var(--dm-mono); font-variant-numeric: tabular-nums;
}
.dm-play:hover .dm-play-pill { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(var(--dm-rgb), .55), 0 2px 10px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .22); }
.dm-play:active .dm-play-pill { transform: scale(.98); }
.dm .dm-play:focus-visible { outline: none; }
.dm-play:focus-visible .dm-play-pill { outline: 2px solid #fff; outline-offset: 3px; }

.dm-endcard {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; display: grid; align-content: center; justify-items: center; gap: 16px;
  padding: 20px; text-align: center; background: rgba(13, 17, 17, .9);
}
.dm-end-h { font: 700 clamp(1.1rem, 2.2vw, 1.5rem)/1.2 var(--dm-head-font); letter-spacing: -.015em; color: var(--dm-head); }
.dm-end-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.dm-fault {
  position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 12px 14px;
  border-radius: 10px; border: 1px solid var(--dm-line2); background: rgba(20, 20, 19, .94);
  font-size: .86rem; line-height: 1.5; color: var(--dm-text);
}
.dm-fault a { color: var(--dm-teal-text); font-weight: 600; text-underline-offset: 3px; }
.dm-fault-retry {
  margin: 0 6px 0 2px; padding: 4px 11px; border-radius: 8px; border: 1px solid rgba(var(--dm-rgb), .6);
  background: rgba(var(--dm-rgb), .14); color: var(--dm-head); font: 600 .8rem/1.3 var(--dm-body-font); cursor: pointer;
}
.dm-fault-retry:hover { background: rgba(var(--dm-rgb), .26); }
.dm-fault-admin { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--dm-line2); font-size: .78rem; color: var(--dm-muted); }
.dm-fault-admin code { font: 600 .74rem var(--dm-mono); color: var(--dm-text); }

/* The title block: what is showing, how long, where the captions are, when it was recorded. */
.dm-block {
  display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, max-content);   /* the three short cells as wide as their words; the first takes the rest */
  border-top: 1px solid var(--dm-line2);
  background: linear-gradient(180deg, rgba(var(--dm-ink), .035), transparent);
}
.dm-cell { min-width: 0; padding: 9px 22px 10px 14px; border-left: 1px solid var(--dm-line); }
.dm-cell:first-child { border-left: 0; }
.dm-cell dt { font: 600 .6rem/1.2 var(--dm-mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(var(--dm-ink), .62); }
.dm-cell dd {
  margin-top: 4px; font: 600 .8rem/1.3 var(--dm-mono); color: rgba(var(--dm-ink), .94);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dm-cell.is-live dt { color: var(--dm-teal-text); }

/* The parts, beside the video. */
.dm-rail {
  display: flex; flex-direction: column; min-width: 0; padding: 14px 8px 8px;
  border-radius: 14px; border: 1px solid var(--dm-line); background: var(--dm-card);
}
.dm .dm-rail-h { margin: 0 10px 8px; font: 700 .7rem/1.2 var(--dm-body-font); letter-spacing: .12em; text-transform: uppercase; color: var(--dm-muted); }
.dm-parts { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; grid-auto-rows: minmax(36px, 1fr); gap: 1px; }
.dm-parts li { display: flex; min-width: 0; }
.dm-part {
  flex: 1; min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 6px 10px; border-radius: 9px; font-size: .86rem; line-height: 1.25; color: var(--dm-text); text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.dm-part-n { font: 600 .72rem/1 var(--dm-mono); color: var(--dm-muted); }
.dm-part-t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-part-at { font: 600 .74rem/1 var(--dm-mono); font-variant-numeric: tabular-nums; color: var(--dm-muted); }
a.dm-part:hover { background: rgba(255, 255, 255, .05); color: var(--dm-head); }
a.dm-part[aria-current="true"] { background: rgba(var(--dm-rgb), .17); color: var(--dm-head); box-shadow: inset 2px 0 0 var(--dm-teal-text); }
a.dm-part[aria-current="true"] .dm-part-n, a.dm-part[aria-current="true"] .dm-part-at { color: var(--dm-teal-text); }
.dm a.dm-part:focus-visible { outline-offset: -2px; }

.dm-notes { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 28px; }
.dm-notes li { display: flex; gap: 9px; font-size: .8rem; line-height: 1.55; color: var(--dm-muted); }
.dm-notes li .dm-i { margin-top: 3px; color: var(--dm-teal-text); }
.dm-notes a { color: var(--dm-teal-text); font-weight: 600; text-decoration: none; }
.dm-notes a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================ B. part by part */

.dm-stops { position: relative; padding: 46px 0 30px; }
.dm-stops::before {                          /* a hairline between sections, fading at the ends */
  content: ""; position: absolute; top: 0; left: 50%; width: min(1132px, calc(100% - 48px)); height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--dm-line2) 20%, var(--dm-line2) 80%, transparent);
}
.dm-stop-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dm-stop {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  border-radius: 14px; border: 1px solid var(--dm-line); background: var(--dm-card); overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.dm-stop-pic { background: var(--dm-sheet); border-bottom: 1px solid var(--dm-line); }
.dm-stop-pic img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.dm-stop-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dm-stop-at {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 8px; border-radius: 999px;
  border: 1px solid var(--dm-line2); background: rgba(255, 255, 255, .03);
  font: 600 .7rem/1 var(--dm-mono); font-variant-numeric: tabular-nums; color: var(--dm-head);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.dm-stop-at.is-plain { padding-left: 9px; color: var(--dm-muted); }
.dm-stop-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px 17px; }
.dm-stop-n { font: 600 .68rem/1.2 var(--dm-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dm-teal-text); }
.dm-stop h3 { font: 700 1rem/1.3 var(--dm-head-font); letter-spacing: -.01em; color: var(--dm-head); }
.dm-stop-link { text-decoration: none; }
.dm-stop-link::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 1; border-radius: inherit; }
.dm .dm-stop-link:focus-visible { outline: none; }
.dm-stop-link:focus-visible::after { outline: 2px solid var(--dm-teal-text); outline-offset: -2px; }
.dm-stop-text { font-size: .84rem; line-height: 1.55; color: var(--dm-muted); }
@media (hover: hover) {
  .dm-stop:hover { border-color: rgba(var(--dm-rgb), .55); transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
  .dm-stop:hover .dm-stop-at:not(.is-plain) { background: var(--dm-teal-fill); border-color: transparent; color: #fff; }
}

/* ============================================================ C. the narration */

.dm-words { padding: 4px 0 30px; }
.dm-script { border-radius: 14px; border: 1px solid var(--dm-line); background: var(--dm-card); }
.dm-script > summary {                                   /* (a block, with the arrow placed by hand: older Safari will not make a summary a grid) */
  position: relative; display: block; padding: 18px 60px 18px 22px; border-radius: 14px; cursor: pointer; list-style: none;
}
.dm-script > summary::-webkit-details-marker { display: none; }
.dm-script > summary > .dm-script-note { display: block; margin-top: 4px; }
.dm-script > summary > .dm-i { position: absolute; right: 22px; top: 50%; margin-top: -9px; }
.dm-script h2 { font: 700 1.08rem/1.3 var(--dm-head-font); letter-spacing: -.01em; color: var(--dm-head); }
.dm-script-note { font-size: .84rem; line-height: 1.5; color: var(--dm-muted); }
.dm-script > summary > .dm-i { color: var(--dm-muted); transition: transform .2s ease, color .15s ease; }
.dm-script > summary:hover > .dm-i { color: var(--dm-head); }
.dm-script[open] > summary > .dm-i { transform: rotate(180deg); }
.dm .dm-script > summary:focus-visible { outline-offset: -2px; }
.dm-script-body { padding: 0 22px 6px; }
.dm-script-part { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 8px 24px; padding: 18px 0; border-top: 1px solid var(--dm-line); }
.dm-script-part h3 { display: flex; align-items: baseline; gap: 10px; font: 700 .92rem/1.4 var(--dm-head-font); color: var(--dm-head); }
.dm-script-n { font: 600 .72rem/1 var(--dm-mono); color: var(--dm-teal-text); }
.dm-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dm-lines li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.dm-line-at { font: 600 .76rem/1.6 var(--dm-mono); font-variant-numeric: tabular-nums; color: var(--dm-teal-text); text-decoration: none; }
a.dm-line-at:hover { text-decoration: underline; text-underline-offset: 3px; }
span.dm-line-at { color: var(--dm-muted); }
.dm-lines p { font-size: .92rem; line-height: 1.65; color: var(--dm-text); max-width: 70ch; }

/* ============================================================ D. closing */

.dm-close { padding: 12px 0 56px; }
.dm-close-box {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 30px 32px; border-radius: 16px; border: 1px solid rgba(var(--dm-rgb), .35);
  background: radial-gradient(600px 240px at 90% 0%, rgba(var(--dm-rgb), .22), transparent 70%), var(--dm-card);
}
.dm-close-box h2 { font: 700 clamp(1.35rem, 2.1vw, 1.7rem)/1.16 var(--dm-head-font); letter-spacing: -.022em; color: var(--dm-head); text-wrap: balance; }
.dm-close-box p { margin-top: 8px; font-size: .92rem; color: var(--dm-muted); }
.dm-close-box .dm-ctas { margin-top: 0; }

/* ============================================================ E. footer */

.dm-foot { padding: 40px 0 22px; background: var(--dm-deep); border-top: 1px solid var(--dm-line); font-size: .84rem; }
.dm-foot-grid { display: grid; grid-template-columns: minmax(0, 1.7fr); grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 28px; }
.dm-foot-name { font: 700 1rem var(--dm-head-font); color: var(--dm-head); text-decoration: none; }
.dm-foot-brand p { margin-top: 8px; max-width: 36ch; font-size: .82rem; line-height: 1.6; color: var(--dm-muted); }
.dm-socials { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.dm-social { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--dm-text); text-decoration: none; }
.dm-social:hover { color: var(--dm-teal-text); }
.dm-foot .dm-foot-h { margin: 0 0 10px; font: 700 .7rem var(--dm-body-font); letter-spacing: .12em; text-transform: uppercase; color: var(--dm-muted); }
.dm-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.dm-foot li a { color: var(--dm-text); text-decoration: none; }
.dm-foot li a:hover { color: var(--dm-teal-text); }
.dm-foot-base { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--dm-line); font-size: .76rem; color: var(--dm-muted); }
.dm-top-link { display: inline-flex; align-items: center; gap: 6px; color: var(--dm-muted); text-decoration: none; white-space: nowrap; }
.dm-top-link:hover { color: var(--dm-head); }

/* ============================================================ reveal on scroll */

@media (prefers-reduced-motion: no-preference) {
  /* The individual translate property, so a card's own transform (lifting on hover) still works once it has come in. */
  .dm-js .dm [data-reveal] { opacity: 0; translate: 0 14px; transition: opacity .6s ease, translate .6s cubic-bezier(.2, .7, .2, 1); }
  .dm-js .dm [data-reveal].is-in, .dm-show .dm [data-reveal] { opacity: 1; translate: none; }
  .dm-js .dm .dm-stop[data-reveal] {
    transition: opacity .6s ease, translate .6s cubic-bezier(.2, .7, .2, 1), border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dm *, .dm *::before, .dm *::after { animation: none !important; transition: none !important; }
  /* The theme scrolls every page smoothly; on this page (the only one this file is sent to), not for anyone who
     has asked their system for less motion. */
  html:root { scroll-behavior: auto; }
}

/* On paper nothing scrolls into view: what was waiting to be revealed is printed. */
@media print {
  .dm [data-reveal] { opacity: 1 !important; translate: none !important; transition: none !important; }
}

/* ============================================================ a system's own colours */

/* Windows' contrast themes drop backgrounds and shadows: what was said with a tint is said with a line. */
@media (forced-colors: active) {
  .dm-play-pill, .dm-btn { border-color: ButtonText; }
  a.dm-part[aria-current="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .dm-endcard { background: Canvas; }
  .dm-play { background: none; }
  .dm-play-ico { border: 1px solid ButtonText; }
}

/* ============================================================ narrower screens */

@media (max-width: 1100px) {
  .dm-theatre { grid-template-columns: minmax(0, 1fr) 284px; gap: 14px; }
  /* Two to a row: the still, whole, set into the card beside its words. */
  .dm-stop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dm-stop { flex-direction: row; align-items: flex-start; gap: 14px; padding: 14px; }
  .dm-stop-pic { flex: 0 0 40%; border: 1px solid var(--dm-line); border-radius: 9px; overflow: hidden; }
  .dm-stop-body { flex: 1; min-width: 0; padding: 0; }
}

@media (max-width: 820px) {
  /* One to a row: room for the picture and for a line of words long enough to read. */
  .dm-stop-grid { grid-template-columns: minmax(0, 1fr); }
  .dm-stop-pic { flex-basis: 232px; }
}

@media (max-width: 960px) {
  .dm-intro { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .dm-theatre { grid-template-columns: minmax(0, 1fr); }
  /* Under the video: the parts in two columns, read down the first and then the second. */
  .dm-parts { grid-auto-flow: column; grid-template-rows: repeat(5, minmax(40px, auto)); grid-auto-rows: auto; grid-auto-columns: minmax(0, 1fr); column-gap: 8px; }
  .dm-foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row; }
  .dm-foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .dm-notes { grid-template-columns: minmax(0, 1fr); }
  .dm-script-part { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

@media (max-width: 640px) {
  .dm-wrap { padding: 0 18px; }
  .dm-hero { padding: 22px 0 26px; }
  .dm-hero h1 { font-size: clamp(1.8rem, 8.2vw, 2.2rem); }
  .dm-lede { font-size: .95rem; }
  .dm-theatre { margin-top: 18px; gap: 12px; }

  /* A phone: the video from edge to edge, as large as the screen allows. */
  .dm-sheet { margin: 0 -18px; border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .dm-play { padding-bottom: 9%; }
  .dm-play-pill { gap: 9px; padding: 5px 14px 5px 5px; font-size: .88rem; }
  .dm-play-ico { width: 34px; height: 34px; }
  .dm-endcard { gap: 10px; padding: 12px; }
  .dm-endcard .dm-btn { padding: 9px 14px; font-size: .84rem; }
  .dm-fault { left: 10px; right: 10px; bottom: 10px; padding: 10px 12px; font-size: .8rem; }

  .dm-block { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1.6fr); }
  .dm-cell { padding: 8px 12px 9px; }
  .dm-cell:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--dm-line); padding-left: 18px; }
  .dm-cell:nth-child(2) { border-left: 0; padding-left: 18px; }
  .dm-cell dd { font-size: .76rem; }

  .dm-parts { grid-auto-flow: row; grid-template-rows: none; grid-auto-rows: minmax(44px, auto); }

  /* The parts' cards slide sideways, the next one peeking in (as the platform cards do on All Courses). */
  .dm-stops { padding: 34px 0 20px; }
  .dm-stop-grid {
    grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 80%;
    gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    margin: 0 -18px; padding: 2px 18px 12px; scroll-padding: 0 18px; scrollbar-width: thin;
  }
  .dm-stop { flex-direction: column; align-items: stretch; gap: 0; padding: 0; scroll-snap-align: start; }
  .dm-stop-pic { flex: none; border: 0; border-bottom: 1px solid var(--dm-line); border-radius: 0; }
  .dm-stop-body { flex: none; padding: 12px 16px 17px; }

  .dm-script > summary { padding: 16px 52px 16px 18px; }
  .dm-script > summary > .dm-i { right: 18px; }
  .dm-script-body { padding: 0 18px 4px; }
  .dm-close { padding-bottom: 40px; }
  .dm-close-box { padding: 24px 20px; }
  .dm-close-box .dm-ctas { width: 100%; }
  .dm-ctas { gap: 8px; }
  .dm-ctas .dm-btn { flex: 1 1 auto; justify-content: center; }
  .dm-foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 380px) {
  .dm-cell { padding: 8px 9px 9px; }
  .dm-cell dd { font-size: .7rem; }
  .dm-play { padding-bottom: 7%; }
  .dm-play-pill { gap: 8px; padding: 4px 12px 4px 4px; font-size: .82rem; }
  .dm-play-ico { width: 30px; height: 30px; }
  .dm-play-time { padding-left: 8px; font-size: .74rem; }
}

/* ace-demo-page: end of file */
