/* WES "How it works" interactive demo. Scoped under #how. */
#how { --hiw-accent: var(--primary, oklch(58% .22 260)); --hiw-ink: var(--foreground, oklch(18% .02 250)); --hiw-muted: var(--muted-foreground, oklch(50% .02 250)); --hiw-line: var(--border, oklch(92% .01 250)); --hiw-soft: oklch(97% .005 250); --hiw-ok: oklch(62% .16 150); }
#how .hiw-wrap { max-width: 80rem; margin: 0 auto; padding: 0 24px; }
#how .hiw-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .2em; color: var(--hiw-muted); margin: 0 0 16px; }
#how .hiw-title { font-family: Fraunces, ui-serif, Georgia, serif; font-weight: 300; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -.02em; margin: 0; color: var(--hiw-ink); text-wrap: balance; }
#how .hiw-title em { font-style: italic; color: var(--hiw-muted); }
#how .hiw-sub { margin: 20px 0 0; font-size: 18px; line-height: 1.6; color: var(--hiw-muted); max-width: 46rem; }
#how .hiw-head { margin-bottom: 40px; }

#how .hiw-tools { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-bottom: 20px; }
#how .hiw-group { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
#how .hiw-group > span { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--hiw-muted); margin-right: 4px; }
#how .hiw-chip { font: inherit; font-size: 14px; font-weight: 500; padding: 8px 14px; min-height: 40px; border-radius: 999px; border: 1px solid var(--hiw-line); background: #fff; color: var(--hiw-ink); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
#how .hiw-chip:hover { border-color: var(--hiw-accent); }
#how .hiw-chip[aria-pressed="true"] { background: var(--hiw-ink); color: #fff; border-color: var(--hiw-ink); }
#how button:focus-visible { outline: 2px solid var(--hiw-accent); outline-offset: 2px; }

#how .hiw-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
#how .hiw-steps { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
#how .hiw-step { display: grid; grid-template-columns: 44px 1fr; gap: 14px; width: 100%; text-align: left; font: inherit; padding: 16px; border-radius: 14px; border: 1px solid var(--hiw-line); background: #fff; color: var(--hiw-ink); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
#how .hiw-step:hover { border-color: var(--hiw-accent); }
#how .hiw-step[aria-selected="true"] { border-color: var(--hiw-accent); box-shadow: 0 6px 24px -10px color-mix(in oklab, var(--hiw-accent) 55%, transparent); }
#how .hiw-num { font-family: Fraunces, ui-serif, Georgia, serif; font-size: 34px; line-height: 1; color: color-mix(in oklab, var(--hiw-accent) 35%, transparent); }
#how .hiw-step[aria-selected="true"] .hiw-num { color: var(--hiw-accent); }
#how .hiw-step b { display: block; font-size: 17px; font-weight: 600; margin-bottom: 4px; }
#how .hiw-step small { display: block; font-size: 14px; line-height: 1.5; color: var(--hiw-muted); }

#how .hiw-stage { border: 1px solid var(--hiw-line); border-radius: 18px; background: #fff; box-shadow: 0 20px 50px -30px rgba(15, 23, 42, .35); overflow: hidden; min-height: 440px; display: flex; flex-direction: column; }
#how .hiw-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--hiw-line); background: var(--hiw-soft); font-size: 13px; color: var(--hiw-muted); }
#how .hiw-bar strong { color: var(--hiw-ink); font-weight: 600; }
#how .hiw-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; padding: 3px 8px; border-radius: 999px; background: color-mix(in oklab, var(--hiw-accent) 12%, white); color: var(--hiw-accent); font-weight: 600; white-space: nowrap; }
#how .hiw-body { padding: 22px; flex: 1; }
#how .hiw-foot { padding: 14px 22px; border-top: 1px solid var(--hiw-line); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; font-size: 12px; color: var(--hiw-muted); }
#how .hiw-foot .hiw-btns { display: inline-flex; gap: 8px; flex-wrap: wrap; }
#how .hiw-btn { font: inherit; font-size: 14px; font-weight: 500; padding: 9px 16px; min-height: 40px; border-radius: 8px; border: 1px solid var(--hiw-line); background: #fff; color: var(--hiw-ink); cursor: pointer; }
#how .hiw-btn.primary { background: var(--hiw-ink); color: #fff; border-color: var(--hiw-ink); }
#how .hiw-btn:hover { opacity: .9; }

