/* public/section-demos.css — the "How it works" window (section-demos.mjs).
   Tokens only, so it follows light and dark like the rest of the app. The
   little scenes inside reuse the app's own vocabulary: hairline cards, the
   chosen state (accent border + soft wash + check), one primary button. */

.hiw-open .ico { width: 15px; height: 15px; }
.hiw-open { margin-right: 6px; padding: 5px 9px; font-size: 12.5px; }
/* the library header sits in .cmp-subnav, which lets clicks fall through; the bell opts back in, so does this */
.hiw-open { pointer-events: auto; }

.hiw {
  width: min(1340px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--border); border-radius: var(--r-xl);
  background: var(--panel); color: var(--text); box-shadow: var(--shadow-lg);
  overflow: auto; overscroll-behavior: contain;
}
.hiw::backdrop { background: var(--scrim); }
.hiw[open] { animation: hiw-in .32s cubic-bezier(.23, 1, .32, 1) backwards; }
@keyframes hiw-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }

.hiw-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 26px 28px 6px;
}
.hiw-head h2 { margin: 0; text-wrap: balance; font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
.hiw-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.hiw-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.hiw-close { width: 32px; height: 32px; }
.hiw-close .ico { width: 16px; height: 16px; }
.hiw-pause { padding: 5px 10px; font-size: 12.5px; }
.hiw-pause-ico { width: 10px; height: 11px; display: inline-block;
  background: linear-gradient(90deg, currentColor 0 3px, transparent 3px 7px, currentColor 7px 10px); }
.hiw.is-paused .hiw-pause-ico { background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }

.hiw-grid {
  display: grid; grid-template-columns: repeat(var(--hiw-cols, 3), minmax(0, 1fr)); gap: 14px;
  padding: 20px 28px 28px;
}
.hiw-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden;
}
.hiw-card-hd { display: flex; gap: 12px; padding: 16px 16px 14px; }
.hiw-num {
  flex: none; width: 22px; height: 22px; display: grid; place-items: center; margin-top: 1px;
  border-radius: var(--r-pill); background: var(--panel-3); color: var(--text-2);
  font: 600 11.5px/1 var(--mono);
}
.hiw-card h3 { margin: 0; font-size: 15px; font-weight: 650; }
.hiw-card-hd p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* the stage: a small piece of the app, drawn on the sunken step */
.hiw-stage {
  position: relative; margin: 0 10px; aspect-ratio: 1 / 1;
  background: var(--panel-3); border-radius: var(--r);
  overflow: hidden; contain: layout paint; isolation: isolate;
}
.hiw-progress {
  display: block; height: 3px; margin: 12px 10px 10px; border-radius: 3px;
  background: var(--text-2); opacity: .5; transform-origin: 0 50%; transform: scaleX(0);
}

.hiw-flow { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 16px; }
.hiw-flow-center { align-items: center; justify-content: center; gap: 12px; }

/* step 0 · the chat: your message, the agent's answer, the composer */
.hiw-flow-chat { justify-content: flex-end; }
.hiw-thread { display: flex; flex-direction: column; gap: 10px; flex: 1; justify-content: center; }
.hiw-thread .hiw-sent { margin-top: 0; }
.hiw-answer { align-items: flex-start; opacity: 0; }
.hiw-answer.is-in { opacity: 1; }
.hiw-answer .hiw-answer-t { opacity: 0; padding-top: 3px; line-height: 1.4; }
.hiw-answer.is-said .hiw-answer-t { opacity: 1; }
.hiw-answer.is-said .hiw-dots { display: none; }
.hiw-dots { display: inline-flex; gap: 4px; padding: 8px 2px; }
.hiw-dots i { width: 5px; height: 5px; border-radius: var(--r-pill); background: var(--muted); animation: hiw-blink .6s ease-in-out infinite alternate; }
.hiw-dots i:nth-child(2) { animation-delay: .2s; }
.hiw-dots i:nth-child(3) { animation-delay: .4s; }
.hiw.is-paused .hiw-dots i { animation-play-state: paused; }
.hiw-composer {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--r-lg);
}
.hiw-field { flex: 1; min-width: 0; display: flex; align-items: center; font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; }
.hiw-field.is-empty { color: var(--muted); }
.hiw-caret { width: 1.5px; height: 15px; margin-left: 1px; background: var(--text); animation: hiw-blink .5s steps(1) infinite alternate; }
.hiw-field.is-empty .hiw-caret { display: none; }
.hiw-send {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm);
  background: var(--accent-btn); color: var(--accent-fg); transition: transform .15s ease;
}
.hiw-send .ico { width: 15px; height: 15px; }
.is-pressed.hiw-send { transform: scale(.9); }

