/* Summary films (v69): the guide's Summary videos section and each film's own page.
   Scoped with :not(#ma-film) so the content page design's list and link rules do not reach the cards.
   Colours follow the content page design (--cp-*) where it is present, with the same values as fallbacks. */
.ma-guides:not(#ma-film) {
  --mf-ink: var(--cp-ink, #1A2B48); --mf-body: var(--cp-body, #3c4763); --mf-muted: var(--cp-muted, #5a6482);
  --mf-line: var(--cp-line, #e3e7ef); --mf-ground: var(--cp-ground, #f6f9fc); --mf-r: var(--cp-r, 12px);
  --mf-lv: var(--cp-lv, #6D5BD0); --mf-lv-t: var(--cp-lv-t, #EEEBFC);
  --mf-grad: var(--cp-grad, linear-gradient(120deg, #1A2B48, #2E368F 60%, #4b46b8));
  --mf-lift: 0 0 0 1px rgba(26,43,72,.08), 0 30px 60px -30px rgba(26,43,72,.45);
}

/* ---------- Shared pieces: thumbnail, running time, play mark ---------- */
.ma-guides:not(#ma-film) .ma-film-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #e9edf5; }
.ma-guides:not(#ma-film) .ma-film-thumb img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; margin: 0; border: 0; border-radius: 0; box-shadow: none; transition: transform .5s cubic-bezier(.23,1,.32,1); }
.ma-guides:not(#ma-film) .ma-film-duration { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; background: rgba(15,24,44,.86); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.5; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.ma-guides:not(#ma-film) .ma-film-play { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255,255,255,.94); box-shadow: 0 8px 24px -8px rgba(26,43,72,.55); transition: transform .35s cubic-bezier(.23,1,.32,1), background .25s ease; }
.ma-guides:not(#ma-film) .ma-film-play::after { content: ""; position: absolute; left: 21px; top: 16px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent var(--mf-lv); }

/* ---------- Guide: link under the matching section heading ---------- */
.ma-guides:not(#ma-film) .chapter .ma-film-link { margin: 14px 0 0; }
.ma-guides:not(#ma-film) .chapter .ma-film-link a { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; background: var(--mf-lv-t); color: var(--mf-ink) !important; font-size: 15px; font-weight: 600; line-height: 1.4; text-decoration: none !important; transition: box-shadow .25s ease; }
.ma-guides:not(#ma-film) .chapter .ma-film-link a:hover { box-shadow: inset 0 0 0 1px var(--mf-lv); }
.ma-guides:not(#ma-film) .ma-film-link-icon { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--mf-grad); }
.ma-guides:not(#ma-film) .ma-film-link-icon::after { content: ""; position: absolute; left: 11px; top: 8px; border-style: solid; border-width: 6px 0 6px 9px; border-color: transparent transparent transparent #fff; }

/* ---------- Guide: hero count ---------- */
.ma-guides:not(#ma-film) .meta-row .ma-films-meta { display: inline-flex; align-items: center; gap: 6px; color: var(--mf-ink) !important; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(91,79,214,.45); text-underline-offset: 4px; }
/* The count sits on its own line under the reading time, without the separator dot. */
.ma-guides:not(#ma-film) .meta-row > span:has(> .ma-films-meta) { flex-basis: 100%; }
body.ma-cp .ma-guides:not(#ma-film) .meta-row > span:has(> .ma-films-meta)::before { display: none; }
.ma-guides:not(#ma-film) .meta-row .ma-films-meta::before { content: ""; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent var(--mf-lv); }

/* ---------- Guide: Summary videos section ---------- */
/* The section opens the guide (before the notes): no space above it, a rule and generous space below it. */
.ma-guides:not(#ma-film) .chapter > .ma-guide-films { margin-top: 0; padding-bottom: var(--cp-s5, 48px); border-bottom: 1px solid var(--mf-line); scroll-margin-top: 96px; }
.ma-guides:not(#ma-film) .chapter > .ma-guide-films + * { margin-top: var(--cp-s6, 64px); }
.ma-guides:not(#ma-film) .ma-films-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.ma-guides:not(#ma-film) .ma-films-head h2 { margin: 0; scroll-margin-top: 96px; }
.ma-guides:not(#ma-film) .chapter .ma-films-head p { margin: 10px 0 0; max-width: 56ch; font-size: 16px; line-height: 1.6; color: var(--mf-muted); }
.ma-guides:not(#ma-film) .chapter .ma-films-playall { flex: none; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px 0 16px; border-radius: var(--mf-r); background: var(--mf-grad); color: #fff !important; font-size: 15px; font-weight: 600; text-decoration: none !important; }
.ma-guides:not(#ma-film) .chapter .ma-films-playall::before { content: ""; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #fff; }
.ma-guides:not(#ma-film) .chapter ul.ma-film-cards { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 28px 0 0; padding: 0; }
@media (min-width: 600px) and (max-width: 759px) { .ma-guides:not(#ma-film) .chapter ul.ma-film-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Show all / show fewer: every card is in the HTML; while the control is closed the extra cards are hidden.
   Phones show four, two-column screens four, three-column screens six (two rows). Without :has, all show. */
@media (min-width: 760px) { .ma-guides:not(#ma-film) .ma-guide-films:has(> details.ma-films-toggle:not([open])) .ma-film-card:nth-child(n+7) { display: none; } }
@media (max-width: 759px) { .ma-guides:not(#ma-film) .ma-guide-films:has(> details.ma-films-toggle:not([open])) .ma-film-card:nth-child(n+5) { display: none; } }
@media (min-width: 760px) { .ma-guides:not(#ma-film) .chapter details.ma-films-toggle-phone { display: none; } }
.ma-guides:not(#ma-film) .chapter details.ma-films-toggle { margin: 20px 0 0; padding: 0; border: 0; background: none; }
.ma-guides:not(#ma-film) .chapter details.ma-films-toggle > summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border-radius: var(--mf-r); background: #fff; box-shadow: inset 0 0 0 1px #cfd5e3; list-style: none; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--mf-ink); }
.ma-guides:not(#ma-film) .chapter details.ma-films-toggle > summary:hover { box-shadow: inset 0 0 0 1px var(--mf-ink); }
.ma-guides:not(#ma-film) .chapter details.ma-films-toggle > summary::-webkit-details-marker { display: none; }
.ma-guides:not(#ma-film) .chapter details.ma-films-toggle > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.ma-guides:not(#ma-film) .chapter details.ma-films-toggle[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.ma-guides:not(#ma-film) details.ma-films-toggle .ma-films-hide, .ma-guides:not(#ma-film) details.ma-films-toggle[open] .ma-films-show { display: none; }
.ma-guides:not(#ma-film) details.ma-films-toggle[open] .ma-films-hide { display: inline; }
/* Browsers without :has show every card, so the control has nothing to do there. */
@supports not selector(:has(*)) { .ma-guides:not(#ma-film) details.ma-films-toggle { display: none; } }
.ma-guides:not(#ma-film) .chapter ul.ma-film-cards > li { margin: 0; padding: 0; min-width: 0; list-style: none; }
.ma-guides:not(#ma-film) .chapter ul.ma-film-cards > li::before { content: none; display: none; }
.ma-guides:not(#ma-film) .chapter .ma-film-card > a { display: flex; flex-direction: column; height: 100%; border-radius: var(--mf-r); overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--mf-line); color: var(--mf-body) !important; font-weight: 400; text-decoration: none !important; transition: box-shadow .25s ease; }
.ma-guides:not(#ma-film) .chapter .ma-film-card > a:hover { box-shadow: 0 0 0 1px #c9cfe0, 0 18px 40px -28px rgba(26,43,72,.45); }
.ma-guides:not(#ma-film) .chapter .ma-film-card > a:hover img { transform: scale(1.03); }
.ma-guides:not(#ma-film) .chapter .ma-film-card > a:hover .ma-film-play { transform: scale(1.08); }
.ma-guides:not(#ma-film) .ma-film-card-copy { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 18px; }
.ma-guides:not(#ma-film) .ma-film-card-title { font-size: 16px; font-weight: 650; line-height: 1.4; letter-spacing: -.01em; color: var(--mf-ink); }
.ma-guides:not(#ma-film) .ma-film-card-summary { font-size: 14px; line-height: 1.55; color: var(--mf-muted); }
.ma-guides:not(#ma-film) .ma-film-cards:not(.ma-film-cards-single) .ma-film-card-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* One film: a wide card, picture beside the words. */
.ma-guides:not(#ma-film) .chapter ul.ma-film-cards-single { grid-template-columns: minmax(0, 1fr); }
.ma-guides:not(#ma-film) .chapter .ma-film-cards-single .ma-film-card > a { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); align-items: center; }
.ma-guides:not(#ma-film) .ma-film-cards-single .ma-film-card-copy { gap: 8px; padding: 20px 28px; }
.ma-guides:not(#ma-film) .ma-film-cards-single .ma-film-card-title { font-size: 19px; line-height: 1.35; }
.ma-guides:not(#ma-film) .ma-film-cards-single .ma-film-card-summary { font-size: 15px; }
@media (max-width: 599px) {
  /* Phones: a tidy list, small picture beside the title; the one-film card stacks. */
  .ma-guides:not(#ma-film) .chapter ul.ma-film-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 20px; }
  .ma-guides:not(#ma-film) .chapter ul.ma-film-cards:not(.ma-film-cards-single) .ma-film-card > a { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: center; }
  .ma-guides:not(#ma-film) .ma-film-cards:not(.ma-film-cards-single) .ma-film-card-copy { gap: 2px; padding: 10px 14px; }
  .ma-guides:not(#ma-film) .ma-film-cards:not(.ma-film-cards-single) .ma-film-card-title { font-size: 15px; line-height: 1.35; }
  .ma-guides:not(#ma-film) .ma-film-cards:not(.ma-film-cards-single) .ma-film-card-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.45; }
  .ma-guides:not(#ma-film) .ma-film-cards:not(.ma-film-cards-single) .ma-film-play { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
  .ma-guides:not(#ma-film) .ma-film-cards:not(.ma-film-cards-single) .ma-film-play::after { left: 13px; top: 10px; border-width: 6px 0 6px 10px; }
  .ma-guides:not(#ma-film) .ma-film-cards:not(.ma-film-cards-single) .ma-film-duration { right: 4px; bottom: 4px; padding: 0 5px; font-size: 11px; }
  .ma-guides:not(#ma-film) .chapter .ma-film-cards-single .ma-film-card > a { display: flex; align-items: stretch; }
  .ma-guides:not(#ma-film) .ma-film-cards-single .ma-film-card-copy { padding: 16px 18px 20px; }
  .ma-guides:not(#ma-film) .ma-film-cards-single .ma-film-card-title { font-size: 17px; }
  .ma-guides:not(#ma-film) .chapter .ma-films-playall { width: 100%; justify-content: center; }
  .ma-guides:not(#ma-film) .chapter details.ma-films-toggle > summary { display: flex; justify-content: center; }
}

/* ---------- Film page: hero, player and chapters ---------- */
.ma-guides:not(#ma-film) .meta-row a.ma-film-guide-link { color: var(--mf-ink) !important; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(91,79,214,.45); text-underline-offset: 4px; }
.ma-guides:not(#ma-film).ma-guide-film .chapter > .ma-film-intro { margin-top: 0; }
.ma-guides:not(#ma-film).ma-guide-film .ma-film-byline { margin: 14px 0 0; font-size: 15px; line-height: 1.55; font-style: italic; color: var(--mf-muted); }
.ma-guides:not(#ma-film) .ma-film-stage { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; margin: 40px 0 0; }
.ma-guides:not(#ma-film) .ma-film-player { margin: 0; min-width: 0; }
.ma-guides:not(#ma-film) .ma-film-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--mf-r); overflow: hidden; background: #0f182c; box-shadow: var(--mf-lift); }
.ma-guides:not(#ma-film) .ma-film-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ma-guides:not(#ma-film) .ma-film-player figcaption { margin: 12px 0 0; padding: 0; font-size: 14px; line-height: 1.55; color: var(--mf-muted); }
.ma-guides:not(#ma-film) .ma-film-player figcaption a { color: var(--mf-ink) !important; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(91,79,214,.45); text-underline-offset: 3px; }
.ma-guides:not(#ma-film) .ma-film-chapters { margin: 0; padding: 18px 10px 10px; border-radius: var(--mf-r); background: var(--mf-ground); box-shadow: inset 0 0 0 1px var(--mf-line); }
.ma-guides:not(#ma-film) .ma-film-chapters h2 { margin: 0 10px 10px; font-size: 14px !important; line-height: 1.4; letter-spacing: 0; font-weight: 650; color: var(--mf-ink); }
.ma-guides:not(#ma-film) .ma-film-chapters ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ma-guides:not(#ma-film) .ma-film-chapters li { margin: 0; padding: 0; list-style: none; }
.ma-guides:not(#ma-film) .ma-film-chapters li::before { content: none; display: none; }
.ma-guides:not(#ma-film) .ma-film-chapters a { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 8px 10px; border-radius: 8px; color: var(--mf-body) !important; font-size: 15px; font-weight: 400; line-height: 1.45; text-decoration: none !important; transition: background .2s ease, box-shadow .2s ease; }
.ma-guides:not(#ma-film) .ma-film-chapters a:hover { background: #fff; box-shadow: 0 0 0 1px var(--mf-line); color: var(--mf-ink) !important; }
.ma-guides:not(#ma-film) .ma-film-time { font-size: 14px; font-weight: 650; color: var(--mf-lv); font-variant-numeric: tabular-nums; }

/* ---------- Film page: the content page design places hero children on its grid ---------- */
/* A film has no cover figure beside the heading, so its heading uses the full width. */
body.ma-cp-guide .content > .entry:has(.ma-guide-film) { grid-template-columns: minmax(0, 1fr); }
body.ma-cp-guide.ma-cp .ma-guides.ma-guide-film .hero-copy > .ma-film-byline { grid-column: 1; grid-row: 3; margin: 16px 0 0; }
body.ma-cp-guide.ma-cp .ma-guides.ma-guide-film .hero-copy > .meta-row { grid-row: 4; margin-top: 12px; }
body.ma-cp-guide.ma-cp .ma-guides.ma-guide-film .frame > .ma-film-stage { grid-column: 1 / -1; grid-row: 5; margin-top: 36px; }
body.ma-cp-guide.ma-cp .ma-guides.ma-guide-film .reading-layout { grid-column: 1 / -1; grid-row: 6; margin-top: var(--cp-s6, 64px) !important; }

/* ---------- Film page: content blocks ---------- */
.ma-guides:not(#ma-film) .film-glance-title { margin: 0; }
.ma-guides:not(#ma-film) .chapter details.film-answer { margin-top: 20px; border: 0; border-radius: var(--mf-r); background: #fff; box-shadow: 0 0 0 1px var(--mf-line); }
.ma-guides:not(#ma-film) .chapter details.film-answer > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 12px 20px; list-style: none; cursor: pointer; font-weight: 600; color: var(--mf-ink); }
.ma-guides:not(#ma-film) .chapter details.film-answer > summary::-webkit-details-marker { display: none; }
.ma-guides:not(#ma-film) .chapter :is(details.film-answer, details.film-faq) > summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--cp-soft, #7a83a8); border-bottom: 2px solid var(--cp-soft, #7a83a8); transform: translateY(-3px) rotate(45deg); transition: transform .3s ease; }
.ma-guides:not(#ma-film) .chapter :is(details.film-answer, details.film-faq)[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.ma-guides:not(#ma-film) .chapter details.film-answer[open] > summary { background: var(--mf-lv-t); border-radius: var(--mf-r) var(--mf-r) 0 0; }
.ma-guides:not(#ma-film) .chapter .film-answer-body { margin: 0; padding: 4px 20px 20px; }
.ma-guides:not(#ma-film) .chapter .film-answer-body > * + * { margin-top: 12px; }
.ma-guides:not(#ma-film) .chapter .film-faq-list { margin-top: 20px; border-bottom: 1px solid var(--mf-line); }
.ma-guides:not(#ma-film) .chapter .film-faq-list > * + * { margin-top: 0; }
.ma-guides:not(#ma-film) .chapter details.film-faq > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; list-style: none; cursor: pointer; font-size: 17px; font-weight: 600; line-height: 1.5; color: var(--mf-ink); }
.ma-guides:not(#ma-film) .chapter details.film-faq > summary::-webkit-details-marker { display: none; }
.ma-guides:not(#ma-film) .chapter .film-faq-answer { margin: 0; padding: 0 0 18px; }
.ma-guides:not(#ma-film) .chapter .film-transcript p { font-size: 16px; line-height: 1.75; color: var(--mf-body); }
.ma-guides:not(#ma-film) .chapter .film-closing { padding: var(--cp-s4, 32px); border-radius: var(--mf-r); background: var(--mf-ground); box-shadow: inset 0 0 0 1px var(--mf-line); }
.ma-guides:not(#ma-film) .chapter .film-closing h2 { font-size: 24px !important; }

/* ---------- Film page: more films and the way back to the guide ---------- */
.ma-guides:not(#ma-film) .chapter .ma-film-more { margin-top: var(--cp-s7, 72px); padding-top: 40px; border-top: 1px solid var(--mf-line); }
.ma-guides:not(#ma-film) .chapter .ma-film-more h2 { font-size: 24px !important; }
.ma-guides:not(#ma-film) .chapter .ma-film-more-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.ma-guides:not(#ma-film) .chapter .ma-film-more-row > * { margin: 0; }
.ma-guides:not(#ma-film) .chapter a.ma-film-tile { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 18px 44px 20px 20px; border-radius: var(--mf-r); background: #fff; box-shadow: 0 0 0 1px var(--mf-line); color: var(--mf-body) !important; font-weight: 400; text-decoration: none !important; transition: box-shadow .25s ease; }
.ma-guides:not(#ma-film) .chapter a.ma-film-tile:hover { box-shadow: 0 0 0 1px #c9cfe0, 0 18px 40px -28px rgba(26,43,72,.45); }
.ma-guides:not(#ma-film) .chapter a.ma-film-tile::after { content: ""; position: absolute; right: 20px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-right: 2px solid var(--mf-lv); border-top: 2px solid var(--mf-lv); transform: rotate(45deg); transition: transform .25s ease; }
.ma-guides:not(#ma-film) .chapter a.ma-film-tile:hover::after { transform: translateX(3px) rotate(45deg); }
.ma-guides:not(#ma-film) .chapter a.ma-film-tile-link { background: linear-gradient(150deg, var(--cp-t-sky, #eaf3ff), #f6f3ff 70%); box-shadow: none; }
.ma-guides:not(#ma-film) .chapter a.ma-film-tile-film { display: grid; grid-template-columns: 148px minmax(0, 1fr); align-items: center; gap: 16px; padding: 12px 44px 12px 12px; }
.ma-guides:not(#ma-film) .ma-film-tile-film .ma-film-thumb { border-radius: 8px; }
.ma-guides:not(#ma-film) .ma-film-tile-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ma-guides:not(#ma-film) .ma-film-tile-kicker { font-size: 13px; font-weight: 650; line-height: 1.4; color: var(--mf-lv); }
.ma-guides:not(#ma-film) .ma-film-tile-title { font-size: 17px; font-weight: 650; line-height: 1.4; letter-spacing: -.01em; color: var(--mf-ink); }
.ma-guides:not(#ma-film) .ma-film-tile-note { font-size: 14px; line-height: 1.5; color: var(--mf-muted); }

@media (max-width: 1024px) {
  .ma-guides:not(#ma-film) .ma-film-stage { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ma-guides:not(#ma-film) .ma-film-chapters ol { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 599px) {
  .ma-guides:not(#ma-film) .ma-film-stage { margin-top: 28px; }
  body.ma-cp-guide.ma-cp .ma-guides.ma-guide-film .frame > .ma-film-stage { margin-top: 28px; }
  body.ma-cp-guide.ma-cp .ma-guides.ma-guide-film .reading-layout { margin-top: 40px !important; }
  .ma-guides:not(#ma-film) .ma-film-frame { border-radius: 10px; }
  .ma-guides:not(#ma-film) .ma-film-chapters { padding: 14px 6px 6px; }
  .ma-guides:not(#ma-film) .ma-film-chapters a { font-size: 15px; padding: 9px 10px; }
  .ma-guides:not(#ma-film) .chapter .ma-film-more-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ma-guides:not(#ma-film) .chapter a.ma-film-tile-film { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
  .ma-guides:not(#ma-film) .chapter .film-closing { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ma-guides:not(#ma-film) :is(.ma-film-thumb img, .ma-film-play, a.ma-film-tile::after) { transition: none; }
}
