/* =========================================================
   "How it works" — ported from Variant 1 (pinned 6-step scenes)
   Fully scoped under .v1how so it cannot affect the rest of Variant 3.
   ========================================================= */
.v1how {
  --teal-200: #a6f3e1; --teal-300: #63e6c6; --teal-400: #2fd1ab; --teal-500: #18b393; --teal-600: #0f8f79; --teal-700: #0b6d5f;
  --ink-950: #04110f; --ink-900: #071a17;
  --line: rgba(120, 255, 220, .10); --line-strong: rgba(120, 255, 220, .22);
  --text-dim: #9fbfb7; --text-mute: #6a8b84;
  --ok: #34e0a1; --warn: #ffbf47; --bad: #ff6b7a; --trim: #8aa0ff;
  --hw-ease: cubic-bezier(.16, 1, .3, 1);
  --hw-glow: 0 0 0 1px var(--line-strong), 0 30px 80px -20px rgba(24, 179, 147, .35);
  position: relative;
  background: linear-gradient(180deg, transparent, rgba(7, 26, 23, .85) 25%, rgba(7, 26, 23, .85) 75%, transparent);
}
.v1how .hw-eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--f-mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-300); }
.v1how .hw-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--teal-400); box-shadow: 0 0 12px var(--teal-400); animation: hwBlink 1.6s steps(2) infinite; }
@keyframes hwBlink { 50% { opacity: .25; } }

.v1how .hw-pin { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; min-height: 100vh; padding-block: 100px; }
.v1how .hw-title { font-size: clamp(2rem, 1.1rem + 2.6vw, 3.6rem); margin: 1.2rem 0 2.2rem; text-transform: uppercase; }

.v1how .hw-steps { position: relative; display: grid; gap: .3rem; padding-left: 34px; }
.v1how .hw-rail { position: absolute; left: 9px; top: 18px; bottom: 18px; width: 2px; background: var(--line); border-radius: 2px; }
.v1how .hw-rail-fill { position: absolute; inset: 0 0 auto 0; height: 0; background: linear-gradient(var(--teal-300), var(--teal-500)); box-shadow: 0 0 12px var(--teal-400); border-radius: inherit; }
.v1how .hstep { position: relative; padding: 1rem 1.2rem; border-radius: 16px; transition: background .4s, opacity .4s; opacity: .45; cursor: pointer; }
.v1how .hstep::before { content: ""; position: absolute; left: -31px; top: 1.45rem; width: 14px; height: 14px; border-radius: 50%; background: var(--ink-900); box-shadow: inset 0 0 0 2px var(--line-strong); transition: .4s; }
.v1how .hstep.is-active { opacity: 1; background: rgba(99, 230, 198, .06); }
.v1how .hstep.is-active::before { background: var(--teal-400); box-shadow: 0 0 0 5px rgba(47, 209, 171, .18), 0 0 16px var(--teal-400); }
.v1how .hstep__n { font-family: var(--f-mono); font-size: .72rem; color: var(--teal-300); letter-spacing: .1em; }
.v1how .hstep h3 { font-size: 1.3rem; margin: .25rem 0 0; }
.v1how .hstep p { color: var(--text-dim); font-size: .94rem; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .6s var(--hw-ease), opacity .4s, margin .4s; }
.v1how .hstep.is-active p { max-height: 160px; opacity: 1; margin-top: .45rem; }