/* step 1 · the agent's question, product tiles, shape chips, the answer */
.hiw-ask { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.hiw-avatar {
  width: 22px; height: 22px; flex: none; display: grid; place-items: center;
  border-radius: var(--r-pill); background: var(--panel); border: 1px solid var(--border);
}
.hiw-avatar .ico { width: 12px; height: 12px; color: var(--accent); }
.hiw-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hiw-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 5px; min-width: 0;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r);
  transition: border-color .2s ease, background-color .2s ease, transform .15s ease;
}
.hiw-tile-pic { position: relative; display: block; aspect-ratio: 1; border-radius: var(--r-xs); overflow: hidden; background: var(--panel-3); }
.hiw-tile-pic { background: #fff; }
.hiw-tile-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hiw-tile-name { font-size: 11.5px; font-weight: 500; color: var(--text-2); padding: 0 2px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hiw-check {
  position: absolute; top: 5px; right: 5px; width: 18px; height: 18px; display: grid; place-items: center;
  border-radius: var(--r-pill); background: var(--accent-btn); color: var(--accent-fg);
  opacity: 0; transform: scale(.6); transition: opacity .2s ease, transform .25s cubic-bezier(.23, 1, .32, 1);
}
.hiw-check .ico { width: 11px; height: 11px; stroke-width: 3; }
.hiw-tile.is-chosen { border-color: var(--accent); background: var(--accent-soft); }
.hiw-tile.is-chosen .hiw-check { opacity: 1; transform: none; }
.hiw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hiw-chips-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hiw-chips-grid .hiw-chip { padding: 12px 14px; border-radius: var(--r-sm); font-size: 13px; }
.hiw-chip {
  padding: 5px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500;
  background: var(--panel); border: 1px solid var(--border); color: var(--text-2);
  transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .15s ease;
}
.hiw-chip.is-chosen { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.hiw-sent {
  align-self: flex-end; margin-top: 4px; max-width: 92%;
  padding: 8px 12px; border-radius: 14px 14px 4px 14px;
  background: var(--inverse); color: var(--inverse-text); font-size: 12.5px; font-weight: 500;
  opacity: 0;
}
.hiw-sent.is-in { opacity: 1; }

/* step 2 · the stacked format carousel */
.hiw-deck { position: relative; width: 100%; height: 74%; }
.hiw-fcard {
  position: absolute; left: 50%; top: 0; width: min(44%, 150px); margin-left: max(-22%, -75px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-xs);
  transition: transform .55s cubic-bezier(.23, 1, .32, 1), opacity .45s ease, border-color .2s ease;
}
.hiw-fcard[data-slot="0"] { z-index: 3; transform: none; box-shadow: var(--shadow); }
.hiw-fcard[data-slot="-1"] { z-index: 1; transform: translateX(-70%) scale(.84); opacity: .5; }
.hiw-fcard[data-slot="1"] { z-index: 2; transform: translateX(70%) scale(.84); opacity: .5; }
.hiw-fcard.is-pressed { transform: translateX(70%) scale(.81); }
.hiw-fpic { position: relative; display: block; aspect-ratio: 1; background: var(--panel-3); }
/* contain, never cover: a cropped ad cuts its Arabic headline */
.hiw-fpic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hiw-fcap { display: flex; flex-direction: column; gap: 1px; padding: 7px 8px 8px; min-width: 0; }
.hiw-fcap b { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hiw-fcap small { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hiw-fcard:not([data-slot="0"]) .hiw-fcap { display: none; }
.hiw-fcard.is-chosen { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }

/* the buttons inside the scenes are pictures of buttons, not controls */
.hiw-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  border-radius: var(--r-sm); border: 1px solid var(--border-2); background: var(--panel);
  color: var(--text); font-size: 12.5px; font-weight: 500;
  transition: transform .15s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.hiw-btn .ico { width: 13px; height: 13px; color: var(--muted); }
.hiw-btn-primary { background: var(--accent-btn); border-color: var(--accent-btn); color: var(--accent-fg); }
.hiw-btn-primary.is-done { background: var(--panel); border-color: var(--accent); color: var(--text); }
.hiw-btn.is-wait { opacity: .45; }
.hiw-btn.is-done:not(.hiw-btn-primary) { border-color: var(--ok); }
.hiw-btn.is-done:not(.hiw-btn-primary) .ico { color: var(--ok); }
.is-pressed.hiw-btn, .is-pressed.hiw-chip, .is-pressed.hiw-tile { transform: scale(.95); }

/* step 3 · the render, its veil, the status line */
.hiw-render {
  position: relative; width: 66%; aspect-ratio: 1; border-radius: var(--r); overflow: hidden;
  background: var(--panel); border: 1px solid var(--border);
}
.hiw-rpic { width: 100%; height: 100%; object-fit: contain; display: block; }
.hiw-veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 0 40%, rgb(255 255 255 / .22) 50%, transparent 60%) 0 0 / 100% 250%;
  animation: hiw-scan 1.6s linear infinite;
}
.hiw.is-paused .hiw-veil { animation-play-state: paused; }
.hiw-render.is-done .hiw-veil { opacity: 0; animation: none; transition: opacity .3s ease; }
@keyframes hiw-scan { from { background-position: 0 100%; } to { background-position: 0 -150%; } }
.hiw-render-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 0 4px; }
.hiw-status { white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); min-width: 0; }
.hiw-dot { width: 7px; height: 7px; flex: none; border-radius: var(--r-pill); background: var(--accent); animation: hiw-blink 1s ease-in-out infinite alternate; }
.hiw.is-paused .hiw-dot { animation-play-state: paused; }
@keyframes hiw-blink { to { opacity: .3; } }
.hiw-status.is-ok .hiw-dot { background: var(--ok); animation: none; }
.hiw-pct { font: 500 11.5px/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- the library sections: walls, rows, tabs, folders, video ---------- */
.hiw-open-corner { position: absolute; top: var(--s6); right: var(--s6); margin: 0; }
.page-head:has(> .hiw-open-corner) { position: relative; padding-right: 130px; }
.hiw-flow-top { justify-content: flex-start; }
.hiw-flow-row { flex-direction: row; align-items: center; gap: 14px; }
.hiw-label { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: -4px; }
.hiw-count { align-self: flex-end; font: 500 11px/1 var(--mono); color: var(--muted); }
.hiw-search {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; flex: none;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--r);
}
.hiw-search > .ico { width: 14px; height: 14px; color: var(--muted); flex: none; }
.hiw-search.is-empty .hiw-field { color: var(--muted); }
.hiw-search.is-empty .hiw-caret { display: none; }
.hiw-wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; min-height: 0; }
.hiw-ad, .hiw-pin {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-xs);
  background: var(--panel); border: 1px solid var(--border);
  transition: opacity .35s ease, transform .35s cubic-bezier(.23, 1, .32, 1), filter .35s ease;
}
.hiw-ad img, .hiw-pin img { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--panel-3); }
/* dimmed through the children: the entrance leaves inline opacity and
   transform on the tile itself */