/* Step 1 */
#how .hiw-lead { display: grid; gap: 14px; }
#how .hiw-card { border: 1px solid var(--hiw-line); border-radius: 12px; padding: 16px; background: #fff; }
#how .hiw-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; padding: 8px 0; border-bottom: 1px dashed var(--hiw-line); }
#how .hiw-row:last-child { border-bottom: 0; }
#how .hiw-row span:first-child { color: var(--hiw-muted); }
#how .hiw-row span:last-child { font-weight: 500; text-align: right; }
#how .hiw-timer { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; background: var(--hiw-ink); color: #fff; }
#how .hiw-timer .t { font-family: Fraunces, ui-serif, Georgia, serif; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
#how .hiw-timer .l { font-size: 14px; opacity: .8; line-height: 1.4; }
#how .hiw-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--hiw-ok); box-shadow: 0 0 0 0 color-mix(in oklab, var(--hiw-ok) 60%, transparent); animation: hiw-pulse 1.6s infinite; flex: none; }
@keyframes hiw-pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Step 2 */
#how .hiw-log { display: flex; flex-direction: column; gap: 10px; max-height: 330px; overflow-y: auto; padding-right: 4px; scroll-behavior: smooth; }
#how .hiw-msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: 15px; line-height: 1.5; animation: hiw-in .3s ease both; }
#how .hiw-msg small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; opacity: .65; margin-bottom: 2px; }
#how .hiw-msg.ai { align-self: flex-start; background: color-mix(in oklab, var(--hiw-accent) 10%, white); border: 1px solid color-mix(in oklab, var(--hiw-accent) 22%, white); border-bottom-left-radius: 4px; }
#how .hiw-msg.lead { align-self: flex-end; background: var(--hiw-soft); border: 1px solid var(--hiw-line); border-bottom-right-radius: 4px; }
#how .hiw-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 14px; background: var(--hiw-soft); border: 1px solid var(--hiw-line); }
#how .hiw-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--hiw-muted); animation: hiw-bounce 1s infinite; }
#how .hiw-typing i:nth-child(2) { animation-delay: .15s; } #how .hiw-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes hiw-bounce { 50% { transform: translateY(-4px); opacity: .5; } }
@keyframes hiw-in { from { opacity: 0; transform: translateY(6px); } }
#how audio { width: 100%; margin-top: 12px; }

/* Step 3 */
#how .hiw-ok { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--hiw-ok); margin-bottom: 12px; }
#how .hiw-note { margin: 14px 0 0; font-size: 12px; color: var(--hiw-muted); line-height: 1.5; }

/* Step 4 */
#how .hiw-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 16px; }
#how .hiw-slot { padding: 10px; text-align: center; border-radius: 10px; border: 1px solid var(--hiw-line); font-size: 14px; color: var(--hiw-muted); background: #fff; }
#how .hiw-slot.on { background: var(--hiw-accent); border-color: var(--hiw-accent); color: #fff; font-weight: 600; }
#how .hiw-slot.off { text-decoration: line-through; opacity: .45; }

/* CTA */
#how .hiw-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
#how .hiw-cta a { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; min-height: 44px; border-radius: 8px; font-size: 15px; font-weight: 500; }
#how .hiw-cta .p { background: var(--hiw-ink); color: #fff; }
#how .hiw-cta .s { border: 1px solid var(--hiw-line); background: #fff; color: var(--hiw-ink); }
#how .hiw-cta p { margin: 0; font-size: 13px; color: var(--hiw-muted); }

@media (max-width: 900px) {
  #how .hiw-grid { grid-template-columns: minmax(0, 1fr); }
  #how .hiw-steps { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  #how .hiw-step { min-width: 240px; scroll-snap-align: start; }
  #how .hiw-stage { min-height: 0; }
  #how .hiw-slots { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  #how .hiw-msg, #how .hiw-dot, #how .hiw-typing i { animation: none; }
  #how .hiw-log { scroll-behavior: auto; }
}
