/* How it works page. Page-specific rules only. The six-step walkthrough (.walk*), the two privacy
   lanes (.board/.lane), the phone frame (.device), tiles, Q&A and the closing band all come from style.css.
   Pieces owned here: hw-flow (hero), hw-ways (both ways in),
   hw-shots (three real screens), hw-facts (speed and storage). */

/* ---------- 1. hero visual: ask -> search first -> answer, as three stages ---------- */
.hw-flow{position:relative;max-width:540px;margin:0 auto;padding:26px 24px 20px;border-radius:30px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
.hw-flow ol{position:relative;display:flex;flex-direction:column;gap:14px;counter-reset:hf}
.hf{position:relative;counter-increment:hf;display:grid;grid-template-columns:40px minmax(0,1fr);gap:14px;align-items:start}
.hf::before{content:counter(hf);position:relative;z-index:1;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:var(--accent);border:2px solid var(--accent);color:var(--on-accent);font-size:16px;font-weight:760}
/* the line from one stage's number to the next */
.hf:not(:last-child)::after{content:"";position:absolute;left:19px;top:40px;bottom:-14px;width:2px;background:var(--line)}
.hf-body{min-width:0;padding:14px 16px 16px;border-radius:18px;background:var(--bg);border:1px solid var(--line-2)}
.hf-lab{margin-bottom:10px;font-size:12px;font-weight:740;letter-spacing:.1em;text-transform:uppercase;line-height:1.2;color:var(--accent)}
.hf-bub{display:inline-block;max-width:100%;padding:10px 14px;border-radius:15px 15px 15px 5px;background:var(--accent-soft);color:var(--on-accent-soft);font-size:15.5px;font-weight:620;line-height:1.3}
.hf-pass{display:flex;flex-direction:column;gap:4px}
.hf-pass li{display:flex;align-items:baseline;gap:10px;padding:7px 10px;border-radius:10px;border:1px solid transparent;font-size:14.5px;line-height:1.3;color:var(--ink-2)}
.hf-pass b{flex:none;font-family:var(--mono);font-size:12px;font-weight:700}
.hf-pass .hit{background:var(--surface);border-color:var(--accent);color:var(--ink);font-weight:640}
.hf-pass .hit b{color:var(--accent)}
.hf-meta{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px;font-size:12.5px;font-weight:720;color:var(--accent)}
.hf-ans{font-size:15.5px;line-height:1.4;color:var(--ink)}
.hf-src{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;margin-top:10px;font-size:12.5px;font-weight:720;color:var(--accent)}
.hf-src span{padding:4px 10px;border-radius:99px;border:1px solid var(--line);font-weight:600;color:var(--ink)}
.hf-foot{display:flex;align-items:center;gap:10px;margin-top:16px;padding-left:54px;font-size:14px;font-weight:650;line-height:1.3;color:var(--ink)}
.hf-foot>.ico{width:18px;height:18px;color:var(--accent)}
.hf-foot span{flex:1}
.hf-pause{display:grid;place-items:center;width:44px;height:44px;margin:-6px -8px -6px 0;flex:none;border:0;border-radius:50%;background:transparent;color:var(--ink-2);cursor:pointer}
.hf-pause[hidden]{display:none}
.hf-pause:hover{background:var(--hover);color:var(--ink)}
.hf-pause .ico{width:18px;height:18px}
.hf-pause .i-play{display:none}
.hf-pause[aria-pressed="true"] .i-play{display:block}
.hf-pause[aria-pressed="true"] .i-pause{display:none}
.hw-flow-cap{margin-top:16px;text-align:center;font-size:12.5px;color:var(--ink-2)}
/* The stages light up one after another. Only while how-it-works.js says the visual is on screen (.is-live);
   without it, or with reduced motion, all three are simply shown. */
@keyframes hf-n{0%,30%{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}38%,100%{background:var(--surface);border-color:var(--line);color:var(--ink-2)}}
@keyframes hf-b{0%,30%{border-color:var(--accent);box-shadow:0 0 0 4px var(--glow)}38%,100%{border-color:var(--line-2);box-shadow:0 0 0 0 transparent}}
.hw-flow.is-live .hf::before{background:var(--surface);border-color:var(--line);color:var(--ink-2);animation:hf-n 12s linear infinite}
.hw-flow.is-live .hf-body{animation:hf-b 12s linear infinite}
.hw-flow.is-live .hf:nth-child(2)::before,.hw-flow.is-live .hf:nth-child(2) .hf-body{animation-delay:4s}
.hw-flow.is-live .hf:nth-child(3)::before,.hw-flow.is-live .hf:nth-child(3) .hf-body{animation-delay:8s}
.hw-flow.is-live:not(.in-view) .hf::before,.hw-flow.is-live:not(.in-view) .hf-body,
.hw-flow.is-paused .hf::before,.hw-flow.is-paused .hf-body{animation-play-state:paused}


/* ---------- 3. privacy: sub-lines on the shared network list ---------- */
.hw-private .kinds li .ico{flex:none}
.hw-private .rows3{grid-template-columns:minmax(0,1fr);gap:10px;padding-top:0;border-top:0}
.hw-private .rows3 li{align-items:center;gap:14px;padding:13px 14px;border-radius:var(--r-in);background:var(--fill-inset);font-size:16.5px;font-weight:680}
.hw-private .rows3 .ico{width:22px;height:22px;margin:0 9px}
.hw-private .rows3 span{margin-top:2px;font-size:13.5px}
.hw-private .net li>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.hw-private .net small{font-size:13.5px;font-weight:500;line-height:1.35;color:var(--ink-2)}
.hw-private-foot{margin-top:18px}

/* ---------- 4. both ways in: two tiles converge on one ---------- */
.hw-ways{display:grid;grid-template-columns:minmax(0,1.35fr) 84px minmax(0,1fr);align-items:stretch}
.hw-in{display:flex;flex-direction:column;gap:8px}
.hw-tile{display:flex;gap:16px;align-items:center;padding:20px 22px;border-radius:20px;background:var(--surface);border:1px solid var(--line-2)}
.hw-tile h3{font-size:20px;letter-spacing:-.018em;margin-bottom:4px}
.hw-tile p{font-size:15px;line-height:1.45;color:var(--ink-2)}
.hw-or{text-align:center;font-size:11.5px;font-weight:760;letter-spacing:.12em;text-transform:uppercase;line-height:1;color:var(--ink-2)}
.hw-join{display:flex;align-items:center;justify-content:center;color:var(--accent)}
.hw-join .conv{width:100%;height:100%;min-height:140px}
.hw-join .down{display:none;width:34px;height:34px}
.hw-out{align-self:center;padding:26px 24px;background:var(--fill);border-color:var(--fill);color:#fff}
.hw-out p{color:var(--on-fill-2)}
.hw-out .ib{background:var(--fill-inset);color:#fff}
/* the two shelves and the switch between them */
.hw-shelf{display:grid;grid-template-columns:auto minmax(0,1fr);gap:18px 34px;align-items:center;margin-top:16px;padding:22px 26px;border-radius:var(--r);border:1px solid var(--line-2)}
.hw-switch{display:inline-grid;grid-template-columns:1fr 1fr;padding:4px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:14.5px;font-weight:680;line-height:1}
.hw-switch button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:0 20px;border:0;border-radius:99px;background:transparent;color:var(--ink-2);font:inherit;cursor:pointer;transition:background .2s,color .2s}
.hw-switch button:hover{color:var(--ink)}
.hw-switch button .ico{display:none}
.hw-switch [aria-selected="true"]{background:var(--accent-soft);color:var(--on-accent-soft)}
.hw-switch [aria-selected="true"] .ico{display:inline-block}
.hw-switch .ico{width:16px;height:16px}
.hw-count{font-size:15px;line-height:1.4;color:var(--ink-2)}
.hw-count b{display:block;font-size:30px;font-weight:780;letter-spacing:-.035em;line-height:1.05;font-variant-numeric:tabular-nums;color:var(--ink)}
.hw-ways-foot{display:flex;justify-content:space-between;align-items:center;gap:6px 40px;flex-wrap:wrap;margin-top:16px}
.hw-ways-foot .fine{flex:1 1 520px}

/* ---------- 5. images: three real screens ---------- */
.hw-shots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(20px,4vw,56px);counter-reset:sh}
.hw-shots li{counter-increment:sh;display:flex;flex-direction:column;align-items:center;min-width:0}
.hw-shots .device{max-width:280px}
/* These screenshots carry their own status bar, so the frame adds no blank strip above them. Shown full length, in a normal phone shape. */
.hw-shots .device .screen{padding-top:0;background:#121212}
.hw-shots .cap{width:100%;max-width:300px;margin-top:24px;text-align:center}
.hw-shots h3{font-size:21px}
.hw-shots h3::before{content:counter(sh);display:inline-grid;place-items:center;width:28px;height:28px;margin-right:10px;border-radius:50%;background:var(--accent);color:var(--on-accent);font-size:14.5px;font-weight:760;letter-spacing:0;vertical-align:2px}
.hw-shots p{margin-top:8px;font-size:15px;line-height:1.5;color:var(--ink-2)}
.hw-shots-foot{margin-top:34px;text-align:center}
.hw-shots-foot .fine+.fine{margin-top:4px}

/* ---------- 6. speed and storage ---------- */
.hw-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:stretch}
.hw-fact{display:flex;flex-direction:column;gap:12px;min-width:0;padding:26px;border-radius:var(--r);background:var(--surface);border:1px solid var(--line-2)}
.hw-fact .ptile-k{font-size:13.5px}
.hw-fig{font-size:clamp(38px,4.6vw,54px);font-weight:780;letter-spacing:-.045em;line-height:1;color:var(--ink);font-variant-numeric:tabular-nums}
.hw-fig small{font-size:.5em;font-weight:740;letter-spacing:-.02em;margin-left:4px}
.hw-fact>p:not(.hw-fig){font-size:16px;font-weight:620;line-height:1.4;color:var(--ink)}
.hw-cmp{display:grid;gap:8px;margin:2px 0}
.hw-cmp div{display:grid;grid-template-columns:minmax(0,118px) minmax(0,1fr) auto;gap:10px;align-items:center;font-size:13.5px;color:var(--ink-2)}
.hw-cmp .bar{height:8px}
.hw-cmp b{font-variant-numeric:tabular-nums;color:var(--ink)}
.hw-fact details.how{margin-top:auto}
.hw-facts-foot{display:flex;justify-content:space-between;align-items:center;gap:6px 40px;flex-wrap:wrap;margin-top:18px}
.hw-facts-foot .fine{flex:1 1 520px}

.hw-lims li{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 16px;align-items:start}
.hw-lims .ib{grid-row:1 / span 2;background:var(--warn-bg);color:var(--warn-ink);box-shadow:inset 0 0 0 1px var(--warn-line)}
.hw-lims strong{margin:0;align-self:end}
.hw-lims span.t{grid-column:2}

/* ---------- 7. responsive ---------- */
@media (max-width:980px){
  .hw-facts{grid-template-columns:minmax(0,1fr)}
  .hw-shelf .hw-switch{grid-column:1 / -1;justify-self:start}
}
@media (max-width:760px){
  .hw-ways{grid-template-columns:minmax(0,1fr)}
  .hw-join{padding:10px 0}
  .hw-join .conv{display:none}
  .hw-join .down{display:block}
  .hw-out{align-self:stretch}
  /* three phones in a row would be too small to read: one at a time, swiped */
  .hw-shots{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:78%;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 calc(-1 * var(--pad));padding:6px var(--pad) 14px;scrollbar-width:none}
  .hw-shots::-webkit-scrollbar{display:none}
  .hw-shots li{scroll-snap-align:center}
  .hw-shots-foot{margin-top:18px;text-align:left}
}
@media (max-width:560px){
  .hw-flow{padding:20px 14px 16px;border-radius:24px}
  .hf{grid-template-columns:32px minmax(0,1fr);gap:10px}
  .hf::before{width:32px;height:32px;font-size:14px}
  .hf:not(:last-child)::after{left:15px;top:32px}
  .hf-body{padding:12px 13px 14px}
  .hf-foot{padding-left:42px}
  /* six stacked cards would be a long scroll on a phone: one row, swiped. how-it-works.js keeps the card for the
     step being played in view. */
  .hw-tile{padding:18px;gap:14px}
  .hw-shelf{padding:20px 18px;gap:16px 20px}
  .hw-count b{font-size:26px}
  .hw-fact{padding:22px}
  .hw-lims li{gap:4px 12px}
}
.hw-swipe{display:none;align-items:center;justify-content:center;gap:8px;margin-top:4px;font-size:13.5px;font-weight:650;color:var(--ink-2)}
.hw-swipe .ico{width:16px;height:16px;color:var(--accent)}
@media (max-width:760px){.hw-swipe{display:flex}}

.hw-panels{min-width:0}
.hw-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 34px;animation:hwpanel .28s ease-out}
.hw-panel[hidden]{display:none}
@keyframes hwpanel{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.hw-panel{animation:none}}
.hw-grow{grid-column:1 / -1;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 24px;padding-top:16px;border-top:1px solid var(--line-2);font-size:15px;color:var(--ink-2)}
.hw-grow b{color:var(--ink)}
.hw-grow .btn-link{display:inline-flex;align-items:center;gap:6px;min-height:44px;font-weight:680;color:var(--accent)}
.hw-grow .btn-link .ico{width:16px;height:16px}
@media (max-width:980px){.hw-shelf{grid-template-columns:minmax(0,1fr)}.hw-shelf .hw-switch{justify-self:start}}
@media (max-width:560px){.hw-panel{grid-template-columns:minmax(0,1fr)}}