.hiw-ad > * { transition: opacity .35s ease, filter .35s ease, transform .35s cubic-bezier(.23, 1, .32, 1); }
.hiw-ad.is-dim > * { opacity: .16; filter: saturate(.3); transform: scale(.94); }
.hiw-days {
  position: absolute; top: 4px; left: 4px; padding: 2px 5px; border-radius: 5px;
  background: rgb(14 15 17 / .78); color: #fff; font: 600 9.5px/1.2 var(--mono); font-variant-numeric: tabular-nums;
}
.hiw-adwrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hiw-adwrap-row { flex-direction: row; align-items: center; gap: 12px; }
.hiw-ad-big { width: 52%; aspect-ratio: 9 / 16; max-height: 220px; width: auto; height: 220px; }
.hiw-ad-mid { height: 150px; width: auto; aspect-ratio: 4 / 5; flex: none; }
.hiw-adcap { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.hiw-adwrap-row .hiw-adcap { text-align: left; align-items: flex-start; gap: 4px; }
.hiw-adwrap-row .hiw-btn { margin-top: 6px; }
.hiw-adcap b { font-size: 12.5px; font-weight: 600; }
.hiw-adcap small { font-size: 11px; color: var(--text-2); }
.hiw-mark {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: var(--r-sm); background: rgb(14 15 17 / .7); color: #fff;
  transition: background-color .2s ease, transform .15s ease;
}
.hiw-mark .ico { width: 14px; height: 14px; }
.hiw-mark.is-chosen { background: var(--accent-btn); color: var(--accent-fg); }
.hiw-mark.is-chosen .ico { fill: currentColor; }
.is-pressed.hiw-mark, .is-pressed.hiw-pin, .is-pressed.hiw-ad, .is-pressed.hiw-follow, .is-pressed.hiw-search, .is-pressed.hiw-area { transform: scale(.95); }
.hiw-toast {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--inverse); color: var(--inverse-text); font-size: 12px; font-weight: 500; opacity: 0;
}
.hiw-toast .ico { width: 13px; height: 13px; }
.hiw-toast.is-in { opacity: 1; }