.v1how .hstage { position: relative; aspect-ratio: 1.15; border-radius: 28px; overflow: hidden; background: radial-gradient(circle at 50% 30%, #0f3a33, var(--ink-950) 75%); box-shadow: var(--hw-glow); }
.v1how .hstage__hud { position: absolute; inset: 16px 18px auto; display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: .7rem; color: var(--text-mute); letter-spacing: .08em; text-transform: uppercase; z-index: 3; }
.v1how .hstage__hud b { color: var(--teal-300); font-weight: 500; }
.v1how .hscene { position: absolute; inset: 0; display: grid; place-items: center; padding: 60px 34px 34px; opacity: 0; visibility: hidden; transform: scale(.96); transition: opacity .6s, transform .8s var(--hw-ease), visibility .6s; }
.v1how .hscene.is-active { opacity: 1; visibility: visible; transform: none; }

.v1how .chip { display: inline-flex; align-items: center; gap: .4rem; padding: .28rem .65rem; border-radius: 999px; font-family: var(--f-mono); font-size: .72rem; font-weight: 500; white-space: nowrap; }
.v1how .chip--ok { color: var(--ok); background: rgba(52, 224, 161, .12); box-shadow: inset 0 0 0 1px rgba(52, 224, 161, .3); }
.v1how .chip--warn { color: var(--warn); background: rgba(255, 191, 71, .12); box-shadow: inset 0 0 0 1px rgba(255, 191, 71, .3); }
.v1how .chip--trim { color: var(--trim); background: rgba(138, 160, 255, .12); box-shadow: inset 0 0 0 1px rgba(138, 160, 255, .3); }

/* scene 1: drives */
.v1how .hw-drives { display: grid; gap: .8rem; width: min(440px, 100%); }
.v1how .hw-drive { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: .9rem; padding: .9rem 1rem; border-radius: 14px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px var(--line); }
.v1how .hscene.is-active .hw-drive { animation: hwPlug .8s var(--hw-ease) both; }
.v1how .hscene.is-active .hw-drive:nth-child(2) { animation-delay: .15s; }
.v1how .hscene.is-active .hw-drive:nth-child(3) { animation-delay: .3s; }
@keyframes hwPlug { from { opacity: 0; transform: translateX(40px); } }
.v1how .hw-drive__ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(99, 230, 198, .1); font-size: 1.5rem; color: var(--teal-300); }
.v1how .hw-drive b { display: block; font-size: .95rem; }
.v1how .hw-drive small { font-family: var(--f-mono); font-size: .68rem; color: var(--text-mute); }
.v1how .hw-outlook { text-align: right; }
.v1how .hw-outlook__bar { display: flex; gap: 3px; justify-content: flex-end; margin-top: .3rem; }
.v1how .hw-outlook__bar span { width: 14px; height: 5px; border-radius: 2px; background: rgba(255, 255, 255, .08); }
.v1how .hw-outlook__bar span.on { background: var(--c); }

/* scene 2: rescue map */
.v1how .hw-rescue { width: min(460px, 100%); }
.v1how .hw-rescue__grid { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.v1how .hw-rescue__grid span { aspect-ratio: 1; border-radius: 2px; background: rgba(255, 255, 255, .05); transition: background .25s; }
.v1how .hw-rescue__grid span.ok { background: var(--teal-400); }
.v1how .hw-rescue__grid span.retry { background: var(--warn); }
.v1how .hw-rescue__grid span.bad { background: var(--bad); }
.v1how .hw-rescue__meta { display: flex; justify-content: space-between; margin-top: 1rem; font-family: var(--f-mono); font-size: .72rem; color: var(--text-dim); }

/* scene 3: folder tree */
.v1how .hw-tree { width: min(420px, 100%); font-family: var(--f-mono); font-size: .82rem; }
.v1how .hw-tree__row { display: flex; align-items: center; gap: .55rem; padding: .42rem .6rem; border-radius: 8px; opacity: 0; }
.v1how .hw-tree__row i { color: var(--teal-300); font-size: 1.05rem; }
.v1how .hw-tree__row .chip { margin-left: auto; }
@keyframes hwRowShow { from { opacity: 0; transform: translateY(-14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.v1how .hscene.is-active .hw-tree__row { animation: hwRowShow .5s var(--hw-ease) forwards; animation-delay: calc(var(--i) * 120ms); }

/* scene 4: deep scan */
.v1how .hw-deep { width: min(460px, 100%); display: grid; gap: 1.2rem; }
.v1how .hw-deep__strip { position: relative; height: 70px; border-radius: 12px; overflow: hidden; background: repeating-linear-gradient(90deg, rgba(99, 230, 198, .12) 0 2px, transparent 2px 7px); }
.v1how .hw-deep__head { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--teal-300); box-shadow: 0 0 20px 4px rgba(47, 209, 171, .8); animation: hwHead 3.4s cubic-bezier(.65, 0, .35, 1) infinite alternate; }
@keyframes hwHead { from { left: 2%; } to { left: 97%; } }
.v1how .hw-deep__found { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.v1how .hw-stat { padding: .6rem .7rem; border-radius: 10px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line); }
.v1how .hw-stat b { display: block; font-family: var(--f-display); font-size: 1.25rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.v1how .hw-stat span { font-family: var(--f-mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-mute); }
.v1how .hw-deep__save { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-radius: 12px; background: rgba(52, 224, 161, .07); box-shadow: inset 0 0 0 1px rgba(52, 224, 161, .25); font-size: .82rem; color: var(--text-dim); }
.v1how .hw-deep__save i { color: var(--ok); font-size: 1.2rem; animation: hwSavePulse 3s infinite; }
@keyframes hwSavePulse { 0%, 80% { transform: scale(1); } 90% { transform: scale(1.35); } }

/* scene 5: hex walk */
.v1how .hw-hex { width: min(480px, 100%); font-family: var(--f-mono); font-size: .74rem; line-height: 1.85; }
.v1how .hw-hex__line { display: grid; grid-template-columns: 70px 1fr; gap: 1rem; color: var(--text-mute); }
.v1how .hw-hex__line span:last-child { color: var(--text-dim); letter-spacing: .04em; }
.v1how .hw-hex__line.is-on span:last-child { color: var(--teal-200); }
.v1how .hw-hex__line.is-chunk span:last-child { color: var(--ok); }

/* scene 6: recover */
.v1how .hw-recover { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.2rem; width: min(460px, 100%); }
.v1how .hw-recover__drive { display: grid; justify-items: center; gap: .6rem; padding: 1.4rem 1rem; border-radius: 16px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px var(--line); text-align: center; font-size: .82rem; }
.v1how .hw-recover__drive i { font-size: 2.2rem; color: var(--teal-300); }
.v1how .hw-recover__drive small { font-family: var(--f-mono); font-size: .64rem; color: var(--text-mute); }
.v1how .hw-recover__flow { position: relative; width: 90px; height: 60px; }
.v1how .hw-file { position: absolute; top: 16px; left: 0; width: 22px; height: 28px; border-radius: 4px; background: #e9fbf6; box-shadow: 0 6px 18px -6px rgba(47, 209, 171, .8); animation: hwFly 2.2s cubic-bezier(.65, 0, .35, 1) infinite; }
.v1how .hw-file::after { content: ""; position: absolute; left: 4px; right: 4px; top: 8px; height: 10px; background: repeating-linear-gradient(var(--teal-600) 0 2px, transparent 2px 5px); }
.v1how .hw-file:nth-child(2) { animation-delay: .7s; }
.v1how .hw-file:nth-child(3) { animation-delay: 1.4s; }
@keyframes hwFly { 0% { transform: translateX(-10px) scale(.6); opacity: 0; } 20%, 80% { opacity: 1; } 100% { transform: translateX(80px) scale(.6); opacity: 0; } }

@media (max-width: 980px) {
  .v1how .hw-pin { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  .v1how .hstage { aspect-ratio: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .v1how *, .v1how *::before { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Imaging legend — colours by position (text is editable in the admin) */
.hw-legend b:nth-of-type(1) { color: var(--teal-300); }
.hw-legend b:nth-of-type(2) { color: var(--warn); }
.hw-legend b:nth-of-type(3) { color: var(--bad); }
.hw-legend b { font-weight: 400; }
