/* HotWax - Flow Render (ASCII). Colours and sizes arrive as --hw-* variables from the module fields. */
.hw-render { background: var(--hw-bg, #fff); color: var(--hw-muted, #666); font-family: var(--hw-font-b, Montserrat, Arial, sans-serif);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.hw-render *, .hw-render *::before, .hw-render *::after { box-sizing: border-box; }

/* ---------- Heading (scrolls away normally, above the pinned part) ---------- */
.hw-render__head { max-width: var(--hw-max, 1280px); margin: 0 auto; padding: 96px 40px 0; }
.hw-render__eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--hw-eb, #8c1c24); }
.hw-render__num { color: var(--hw-red, #e70000); }
.hw-render__dot { margin: 0 8px; opacity: .5; }
.hw-render .hw-render__heading { max-width: 768px; margin: 16px 0 0; font: 400 48px/1.15 var(--hw-font-h, "Playfair Display", Georgia, serif); color: var(--hw-ink, #000); }
.hw-render__intro { max-width: 640px; margin: 20px 0 0; font-size: 17px; font-weight: 300; line-height: 1.6; }

/* ---------- Pinned part ---------- */
.hw-render__track { position: relative; height: calc((var(--hw-n, 7) * var(--hw-per, 80) + 40) * 1vh); }
.hw-render__pin { position: sticky; top: var(--hw-pin-top, 64px); height: calc(100vh - var(--hw-pin-top, 64px)); display: flex; align-items: center; }
@supports (height: 1svh) {
  .hw-render__track { height: calc((var(--hw-n, 7) * var(--hw-per, 80) + 40) * 1svh); }
  .hw-render__pin { height: calc(100svh - var(--hw-pin-top, 64px)); }
}
.hw-render__grid { width: 100%; max-width: var(--hw-max, 1280px); margin: 0 auto; padding: 0 40px;
  display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 40px; align-items: center; }

/* ---------- Text ---------- */
.hw-render__text { display: grid; }
.hw-render__step { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; }
.hw-render__step.is-on { opacity: 1; visibility: visible; transition-delay: 0s; }
.hw-render__list, .hw-render__cta { grid-area: 2 / 1; }
.hw-render__cta { grid-area: 3 / 1; justify-self: start; }
.hw-render__kicker { display: flex; align-items: center; gap: 8px; margin: 0; font: 700 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--hw-red, #e70000); }
.hw-render__kicker span { font-variant-numeric: tabular-nums; }
.hw-render__kicker i { width: 24px; height: 1px; background: currentColor; opacity: .4; }
.hw-render .hw-render__title { min-height: 2.6em; margin: 12px 0 0; font: 400 30px/1.35 var(--hw-font-h, "Playfair Display", Georgia, serif); color: var(--hw-ink, #000); }
.hw-render__cursor { display: inline-block; width: .45em; height: .9em; margin-left: 2px; transform: translateY(.1em); background: var(--hw-red, #e70000);
  animation: hw-render-blink 1s steps(2, jump-none) infinite; }
@keyframes hw-render-blink { 50% { opacity: .2; } }
.hw-render__body { max-width: 28rem; margin: 12px 0 0; font-size: 16px; line-height: 1.6; color: var(--hw-muted, #666); }
.hw-render__step.is-on .hw-render__body { animation: hw-render-swap .45s ease both; }
@keyframes hw-render-swap { from { opacity: 0; transform: translateY(6px); } }
.hw-render__list { display: grid; gap: 8px; margin: 32px 0 0; padding: 0; list-style: none; font-family: var(--mono); }
.hw-render__list li { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 14px; }
.hw-render__list li::before { content: none; }
.hw-render__list b { width: 10px; color: rgba(0,0,0,.25); transition: color .3s ease; }
.hw-render__list span { font-weight: 600; color: rgba(0,0,0,.3); transition: color .3s ease; }
.hw-render__list em { font-size: 12px; font-style: normal; color: transparent; }
.hw-render__list li.is-done span { color: rgba(0,0,0,.45); }
.hw-render__list li.is-done em { color: color-mix(in srgb, var(--hw-red, #e70000) 70%, transparent); }
.hw-render__list li.is-on b { color: var(--hw-red, #e70000); }
.hw-render__list li.is-on span { color: var(--hw-ink, #000); }
/* the plus: click a name to hold the flow there. The held one shows a minus, to let it run on again.
   Only clickable when the flow plays itself -- with scrolling there is nothing to hold. */
.hw-render__plus { flex: none; margin-left: auto; position: relative; width: 13px; height: 13px;
  color: var(--hw-red, #e70000); opacity: 0; transition: opacity .3s ease, transform .3s ease; }
.hw-render__plus::before, .hw-render__plus::after { content: ""; position: absolute; background: currentColor; border-radius: 1px; }
.hw-render__plus::before { left: 0; right: 0; top: 5.5px; height: 2px; }
.hw-render__plus::after { top: 0; bottom: 0; left: 5.5px; width: 2px; transition: opacity .3s ease, transform .3s ease; }
.hw-render--auto .hw-render__list li { cursor: pointer; }
.hw-render--auto .hw-render__plus { opacity: .35; }
.hw-render--auto .hw-render__list li:hover .hw-render__plus,
.hw-render--auto .hw-render__list li.is-on .hw-render__plus { opacity: .8; }
.hw-render--auto .hw-render__list li:focus-visible { outline: 2px solid var(--hw-red, #e70000); outline-offset: 3px; border-radius: 4px; }
/* held: the upright stroke folds away, so the plus reads as a minus */
.hw-render--auto .hw-render__list li.is-held .hw-render__plus { opacity: 1; transform: rotate(180deg); }
.hw-render--auto .hw-render__list li.is-held .hw-render__plus::after { opacity: 0; transform: scaleY(0); }
.hw-render .hw-render__cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; padding: 14px 28px; border-radius: 999px;
  background: var(--hw-red, #e70000); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.hw-render .hw-render__cta:hover { filter: brightness(.9); color: #fff; text-decoration: none; }

/* ---------- Terminal frame ---------- */
.hw-render__frame { position: relative; }
.hw-render__corner { position: absolute; width: 16px; height: 16px; pointer-events: none; border: 0 solid var(--hw-frame, rgba(0,0,0,.4)); }
.hw-render__corner--tl { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
.hw-render__corner--tr { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; }
.hw-render__corner--bl { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
.hw-render__corner--br { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }
.hw-render__bar-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 0;
  font: 400 10px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--hw-ink, #000) 45%, transparent); }
.hw-render__code { font-weight: 400; color: var(--hw-red, #e70000); }
.hw-render__pct { font-variant-numeric: tabular-nums; }
.hw-render__canvas { display: block; width: 100%; height: calc(var(--hw-canvas-h, 62) * 1vh); }
.hw-render--lens .hw-render__canvas { cursor: crosshair; }
.hw-render__bar-bottom { padding: 0 20px 12px; font: 400 11px/1.4 var(--mono); letter-spacing: .06em; white-space: pre;
  color: color-mix(in srgb, var(--hw-ink, #000) 50%, transparent); }
.hw-render__fill { font-weight: 400; color: var(--hw-red, #e70000); }

/* ---------- Page editor: no pinning ---------- */
/* Plays on its own: no tall track and nothing pinned, so the page scrolls straight past at normal speed.
   Same shape the editor already used. */
.hw-render--editor .hw-render__track,
.hw-render--auto .hw-render__track { height: auto; }
.hw-render--editor .hw-render__pin,
.hw-render--auto .hw-render__pin { position: relative; top: 0; height: auto; padding: 40px 0 80px; }

@media (min-width: 1024px) { .hw-render--hide-d { display: none; } }
@media (max-width: 1023px) {
  .hw-render--hide-m { display: none; }
  .hw-render__head { padding: 64px 20px 0; }
  .hw-render .hw-render__heading { font-size: 34px; }
  .hw-render__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 0 20px; }
  .hw-render__frame { order: 1; }
  .hw-render__text { order: 2; }
  .hw-render__canvas { height: calc(var(--hw-canvas-h-m, 42) * 1vh); }
  .hw-render .hw-render__title { min-height: 0; font-size: 24px; }
  .hw-render__body { font-size: 14px; }
  .hw-render__list { display: none; }
  .hw-render .hw-render__cta { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hw-render__cursor, .hw-render__step.is-on .hw-render__body { animation: none; }
  .hw-render__step { transition: none; }
}