.hiw-tabs { display: flex; gap: 2px; padding: 2px; background: var(--panel-3); border-radius: var(--r-sm); align-self: flex-start; flex-wrap: nowrap; }
.hiw-stage .hiw-tabs { background: var(--panel); }
.hiw-tabs .hiw-chip { border: 0; background: transparent; padding: 4px 9px; border-radius: var(--r-xs); color: var(--muted); }
.hiw-tabs .hiw-chip.is-chosen { background: var(--panel-3); color: var(--text); }

.hiw-lightbox {
  position: absolute; inset: 10px; z-index: 4; display: flex; flex-direction: column; gap: 8px; padding: 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
}
.hiw-lightbox.is-in { opacity: 1; }
.hiw-lightbox img { flex: 1; min-height: 0; width: 100%; object-fit: contain; border-radius: var(--r-xs); background: var(--panel-3); }
.hiw-lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-2); }
.hiw-btn-primary.is-done .ico { fill: currentColor; }

.hiw-rows { display: flex; flex-direction: column; gap: 6px; }
.hiw-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r);
  transition: opacity .3s ease, transform .3s ease;
}
/* dimmed through the children, like .hiw-ad: the entrance leaves inline opacity on the row */
.hiw-row > * { transition: opacity .3s ease; }
.hiw-row.is-dim > * { opacity: .3; }
.hiw-logo {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm);
  background: var(--panel-3); color: var(--text); font-size: 13px; font-weight: 650;
}
.hiw-row-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.hiw-row-t b { font-size: 12.5px; font-weight: 600; }
.hiw-row-t small { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hiw-follow {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; flex: none;
  border: 1px solid var(--border-2); border-radius: var(--r-sm); font-size: 11.5px; font-weight: 500; color: var(--text);
  transition: transform .15s ease, border-color .2s ease, background-color .2s ease;
}
.hiw-follow .ico { width: 12px; height: 12px; color: var(--muted); }
.hiw-follow.is-done { border-color: var(--accent); background: var(--accent-soft); }
.hiw-brandhd { display: flex; align-items: center; gap: 10px; }
.hiw-brandhd .hiw-logo { width: 34px; height: 34px; font-size: 15px; }
.hiw-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hiw-stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r); }
.hiw-stat small { font-size: 10.5px; color: var(--text-2); }
.hiw-stat b { font: 600 17px/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.hiw-wall-3 { grid-template-columns: repeat(3, 1fr); }
.hiw-wall-2 { grid-template-columns: repeat(2, 1fr); width: 62%; align-self: center; }

.hiw-navpill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: var(--r-sm);
  background: var(--panel); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2);
  transition: border-color .2s ease, background-color .2s ease;
}
.hiw-navpill .ico { width: 14px; height: 14px; }
.hiw-navcount { font: 600 11px/1 var(--mono); color: var(--muted); }
.hiw-navpill.is-chosen { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.hiw-navpill.is-chosen .hiw-navcount { color: var(--text); }
.hiw-ghost { position: absolute; z-index: 6; border-radius: var(--r-xs); overflow: hidden; pointer-events: none; }
.hiw-ghost img { width: 100%; height: 100%; object-fit: contain; }
.hiw-chip-ghost { border-style: dashed; color: var(--muted); }
.hiw-folder { display: none; }
.hiw-folder.is-in { display: inline-block; }
.hiw-folder.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.hiw-thread-top { display: none; width: 100%; }
.hiw-thread-top.is-in { display: flex; }
.hiw-sent-ref { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 6px 12px 10px 6px; opacity: 0; }
.hiw-sent-ref.is-in { opacity: 1; }
.hiw-refpic { width: 118px; height: 148px; border-radius: 6px; overflow: hidden; flex: none; }
.hiw-refpic img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hiw-tiles-2 { grid-template-columns: repeat(2, 1fr); max-width: 66%; }
.hiw-area {
  min-height: 62px; padding: 8px 10px; font-size: 12.5px; line-height: 1.45; color: var(--text);
  background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--r);
  transition: transform .15s ease;
}
.hiw-area .hiw-caret { display: inline-block; vertical-align: -2px; }
.hiw-checks { display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; }
.hiw-check-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.hiw-tick {
  width: 16px; height: 16px; flex: none; display: grid; place-items: center; border-radius: var(--r-pill);
  border: 1.5px solid var(--border-2); color: transparent; transition: background-color .2s ease, border-color .2s ease;
}
.hiw-tick .ico { width: 10px; height: 10px; stroke-width: 3; }
.hiw-check-row.is-run { color: var(--text); }
.hiw-check-row.is-run .hiw-tick { border-color: var(--accent); animation: hiw-blink .5s ease-in-out infinite alternate; }
.hiw-check-row.is-done { color: var(--text-2); }
.hiw-check-row.is-done .hiw-tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.hiw-vframe {
  position: relative; height: 88%; aspect-ratio: 9 / 16; flex: none; overflow: hidden;
  border-radius: var(--r); background: linear-gradient(#F1E8DB, #D4C6AD); border: 1px solid var(--border);
}
.hiw-vpic { width: 100%; height: 100%; object-fit: contain; display: block; }
.hiw-vline {
  position: absolute; left: 8%; right: 8%; bottom: 22%; padding: 4px 6px; border-radius: 6px; text-align: center;
  background: rgb(255 255 255 / .92); color: #16181D; font-size: 10px; font-weight: 650; line-height: 1.3;
}
.hiw-vtrack { position: absolute; left: 8%; right: 8%; bottom: 9%; height: 3px; border-radius: 3px; background: rgb(255 255 255 / .35); overflow: hidden; }
.hiw-vbar { display: block; height: 100%; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }
.hiw-vtime { position: absolute; left: 8%; bottom: 3%; color: #fff; font: 500 8.5px/1 var(--mono); }
.hiw.is-paused .hiw-check-row.is-run .hiw-tick { animation-play-state: paused; }

/* the cursor: an OS arrow, same in both themes, with a ring on click */
.hiw-cursor {
  position: absolute; left: 0; top: 0; z-index: 10; width: 18px; height: 22px;
  pointer-events: none; opacity: 0; will-change: transform;
}
.hiw-cursor svg { position: relative; z-index: 1; width: 100%; height: 100%; overflow: visible;
  fill: #fff; stroke: #16181D; stroke-width: 1.3; stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / .3)); transition: transform .12s ease; transform-origin: 2px 2px; }
.hiw-cursor.is-click svg { transform: scale(.86); }
.hiw-ring {
  position: absolute; left: -12px; top: -12px; width: 28px; height: 28px; border-radius: var(--r-pill);
  border: 2px solid var(--accent); opacity: 0; transform: scale(.4);
}
.hiw-cursor.is-click .hiw-ring { animation: hiw-ring .45s ease-out; }
@keyframes hiw-ring { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.3); } }

@media (max-width: 1180px) {
  .hiw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hiw-stage { aspect-ratio: 4 / 3; }
}
@media (max-width: 900px) {
  .hiw-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .hiw-stage { aspect-ratio: 1 / 1; }
}
@media (max-width: 600px) {
  .hiw-ad-big { height: 148px; }
  .hiw-wall .hiw-ad, .hiw-wall .hiw-pin { aspect-ratio: 1; }
  .hiw-rows > .hiw-row:nth-child(n+4) { display: none; }
  .hiw-follow span { display: none; }
  .page-head:has(> .hiw-open-corner) { padding-right: 52px; }
  .hiw { width: calc(100vw - 20px); max-width: none; max-height: calc(100dvh - 20px); border-radius: var(--r-xl); }
  .hiw-head { padding: 18px 16px 6px; }
  .hiw-head h2 { font-size: 19px; }
  .hiw-head p { font-size: 13px; }
  /* one step per screen width, swiped sideways: every scene stays above the fold */
  .hiw-grid {
    display: grid; grid-auto-flow: column; grid-auto-columns: 86%; grid-template-columns: none;
    max-width: none; gap: 10px; padding: 12px 16px 18px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px; scrollbar-width: none;
  }
  .hiw-grid::-webkit-scrollbar { display: none; }
  .hiw-card { scroll-snap-align: start; }
  .hiw-stage { aspect-ratio: 1 / 1; }
  .hiw-flow { padding: 12px; }
  .hiw-chips { flex-wrap: nowrap; gap: 5px; }
  .hiw-chip { padding: 4px 8px; font-size: 11.5px; }
  .hiw-open span { display: none; }
  .hiw-open { padding: 5px 7px; margin-right: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .hiw[open], .hiw-veil, .hiw-dot { animation: none; }
  .hiw-fcard, .hiw-tile, .hiw-chip, .hiw-check, .hiw-btn { transition: none; }
  .hiw-progress { display: none; }
}
.hiw:focus { outline: none; }
