.hl-figure {
  --w: 1440; --h: 900;                 
  --s: 0.5694;                         
  margin: 18px 0 22px; container-type: inline-size;
}
.hl-frame {
  position: relative; overflow: hidden; margin: 0 auto;
  width: calc(var(--w) * var(--s) * 1px); max-width: 100%;
  aspect-ratio: var(--w) / var(--h);
  border-radius: var(--r-md, 14px);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--shell-ring), var(--ambient);
}
.hl-frame iframe {
  position: absolute; top: 0; left: 0; border: 0; display: block;
  width: calc(var(--w) * 1px); height: calc(var(--h) * 1px);
  transform: scale(var(--s)); transform-origin: 0 0;
  background: var(--bg); pointer-events: none;
}

@media (max-width: 867px) { .hl-figure { --s: 0.45; } }
@media (max-width: 700px) { .hl-figure { --s: 0.36; } }
@media (max-width: 560px) { .hl-figure { --s: 0.28; } }
@media (max-width: 440px) { .hl-figure { --s: 0.22; } }

@supports (scale: calc(10px / 5px)) {
  .hl-figure { --s: calc(min(100cqw, var(--w) * 1px) / (var(--w) * 1px)); }
}

.hl-figure[data-fixed] .hl-frame, .hl-figure[data-fixed] .hl-bar { max-width: none; }

.hl-bar { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; margin: 0 auto; border-radius: var(--r-md, 14px) var(--r-md, 14px) 0 0;
  width: calc(var(--w) * var(--s) * 1px); max-width: 100%;
  background: var(--core-2); box-shadow: inset 0 0 0 1px var(--hair); font: 500 11.5px/1 var(--mono); color: var(--ink-3); }
.hl-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--hair-strong); }
.hl-bar span { margin-left: 8px; }
.hl-bar + .hl-frame { border-top-left-radius: 0; border-top-right-radius: 0; }

.hl-caption { margin-top: 12px; font-size: 15px; line-height: 1.55; color: var(--ink-1); }
.hl-caption .hl-num, .hl-steps .hl-num {
  display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; vertical-align: 1px;
  border-radius: 50%; background: var(--accent); color: var(--core); font: 600 12px/1 var(--font);
}
.hl-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.hl-steps li { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.hl-steps li.is-on, .hl-steps li[data-final] { color: var(--ink-1); }

.hl-live .hl-steps li { display: none; }
.hl-live .hl-steps li.is-on { display: block; color: var(--ink-1); }
.hl-ctl { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.hl-ctl button {
  font: inherit; font-size: 13px; color: var(--ink-2); background: var(--shell); border: 0; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--shell-ring); border-radius: 999px; padding: 6px 12px;
}
.hl-ctl button:hover { color: var(--ink-1); }
.hl-ctl button:focus-visible, .hl-dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hl-dots { display: inline-flex; gap: 6px; }
.hl-dots button { width: 26px; height: 26px; padding: 0; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 600; }
.hl-dots button[aria-current="step"] { background: var(--accent); color: var(--core); box-shadow: none; }
.hl-live .hl-frame { cursor: pointer; }

.hl-figure.hl-arrows { --hl-gut: 48px; padding-inline: var(--hl-gut); }
.hl-stage { position: relative; }
.hl-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; }
.hl-arrow:active { transform: translateY(-50%) scale(0.94); }
.hl-arrow-prev { left: calc(-1 * var(--hl-gut)); }
.hl-arrow-next { right: calc(-1 * var(--hl-gut)); }
.hl-arrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 560px) {
  .hl-figure.hl-arrows { --hl-gut: 0px; }
  .hl-stage { padding-bottom: 42px; }
  .hl-arrow { top: auto; bottom: 0; transform: none; width: 34px; height: 34px; font-size: 16px; }
  .hl-arrow:active { transform: scale(0.94); }
  .hl-arrow-prev { left: 0; }
  .hl-arrow-next { right: 0; }
}
.hl-live .hl-frame iframe { transition: opacity .25s ease; }

.hl-anchor { position: fixed; top: 0; left: 0; width: 0; height: 0; overflow: hidden; }
html.hl-doc, html.hl-doc body { overflow: hidden; }
html.hl-doc body::after { display: none; }   

:root:has([data-step="1"]:target) .p1 > :not(.p1):not(.t1),
:root:has([data-step="2"]:target) .p2 > :not(.p2):not(.t2),
:root:has([data-step="3"]:target) .p3 > :not(.p3):not(.t3),
:root:has([data-step="4"]:target) .p4 > :not(.p4):not(.t4) { opacity: 0.26; filter: saturate(0.25); }

:root:has([data-step="1"]:target) .r1,
:root:has([data-step="2"]:target) .r2,
:root:has([data-step="3"]:target) .r3,
:root:has([data-step="4"]:target) .r4 {
  position: relative; z-index: 3;
  box-shadow: 0 0 0 5px var(--accent), 0 0 0 14px var(--accent-wash) !important;
}
:root:has([data-step="1"]:target) .r1::after,
:root:has([data-step="2"]:target) .r2::after,
:root:has([data-step="3"]:target) .r3::after,
:root:has([data-step="4"]:target) .r4::after {
  content: attr(data-hl-mark); position: absolute; top: -22px; right: -22px; z-index: 4;
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: var(--core); font: 600 20px/1 var(--font); box-shadow: 0 0 0 4px var(--core);
}

:root:has([data-step="1"]:target) .r1c { background: var(--accent-wash); box-shadow: inset 4px 0 0 var(--accent), inset -4px 0 0 var(--accent); }
:root:has([data-step="1"]:target) .r1c-top { box-shadow: inset 4px 0 0 var(--accent), inset -4px 0 0 var(--accent), inset 0 4px 0 var(--accent); padding-top: 10px; }
:root:has([data-step="1"]:target) .r1c-end { box-shadow: inset 4px 0 0 var(--accent), inset -4px 0 0 var(--accent), inset 0 -4px 0 var(--accent); }
:root:has([data-step="1"]:target) .r1c-top::before {
  content: attr(data-hl-mark); display: inline-grid; place-items: center; vertical-align: middle; margin-right: 8px;
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--core); font: 600 18px/1 var(--font);
}
:root:has([data-step="1"]:target) .r1c-top button { color: var(--ink-1); font-weight: 600; }
