/* Perdix flight school and challenges pages (body.pf.pl), on top of site.css, perdix.css and perdix-film.css.
   Base rules work without JavaScript: every step, series and challenge readable, stacked.
   html.pl-js: tabs and the challenge picker; html.pl-motion: the lesson pinned and driven by the scroll. */

.pl { --pl-ok: #3ccf6e; --pl-amber: #f2a33a; --pl-gold: #e2b23c; --pl-silver: #b9c2cc; --pl-bronze: #c3804f; --pl-zone: 76, 141, 224; }
html[data-theme="light"] .pl { --pl-ok: #1f8a46; --pl-amber: #b86a00; --pl-gold: #a97c0c; --pl-silver: #75808c; --pl-bronze: #9a5a2c; }
.pl main { overflow-x: clip; }
.pl-wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--pf-gut); }
.pl [data-off] { display: none; }
html:not(.pl-js) .pl [data-off] { display: block; }
.pl-dim { color: var(--muted); }
.pl h2 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.04; }
.pl h3 { font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.pl-intro { max-width: 760px; margin: 0 auto; text-align: center; }
.pl-intro p { margin-top: 16px; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.45; color: var(--text-2); }
.pl-intro--left { margin: 0; text-align: left; }
.pl-band { background: var(--bg-alt); }
.pl section { scroll-margin-top: 64px; }

/* ---------- Hero: the game picture, the name and one line ---------- */
.pl-hero { position: relative; background: #000; color: #f5f5f7; height: min(78svh, 760px); min-height: 440px; display: flex; align-items: flex-end; overflow: hidden; }
.pl-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pl-hero__shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .3) 42%, transparent 70%); }
.pl-hero__text { position: relative; width: 100%; padding-top: min(30vh, 260px); padding-bottom: clamp(32px, 7vh, 72px); }
.pl-hero h1 { font-size: clamp(56px, 10vw, 148px); line-height: .92; letter-spacing: -.05em; }
.pl-hero p { margin-top: 18px; max-width: 34em; font-size: clamp(18px, 1.7vw, 24px); line-height: 1.35; font-weight: 500; color: #e8e8ed; text-shadow: 0 1px 20px rgba(0, 0, 0, .5); }
@media (max-width: 700px) { .pl-hero { height: min(72svh, 640px); } .pl-hero__img { object-position: 42% 50%; } }

/* ---------- A lesson, step by step ---------- */
.pl-follow { padding: clamp(72px, 11vh, 128px) 0 clamp(56px, 8vh, 96px); }
.pl-follow__stage { padding-top: 40px; }
.pl-follow__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); align-items: center; }
@media (max-width: 860px) { .pl-follow__grid { grid-template-columns: 1fr; gap: 18px; } }
.pl-map { margin: 0; }
/* Without the scroll-driven run (reduced motion, no JavaScript): every step stacked, the map held in view beside them. */
@media (min-width: 861px) {
  html:not(.pl-motion) .pl-follow__grid { align-items: start; }
  html:not(.pl-motion) .pl-map { position: sticky; top: 76px; }
}
.pl-map__box { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 9; background: #42522f; }
.pl-map__box img, .pl-map__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pl-map__box img { object-fit: cover; filter: saturate(.85) brightness(.82); }
.pl-runway { fill: rgba(255, 255, 255, .85); }
.pl-zone { fill: rgba(var(--pl-zone), .16); stroke: rgba(var(--pl-zone), .7); stroke-width: 1.4; vector-effect: non-scaling-stroke; transition: fill .4s, stroke .4s, opacity .4s; }
.pl-guide { stroke: #5bea86; stroke-width: 3; stroke-dasharray: 2 7; stroke-linecap: round; vector-effect: non-scaling-stroke; transition: opacity .4s; }
.pl-track { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 1.6; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.pl-pilot { fill: #f2a33a; stroke: #1a1206; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.pl-plane { fill: #fff; }
.pl-plane__halo { fill: rgba(255, 255, 255, .25); }
.pl-motion .pl-plane { transition: none; }
html:not(.pl-motion) .pl-plane { display: none; }
.pl-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.pl-legend span::before { content: ""; display: inline-block; vertical-align: -1px; width: 12px; height: 12px; margin-right: 7px; border-radius: 3px; }
.pl-legend__runway::before { background: rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 1px var(--line); }
.pl-legend__pilot::before { background: #f2a33a; border-radius: 50% !important; }
.pl-legend__zone::before { background: rgba(var(--pl-zone), .25); box-shadow: inset 0 0 0 1px rgba(var(--pl-zone), .8); }
.pl-legend__guide::before { width: 18px !important; height: 3px !important; background: repeating-linear-gradient(90deg, #3ccf6e 0 3px, transparent 3px 7px); vertical-align: 3px !important; }

.pl-panel { display: grid; gap: 22px; }
.pl-say { padding: 22px 24px; border-radius: 18px; background: var(--panel-bg); box-shadow: inset 0 0 0 1px var(--line), var(--panel-shadow); }
.pl-say__who, .pl-say__n { font-size: 14px; color: var(--muted); font-weight: 500; }
.pl-say__line { margin-top: 8px; font-size: clamp(21px, 2vw, 27px); line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
.pl-say__go { color: var(--pl-ok); }
.pl-say__judged { margin-top: 14px; font-size: 15px; line-height: 1.45; color: var(--text-2); }
.pl-say__judged span { display: block; font-size: 13px; color: var(--muted); }
.pl-say__praise { margin-top: 12px; font-weight: 600; color: var(--pl-ok); }
.pl-say__done { font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; letter-spacing: -.03em; }
.pl-say__stars { margin-top: 6px; font-size: 28px; letter-spacing: .12em; color: var(--pl-gold); }

/* The scroll-driven lesson: the stage sticks while the section scrolls by; one instruction at a time. */
.pl-motion .pl-follow__run { height: calc(var(--pl-phases, 6) * 60vh + 100vh); }
.pl-motion .pl-follow__stage { position: sticky; top: 52px; min-height: calc(100svh - 52px); display: flex; align-items: center; padding: 16px 0; }
.pl-motion .pl-follow__grid { width: 100%; }
.pl-motion .pl-panel { display: grid; grid-template-areas: "p"; align-items: start; }
.pl-motion .pl-say { grid-area: p; opacity: 0; transform: translateY(14px); transition: opacity .35s, transform .35s; pointer-events: none; }
.pl-motion .pl-say.is-on { opacity: 1; transform: none; pointer-events: auto; }
.pl-motion .pl-say__praise { opacity: 0; transition: opacity .3s; }
.pl-motion .pl-say.is-done .pl-say__praise { opacity: 1; }
.pl-motion .pl-zone { opacity: .35; }
.pl-motion .pl-zone.is-on { opacity: 1; fill: rgba(var(--pl-zone), .3); stroke: rgb(var(--pl-zone)); }
.pl-motion .pl-zone.is-past { opacity: .55; fill: rgba(60, 207, 110, .12); stroke: rgba(60, 207, 110, .6); }
.pl-motion .pl-guide { opacity: .25; }
.pl-motion .pl-guide.is-on { opacity: 1; }
@media (max-width: 860px) {
  .pl-motion .pl-follow__stage { align-items: flex-start; padding-top: 12px; }
  .pl-say { padding: 16px 18px; }
  .pl-say__line { font-size: 19px; }
  .pl-say__judged { font-size: 14px; margin-top: 10px; }
  .pl-legend { font-size: 13px; gap: 4px 14px; margin-top: 8px; }
  .pl-map__box { border-radius: 16px; }
}

/* ---------- Series ---------- */
.pl-series { padding: clamp(64px, 10vh, 120px) 0; }
.pl-tabs { margin: 32px 0 28px; gap: 2px; }
html:not(.pl-js) .pl-tabs { display: none; }
.pl-series__panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(20px, 3vw, 48px); align-items: start; }
html:not(.pl-js) .pl-series__panel + .pl-series__panel { margin-top: 64px; }
.pl-series__panel--noimg { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.pl-series__panel:focus-visible { outline: 2px solid var(--focus); outline-offset: 8px; border-radius: 8px; }
@media (max-width: 860px) { .pl-series__panel { grid-template-columns: 1fr; } }
.pl-series__img { margin: 0; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 9; background: #0b0e13; }
.pl-series__img img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 861px) { .pl-series__img { position: sticky; top: 76px; } }
.pl-series h3 { font-size: clamp(26px, 2.4vw, 34px); }
.pl-count { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.pl-meta { margin-top: 8px; color: var(--text-2); font-size: 16px; line-height: 1.45; }
.pl-lessons { margin-top: 18px; border-top: 1px solid var(--line); }
.pl-lesson { border-bottom: 1px solid var(--line); }
.pl-lesson summary { list-style: none; cursor: pointer; padding: 14px 32px 14px 0; position: relative; display: grid; gap: 3px; }
.pl-lesson summary::-webkit-details-marker { display: none; }
.pl-lesson summary::after { content: ""; position: absolute; right: 6px; top: 22px; width: 9px; height: 9px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.pl-lesson[open] summary::after { transform: translateY(4px) rotate(-135deg); }
.pl-lesson summary:hover .pl-lesson__t { color: var(--px-acc); }
.pl-lesson__t { font-weight: 600; font-size: 18px; }
.pl-lesson__s { color: var(--text-2); font-size: 15.5px; line-height: 1.45; }
.pl-lesson__where { color: var(--muted); font-size: 14px; }
.pl-steps { list-style: none; margin: 0 0 16px; padding: 0 0 0 16px; border-left: 2px solid rgba(var(--pl-zone), .5); display: grid; gap: 8px; }
.pl-steps li { font-size: 15.5px; line-height: 1.45; }

/* ---------- The instructor ---------- */
.pl-buddy { padding: clamp(64px, 10vh, 120px) 0; }
.pl-buddy__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
@media (max-width: 860px) { .pl-buddy__grid { grid-template-columns: 1fr; } }
.pl-buddy__text p { margin-top: 16px; font-size: 17px; line-height: 1.55; color: var(--text-2); }
.pl-buddy__text p.pl-quote { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.4; color: var(--text); font-weight: 500; }
.pl-sim { padding: 24px; border-radius: 22px; background: #000; color: #f5f5f7; --line: rgba(255, 255, 255, .14); --text: #f5f5f7; --muted: #a1a1a6; }
.pl-sim .pf-tabs { justify-content: flex-start; }
.pl-sim__screen { position: relative; height: 128px; margin: 22px 0 18px; border-radius: 14px; background: radial-gradient(120% 140% at 50% 0%, #1d2a3a 0%, #0b0e13 70%); display: grid; place-items: center; text-align: center; overflow: hidden; }
.pl-call { position: absolute; padding: 0 16px; font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; letter-spacing: -.02em; opacity: 0; transform: scale(.96); transition: opacity .25s, transform .25s; }
.pl-call--warn { color: #f2a33a; }
.pl-call--take { color: #fff; }
.pl-call--off { color: #a1a1a6; font-size: 20px; font-weight: 500; }
.pl-sim[data-show="warn"] .pl-call--warn, .pl-sim[data-show="take"] .pl-call--take, .pl-sim[data-show="off"] .pl-call--off { opacity: 1; transform: none; }
.pl-sim__rail { position: relative; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .14); margin: 40px 0 0; }
.pl-sim__fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--fill, 0%); border-radius: 3px; background: linear-gradient(90deg, #f2a33a, #ff6b4a); }
.pl-sim__mark { position: absolute; bottom: 14px; transform: translateX(-50%); font-size: 13px; color: #c7c7cc; white-space: nowrap; text-align: center; }
.pl-sim__mark b { display: block; font-size: 15px; color: #fff; }
.pl-sim__mark--warn { left: 0; transform: none; text-align: left; }
.pl-sim__mark--take { left: var(--take, 40%); transition: left .4s; }
.pl-sim__mark::after { content: ""; position: absolute; left: 50%; bottom: -14px; width: 2px; height: 10px; background: currentColor; }
.pl-sim__mark--warn::after { left: 1px; }
.pl-sim[data-level="off"] .pl-sim__mark--take { opacity: 0; }
.pl-sim__axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: #8e8e93; font-variant-numeric: tabular-nums; }
.pl-sim__again { margin-top: 14px; font-size: 15px; color: #6aa9ff; }
html:not(.pl-js) .pl-sim { display: none; }

/* ---------- Stars and medals ---------- */
.pl-stars { padding: clamp(64px, 10vh, 120px) 0; }
.pl-stars__row { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .pl-stars__row { grid-template-columns: 1fr; } }
.pl-star { padding: 24px; border-radius: 20px; background: var(--panel-bg); box-shadow: inset 0 0 0 1px var(--line), var(--panel-shadow); }
.pl-star__s { font-size: 30px; letter-spacing: .1em; color: var(--pl-gold); }
.pl-star h3 { margin-top: 10px; }
.pl-star p:last-child { margin-top: 8px; color: var(--text-2); font-size: 16px; line-height: 1.5; }
.pl-rides { margin-top: 48px; max-width: 760px; }
.pl-rides p { margin-top: 10px; color: var(--text-2); font-size: 17px; line-height: 1.55; }
.pl-medals { list-style: none; padding: 0; margin: 20px 0 0; display: flex; gap: 12px; flex-wrap: wrap; }
.pl-m { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pl-m::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .3), inset 0 -4px 0 rgba(0, 0, 0, .15); }
.pl-m--gold { --c: var(--pl-gold); } .pl-m--silver { --c: var(--pl-silver); } .pl-m--bronze { --c: var(--pl-bronze); }

/* ---------- Next page ---------- */
.pl-next { padding: clamp(64px, 10vh, 112px) 0; text-align: center; }
.pl-next__in { max-width: 760px; }
.pl-next p { margin-top: 14px; font-size: 19px; line-height: 1.45; color: var(--text-2); }
.pl-next__acts { margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Challenges: the picker and the card ---------- */
.pl-ch { padding: clamp(64px, 10vh, 120px) 0; }
.pl-ch__bar { margin: 28px 0 24px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.pl-ch__bar .pf-tabs { justify-content: flex-start; }
html:not(.pl-js) .pl-ch__bar { display: none; }
.pl-pick select {
  font: 500 16px/1.2 var(--px-body); color: var(--text); background: var(--panel-bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 38px 11px 14px; max-width: 100%; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.pl-pick { flex: 1 1 260px; max-width: 420px; }
.pl-pick select { width: 100%; }
.pl-ch__grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
.pl-list { list-style: none; margin: 0; padding: 0; position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.pl-list__g + .pl-list__g { margin-top: 14px; }
.pl-list__g > p { font-size: 13px; color: var(--muted); padding: 0 12px 4px; }
.pl-list ul { list-style: none; margin: 0; padding: 0; }
.pl-list button { width: 100%; text-align: left; border: 0; background: none; color: var(--text); cursor: pointer; padding: 8px 12px; border-radius: 10px; font: inherit; display: grid; }
.pl-list button span { font-weight: 500; font-size: 16px; }
.pl-list button small { font-size: 13px; color: var(--muted); }
.pl-list button:hover { background: var(--bg-raised); }
.pl-list button[aria-pressed="true"] { background: var(--px-fill); color: #fff; }
.pl-list button[aria-pressed="true"] small { color: rgba(255, 255, 255, .78); }
@media (min-width: 861px) { .pl-pick { display: none; } }
@media (max-width: 860px) {
  .pl-ch__grid { grid-template-columns: 1fr; }
  .pl-list { display: none; }
}
html:not(.pl-js) .pl-list { display: none; }
html:not(.pl-js) .pl-ch__grid { grid-template-columns: 1fr; }
html:not(.pl-js) .pl-card + .pl-card { margin-top: 40px; }
.pl-card { border-radius: 24px; overflow: hidden; background: var(--panel-bg); box-shadow: inset 0 0 0 1px var(--line), var(--panel-shadow); }
.pl-card.is-in { animation: pl-in .35s ease-out; }
@keyframes pl-in { from { opacity: 0; transform: translateY(8px); } }
.pl-card__img { margin: 0; aspect-ratio: 21 / 9; background: #0b0e13; }
.pl-card__img img { width: 100%; height: 100%; object-fit: cover; }
.pl-card__body { padding: clamp(20px, 3vw, 36px); }
.pl-card h3 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -.035em; }
.pl-facts { margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 40%), 1fr)); gap: 16px 24px; }
.pl-facts dt { font-size: 13px; color: var(--muted); }
.pl-facts dd { margin: 2px 0 0; font-size: 16px; line-height: 1.4; }

/* The medal ruler: one per level, the section's data-level picks which. */
.pl-r { margin-top: 18px; }
.pl-ch[data-level="easy"] .pl-r:not([data-level="easy"]), .pl-ch[data-level="std"] .pl-r:not([data-level="std"]), .pl-ch[data-level="hard"] .pl-r:not([data-level="hard"]) { display: none; }
.pl-r__better { font-size: 14px; color: var(--muted); }
.pl-r__bar { position: relative; height: 8px; margin-top: 64px; border-radius: 4px; background: var(--line); }
.pl-r__marks { list-style: none; margin: 0; padding: 0; position: relative; height: 0; }
.pl-r__m { position: absolute; left: var(--x); bottom: 0; transform: translateX(-50%); text-align: center; white-space: nowrap; transition: left .45s cubic-bezier(.3, .7, .2, 1); }
.pl-r__m::before { content: ""; position: absolute; left: 50%; bottom: -1px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--panel-bg); transform: translateY(13px); }
.pl-r__m span { display: block; font-size: 12px; color: var(--muted); }
.pl-r__m b { display: block; padding-bottom: 18px; font-size: 16px; font-variant-numeric: tabular-nums; }
.pl-r__m--gold { --c: var(--pl-gold); } .pl-r__m--silver { --c: var(--pl-silver); } .pl-r__m--bronze { --c: var(--pl-bronze); }
/* Silver sits between: on a phone its label goes under the bar so the three never overlap. */
.pl-r__m--silver { top: 0; bottom: auto; }
.pl-r__m--silver::before { bottom: auto; top: -13px; transform: none; }
.pl-r__m--silver span { margin-top: 18px; }
.pl-r__m--silver b { padding: 0; }
.pl-r__ticks { position: relative; height: 18px; margin-top: 52px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pl-r__ticks span { position: absolute; left: var(--x); transform: translateX(-50%); white-space: nowrap; }
.pl-r__ticks span:first-child { transform: none; }
.pl-r__ticks span:last-child { transform: translateX(-100%); }
.pl-r__bar i { position: absolute; inset: 0; border-radius: 4px; background: linear-gradient(90deg, rgba(var(--pl-zone), .15), rgba(var(--pl-zone), .55)); }
.pl-r--rev .pl-r__bar i { background: linear-gradient(90deg, rgba(var(--pl-zone), .55), rgba(var(--pl-zone), .15)); }

/* ---------- Ghost, levels, scoring ---------- */
.pl-ghost { padding: clamp(64px, 10vh, 120px) 0; }
.pl-ghost__in { max-width: 1240px; }
.pl-ghost p { margin-top: 16px; font-size: 17px; line-height: 1.55; color: var(--text-2); max-width: 720px; }
.pl-ghost p.pl-big { font-size: clamp(20px, 2vw, 27px); line-height: 1.4; color: var(--text); font-weight: 500; letter-spacing: -.015em; }
.pl-levels-sec { padding: clamp(64px, 10vh, 120px) 0; }
.pl-table { margin-top: 28px; overflow-x: auto; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); }
.pl-table table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15.5px; line-height: 1.4; }
.pl-table th, .pl-table td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.pl-table tbody tr:last-child > * { border-bottom: 0; }
.pl-table thead th { font-size: 17px; font-weight: 700; }
.pl-table tbody th { font-weight: 500; color: var(--text-2); width: 24%; }
.pl-levels-sec .pl-dim { margin-top: 18px; max-width: 760px; font-size: 15.5px; line-height: 1.5; }
.pl-score { padding: clamp(64px, 10vh, 120px) 0; }
.pl-score__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; }
@media (max-width: 860px) { .pl-score__grid { grid-template-columns: 1fr; } }
.pl-score__list { margin: 0; display: grid; gap: 22px; }
.pl-score__list dt { font-weight: 600; font-size: 18px; }
.pl-score__list dd { margin: 4px 0 0; color: var(--text-2); font-size: 16.5px; line-height: 1.5; }
.pl-lb { margin-top: 64px; max-width: 760px; }
.pl-lb h2 { font-size: clamp(28px, 3vw, 40px); }
.pl-lb p { margin-top: 12px; color: var(--text-2); font-size: 17px; line-height: 1.55; }

/* ---------- Sign-up at the end: a dark block in both themes, as on /perdix/ ---------- */
.pl-end {
  --text: #f5f5f7; --text-2: #d2d2d7; --muted: #9a9ea6; --line: rgba(255, 255, 255, .14);
  background: #000; color: var(--text); padding: clamp(72px, 12vh, 140px) 0; text-align: center;
}
.pl-end__in { display: flex; flex-direction: column; align-items: center; }
.pl-end h2 { font-size: clamp(40px, 6.4vw, 88px); line-height: 1; letter-spacing: -.05em; }
.pl-end__price { margin-top: 10px; font-size: clamp(19px, 1.8vw, 26px); font-weight: 500; color: var(--text-2); letter-spacing: -.02em; }
.pl-end .px-status { margin-top: 18px; background: rgba(255, 255, 255, .08); }
.pl-end__note { margin-top: 14px; max-width: 32em; color: var(--muted); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .pl-card.is-in { animation: none; }
  .pl-r__m, .pl-sim__mark--take, .pl-call { transition: none; }
}

/* ---------- A course from above: the game's view of the map, the gates in order ---------- */
.pl-plan { margin: 0; }
.pl-plan__box { position: relative; aspect-ratio: 16 / 10; background: #0b0e13; overflow: hidden; }
.pl-plan--plain .pl-plan__box {
  background: #10161e radial-gradient(circle at 50% 45%, #18222e 0%, #0b0e13 75%);
}
.pl-plan__box img, .pl-plan__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pl-plan__box img { object-fit: cover; filter: saturate(.9) brightness(.86); }
.pl-plan__line { fill: none; stroke: rgba(255, 255, 255, .8); stroke-dasharray: 1 .9; stroke-dasharray: 2.2% 1.6%; stroke-linejoin: round; }
.pl-gate circle { fill: #0b0e13; stroke: #fff; stroke-width: 1.6px; vector-effect: non-scaling-stroke; }
.pl-gate text { fill: #fff; font-weight: 700; text-anchor: middle; font-family: var(--px-body); }
.pl-gate--start circle { fill: var(--px-cta, #f2a33a); stroke: #1a1206; }
.pl-gate--start text { fill: #1a1206; }
.pl-scale line { stroke: #fff; stroke-width: 2px; vector-effect: non-scaling-stroke; }
.pl-scale text { fill: #fff; font-family: var(--px-body); font-weight: 500; }
.pl-plan figcaption { padding: 12px clamp(20px, 3vw, 36px) 0; font-size: 14px; color: var(--muted); }

/* Tabs in the sections that follow the theme (the slideshow's .pf-tabs are made for its black film). */
.pl .pl-tabs, .pl .pl-levels { background: var(--bg-raised); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
.pl .pl-tabs button, .pl .pl-levels button { color: var(--text-2); }
.pl .pl-tabs button:hover, .pl .pl-levels button:hover { color: var(--text); }
.pl .pl-tabs button[aria-selected="true"], .pl .pl-levels button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.pl .pl-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; display: inline-flex; }
.pl .pl-tabs::-webkit-scrollbar { display: none; }

/* The levels table on a phone: one block per row, each level labelled. */
@media (max-width: 700px) {
  .pl-table { box-shadow: none; border-radius: 0; overflow: visible; }
  .pl-table table { min-width: 0; }
  .pl-table thead { display: none; }
  .pl-table tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .pl-table th, .pl-table td { display: block; padding: 3px 0; border: 0; }
  .pl-table tbody th { width: auto; font-weight: 600; color: var(--text); margin-bottom: 4px; }
  .pl-table td::before { content: attr(data-label) "\00a0: "; color: var(--muted); }
  html[lang="en"] .pl-table td::before { content: attr(data-label) ": "; }
}

/* ---------- The lesson filmed by the game, the club's plan as an inset ---------- */
.pl-seq { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #3d4b2c; }
.pl-seq__still, .pl-seq canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pl-seq canvas { opacity: 0; transition: opacity .4s; }
.pl-seq.is-live canvas { opacity: 1; }
.pl-seq .pl-map { position: absolute; left: 12px; bottom: 12px; width: 36%; }
.pl-seq .pl-map__box { border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35), 0 8px 24px rgba(0, 0, 0, .35); }
.pl-seq .pl-guide { stroke-width: 2; }
.pl-legend { margin-top: 12px; }
@media (max-width: 860px) {
  .pl-seq { aspect-ratio: 5 / 4; border-radius: 16px; }
  .pl-seq .pl-map { left: auto; right: 8px; bottom: auto; top: 8px; width: 42%; }
  .pl-seq .pl-map__box { border-radius: 9px; }
}
/* A screen of the game, with its caption */
.pl-shot { margin: 28px 0 0; }
.pl-shot img { width: 100%; height: auto; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); }
.pl-shot figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
@media (min-width: 861px) {
  .pl-follow .pl-follow__grid { max-width: 1440px; grid-template-columns: minmax(0, 2.1fr) minmax(300px, 1fr); }
}

/* The instructor's timeline with the game's own warning and takeover screens */
.pl-sim__screen--game { height: auto; aspect-ratio: 16 / 9; background: #0b0e13; }
.pl-sim__screen--game img.pl-call { inset: 0; width: 100%; height: 100%; object-fit: cover; padding: 0; }
.pl-sim__cap { margin-top: -8px; font-size: 13px; line-height: 1.4; color: #a1a1a6; }
.pl-sim__cap + .pl-sim__rail { margin-top: 58px; }
.pl-card__shot { margin: 28px 0 0; }
.pl-card__shot img { width: 100%; height: auto; border-radius: 14px; }

/* The instructor's demo is a dark block in both themes: its level buttons keep fixed colours (audit v26). */
.pl .pl-sim .pf-tabs { background: rgba(40, 40, 44, .72); box-shadow: none; }
.pl .pl-sim .pf-tabs button { background: transparent; color: #c7c7cc; }
.pl .pl-sim .pf-tabs button:hover { color: #fff; }
.pl .pl-sim .pf-tabs button[aria-pressed="true"] { background: #f5f5f7; color: #000; }
/* Contrast on the dark panels (audit p15): the accent lighter, the small line on the blue button whiter. */
html.perdix:not([data-theme="light"]) .pl { --px-acc: #64a0ec; --focus: #64a0ec; }
.pl-list button[aria-pressed="true"] small { color: rgba(255, 255, 255, .9); }
