/* "How it works": one scene in the explainer video's visual language (see explainer.html).
   Flat fills only. Islands are opaque; only the step text (the callout) is glass.
   Default = a plain list of four steps, each with a still. how.js adds .how-live on wide, tall screens
   when motion is welcome; then the list's text becomes the callouts over one pinned, scroll-driven scene. */
.how {
  --canvas: #1b1c1f; --island: #2b2d30; --raised: #393b40; --hairline: #43454a; --fg: #dfe1e5; --fg2: #9da0a8; --fg3: #7a7e85;
  --blue: #3574f0; --hgreen: #6aab73; --addbg: #294436; --hred: #f75464; --delbg: #45302b; --amber: #f2c55c; --premise: #f0705a;
  --la: #56a8f5; --lb: #b189f5;
  --code: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  background: var(--canvas); color: var(--fg); padding: 130px 0 120px;
}
.how .lead { color: var(--fg2); }
.how .hmore { text-align: center; margin: 56px auto 0; font-size: 16px; }
.how .hmore a { color: var(--la); text-underline-offset: 3px; }

/* pieces, as in the video */
.hisl { background: var(--island); border-radius: 18px; border: 2px solid var(--island); overflow: hidden; }
.hhead { height: 48px; padding: 0 16px; display: flex; align-items: center; gap: 10px; font: 600 17px/1 var(--sans); white-space: nowrap; }
.hhead .hsub { font-weight: 400; font-size: 15.5px; color: var(--fg2); overflow: hidden; text-overflow: ellipsis; }
.hhead .hsp { flex: 1; }
.hav { flex: none; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 700 15px var(--sans); color: #1b1c1f; background: var(--lb); }
.hpill { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 14px; background: var(--raised); font: 500 14.5px var(--code); color: var(--fg2); white-space: nowrap; }
.hpill.rec { color: var(--premise); font-family: var(--sans); } .hpill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.hpill.from { background: none; box-shadow: inset 0 0 0 2px var(--raised); }
.hbody { padding: 0 14px 14px; }
.hask { height: 44px; padding: 0 14px; display: flex; align-items: center; border-radius: 12px; background: var(--canvas); border: 2px solid var(--hairline); font-size: 16px; white-space: nowrap; overflow: hidden; }
.hchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hchip { display: inline-flex; align-items: center; gap: 8px; font: 15px/30px var(--code); padding: 0 11px 0 9px; border-radius: 9px; background: var(--raised); color: var(--fg); white-space: nowrap; }
.hchip i { width: 9px; height: 9px; border-radius: 50%; background: var(--lb); }
.hchip b { font-weight: 500; color: var(--lb); }
.hrow { display: flex; font: 15px/28px var(--code); border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.hrow .sg { flex: none; width: 24px; text-align: center; color: var(--fg3); }
.hrow.add { background: var(--addbg); } .hrow.add .sg { color: var(--hgreen); }
.hrow.del { background: var(--delbg); } .hrow.del .sg { color: var(--hred); }
.how mark { color: #fff; background: #7a3038; border-radius: 4px; padding: 1px 0; }
.how .add mark, .how .new mark { background: #3f6b4f; }
.hnode { display: inline-flex; align-items: center; height: 42px; padding: 0 13px; border-radius: 11px; font: 15px var(--code); white-space: nowrap; background: var(--raised); color: var(--fg); }
.hnode.words { font: 500 15.5px var(--sans); }
.hnode.v2 { box-shadow: inset 0 0 0 2px var(--la); }
.hnode.stale { box-shadow: inset 0 0 0 2px var(--hred); }
.hnode.gone { text-decoration: line-through; color: var(--fg2); }
.hglab { font: 14.5px var(--code); color: var(--fg2); white-space: nowrap; }
.hglab.words { font: 600 15px var(--sans); color: var(--la); }

/* the message, worded as the product words it */
.hbrief > * { border-left: 4px solid var(--premise); padding-left: 11px; margin: 0; }
.hbrief .from { font: 500 14.5px/24px var(--sans); color: var(--premise); }
.hbrief .hl { font: 600 16.5px/24px var(--sans); }
.hbrief .what, .hbrief .sig, .hbrief .site { font: 15px/28px var(--code); overflow-wrap: anywhere; }
.hbrief .lab { font: 14.5px/22px var(--sans); color: var(--fg2); padding-top: 6px; }
.hbrief .sig span { background: var(--canvas); border-radius: 6px; padding: 3px 8px; }
.hbrief .site b { display: inline-block; width: 26px; color: var(--hred); }

/* step text: the glass callout */
.hcall { padding: 10px 16px 13px; border-radius: 18px; font: 500 17px/24px var(--sans); color: var(--fg);
  background: rgba(86, 90, 100, .42); border: 1px solid rgba(255, 255, 255, .26); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 16px 40px rgba(0, 0, 0, .38);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%); }
.hcall .hstep { display: block; font: 600 14px/20px var(--sans); letter-spacing: .03em; color: var(--amber); }
.hcall p { margin: 0; max-width: none; text-wrap: pretty; }

/* default: a list of four steps, each with its still */
.hboard, .hdots { display: none; }
.hsteps { list-style: none; margin: 64px auto 0; padding: 0 20px; max-width: 1040px; display: grid; gap: 34px; }
.hsteps li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px; align-items: center; }
.hfig .hgraph { padding: 4px 14px 16px; display: grid; gap: 10px; }
.hfig .hgrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.hfig .hedge { flex: none; width: 34px; height: 3px; border-radius: 3px; background: var(--fg2); }
.hfig .hedge.red { background: var(--hred); } .hfig .hedge.blue { background: var(--la); }
@media (max-width: 820px) {
  .how { padding: 92px 0 84px; }
  .hsteps { margin-top: 44px; gap: 40px; }
  .hsteps li { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hhead .hsub { display: none; }
}

/* upgraded: one pinned stage, driven by scroll */
.how-live .htrack { height: 440vh; }
.how-live .hstage { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; overflow: hidden; }
.how-live .hfit { position: relative; flex: none; }
.how-live .hboard { display: block; position: absolute; left: 0; top: 0; width: 1200px; height: 560px; transform-origin: 0 0; }
.how-live .hboard > * { position: absolute; }
.how-live .hboard .hnode, .how-live .hboard .hglab, .how-live .hboard svg { position: absolute; }
.how-live .hboard svg { left: 0; top: 0; overflow: visible; }
.how-live .hboard .hrow { white-space: pre; }
.how-live .hboard .hstack { position: relative; } .how-live .hboard .hstack .over { position: absolute; left: 0; right: 0; top: 0; }
.how-live .hboard .hbrief { position: absolute; left: 16px; right: 16px; top: 164px; }
.how-live .hboard .hbrief .what, .how-live .hboard .hbrief .sig, .how-live .hboard .hbrief .site { white-space: nowrap; }
.how-live .hsteps { position: absolute; left: 0; top: 0; width: 1200px; height: 560px; margin: 0; padding: 0; max-width: none; display: block; transform-origin: 0 0; pointer-events: none; }
.how-live .hsteps li { position: absolute; display: block; }
.how-live .hsteps .hfig { display: none; }
.how-live .hdots { display: flex; gap: 10px; }
.hdots i { width: 9px; height: 9px; border-radius: 50%; background: var(--fg3); }
.hdots i.on { background: var(--premise); }
.how-live .hmore { margin-top: 0; }
