/* /how-to: guide player page.
 * Desktop (900px and up): guide list on the left, stage on the right, inside one audience card.
 * Phones: guide tabs on top, stage, step caption, and a dark dock at the bottom for play, back and next.
 * The card is lilac for the seller guide and mint for the buyer guide (body[data-guide]).
 * Page classes are prefixed hp- so they never meet the app classes inside the stage (.gs). */

@font-face { font-family: 'Sora'; src: url('/fonts/sora-latin.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/fonts/figtree-latin.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --ivory: #fbfaf7; --white: #fdfdfc; --cream: #f9f7f3; --frame: #f5f3ed;
  --charcoal: #101820; --charcoal-raised: #17212a; --muted: #4a5560; --muted-dark: #b8c2bc;
  --line: #e3e6e1; --line-dark: #26313a;
  --green: #48a848; --green-hover: #3e9a3e; --green-ink: #2e7f36; --green-deep: #246b2b; --green-glow: #94e2a6;
  --mint: #d2e7dd; --mint-deep: #bfdfd0; --buyer-ink: #16402e; --buyer-body: #2a5a43;
  --lilac: #e8e0f8; --lilac-deep: #ddd2f5; --violet: #6b46c1; --seller-ink: #321f57; --seller-body: #533b7c;
  --display: 'Sora', 'Figtree', sans-serif; --body: 'Figtree', sans-serif;
  --r: 16px; --r-frame: 22px; --r-badge: 8px;
  --shadow-card: 0 1px 2px rgba(16, 24, 32, .04), 0 12px 32px rgba(16, 24, 32, .06);
  --shadow-frame: 0 16px 40px -8px rgba(16, 24, 32, .08), 0 4px 12px rgba(16, 24, 32, .03);
  --shadow-button: 0 10px 24px -14px rgba(16, 24, 32, .35), 0 2px 5px -2px rgba(16, 24, 32, .12);
  --shadow-button-hover: 0 0 0 5px rgba(72, 168, 72, .16), 0 12px 36px -8px rgba(72, 168, 72, .55), 0 10px 24px -14px rgba(16, 24, 32, .35);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: 48px;
}
body[data-guide="seller"] { --g1: var(--lilac); --g2: var(--lilac-deep); --ink: var(--seller-ink); --ink-body: var(--seller-body); --badge: var(--violet); --badge-fg: #fff; }
body[data-guide="buyer"] { --g1: var(--mint); --g2: var(--mint-deep); --ink: var(--buyer-ink); --ink-body: var(--buyer-body); --badge: var(--green); --badge-fg: var(--charcoal); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--charcoal); font: 400 17px/1.65 var(--body); }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--green-ink); outline-offset: 3px; border-radius: 6px; }
.hp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp-skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--charcoal); color: var(--ivory); font: 600 14px/1 var(--display); text-decoration: none; }
.hp-skip:focus { top: 12px; }
.hp-wrap { width: min(1320px, 100% - var(--gutter) * 2); margin: 0 auto; }

/* Icons: Phosphor Bold as a mask, so they take the text colour */
.hp-i { display: inline-block; width: 1em; height: 1em; flex: 0 0 auto; background: currentColor; vertical-align: -.125em;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.hp-i--play { --i: url('https://cdn.jsdelivr.net/npm/@phosphor-icons/core@2.1.1/assets/bold/play-bold.svg'); }
.hp-i--pause { --i: url('https://cdn.jsdelivr.net/npm/@phosphor-icons/core@2.1.1/assets/bold/pause-bold.svg'); }
.hp-i--restart { --i: url('https://cdn.jsdelivr.net/npm/@phosphor-icons/core@2.1.1/assets/bold/arrow-counter-clockwise-bold.svg'); }
.hp-i--arrow { --i: url('https://cdn.jsdelivr.net/npm/@phosphor-icons/core@2.1.1/assets/bold/arrow-right-bold.svg'); }
.hp-i--back { --i: url('https://cdn.jsdelivr.net/npm/@phosphor-icons/core@2.1.1/assets/bold/arrow-left-bold.svg'); }
.hp-i--ext { --i: url('https://cdn.jsdelivr.net/npm/@phosphor-icons/core@2.1.1/assets/bold/arrow-up-right-bold.svg'); }
.hp-i--check { --i: url('https://cdn.jsdelivr.net/npm/@phosphor-icons/core@2.1.1/assets/bold/check-bold.svg'); }
.hp-i--link { --i: url('https://cdn.jsdelivr.net/npm/@phosphor-icons/core@2.1.1/assets/bold/link-bold.svg'); }
.hp-i--full { --i: url('https://cdn.jsdelivr.net/npm/@phosphor-icons/core@2.1.1/assets/bold/corners-out-bold.svg'); }

/* Buttons */
.hp-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 24px;
  border: 3px solid rgba(72, 168, 72, .3); border-radius: var(--r); background: var(--green) padding-box; box-shadow: var(--shadow-button);
  color: var(--charcoal); font: 600 16px/1.3 var(--display); letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
  transition: box-shadow .3s var(--ease), transform .2s var(--ease); }
.hp-btn:hover { box-shadow: var(--shadow-button-hover); }
.hp-btn:hover .hp-i--arrow { transform: translateX(3px); }
.hp-btn .hp-i { transition: transform .3s var(--ease); }
.hp-btn:active { transform: scale(.97); }
.hp-btn--sm { min-height: 44px; padding: 8px 16px; font-size: 14px; }
.hp-btn--out { background: transparent; border-color: rgba(16, 24, 32, .22); box-shadow: none; }
.hp-btn--out:hover { box-shadow: none; border-color: rgba(16, 24, 32, .4); }

/* ---------- Header ---------- */
.hp-header { position: relative; z-index: 5; }
/* Nav layout and drawer: /css/site-nav.css (light theme). */
.hp-header .hp-wrap { min-height: 80px; }
.hp-header.is-compact .hp-wrap { min-height: 64px; }
.hp-brand img { display: block; width: 180px; height: auto; }

/* ---------- Player card ---------- */
.hp-player { padding: 8px 0 0; }
.hp-card { position: relative; isolation: isolate; border-radius: 28px; overflow: hidden; color: var(--ink); }
.hp-ground, .hp-band { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hp-ground i, .hp-band i { position: absolute; inset: 0; transition: opacity .5s var(--ease); }
.hp-ground .is-seller { background: radial-gradient(120% 120% at 20% 10%, var(--lilac), var(--lilac-deep)); }
.hp-ground .is-buyer { background: radial-gradient(120% 120% at 20% 10%, var(--mint), var(--mint-deep)); }
.hp-band i { top: 44%; bottom: auto; height: 46%; left: -5%; right: -5%; opacity: .4; transform: rotate(-4deg); background: center / 100% 100% no-repeat; }
.hp-band .is-seller { background-image: url('/images/how-to/flow-band-lilac.svg'); }
.hp-band .is-buyer { background-image: url('/images/how-to/flow-band-mint.svg'); }
body[data-guide="seller"] .hp-ground .is-buyer, body[data-guide="seller"] .hp-band .is-buyer,
body[data-guide="buyer"] .hp-ground .is-seller, body[data-guide="buyer"] .hp-band .is-seller { opacity: 0; }

.hp-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 36px; padding: 32px; }
.hp-title { font: 700 30px/1.1 var(--display); letter-spacing: -.035em; text-wrap: balance; color: var(--ink); }
.hp-title span { color: var(--green-ink); }
.hp-lede { margin: 10px 0 22px; font-size: 15px; line-height: 1.55; color: var(--ink-body); }

/* Guide list (desktop) */
.hp-guide { margin-bottom: 10px; border-radius: var(--r); background: rgba(253, 253, 252, .5); transition: background-color .3s, box-shadow .3s; }
.hp-guide.is-on { background: var(--white); box-shadow: 0 0 0 6px rgba(253, 253, 252, .45), var(--shadow-frame); }
.hp-guide-head { display: block; width: 100%; padding: 14px 16px; text-align: left; border-radius: var(--r); }
.hp-guide-title { display: block; margin-top: 8px; font: 700 16px/1.3 var(--display); letter-spacing: -.02em; color: var(--charcoal); }
.hp-guide-meta { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.hp-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font: 600 12px/1 var(--display); }
.hp-tag--seller { background: var(--violet); color: #fff; }
.hp-tag--buyer { background: var(--green); color: var(--charcoal); }
.hp-steps { margin: 0 16px; padding: 8px 0 12px; border-top: 1px solid var(--line); }
.hp-step { display: flex; align-items: center; gap: 12px; width: 100%; padding: 3px 0; text-align: left; font: 600 13.5px/1.3 var(--display); letter-spacing: -.01em; color: var(--muted); border-radius: 8px; }
.hp-step:hover { color: var(--charcoal); }
.hp-badge { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 auto; border-radius: var(--r-badge); background: var(--frame); font: 600 11.5px/1 var(--display); color: var(--muted); transition: background-color .3s, color .3s, box-shadow .3s; }
.hp-step.is-done { color: var(--charcoal); }
.hp-step.is-done .hp-badge { background: var(--ink); color: #fff; }
.hp-step.is-cur { color: var(--charcoal); }
.hp-step.is-cur .hp-badge { background: var(--badge); color: var(--badge-fg); box-shadow: 0 0 0 3px var(--g1); }

/* Stage */
.hp-main { min-width: 0; }
.hp-stagebox { position: relative; border: 6px solid rgba(253, 253, 252, .7); border-radius: var(--r-frame); overflow: hidden; background: #eef1ea; box-shadow: 0 24px 60px -24px rgba(16, 24, 32, .35); }
.hp-stage { position: relative; aspect-ratio: 1200 / 675; overflow: hidden; }
.hp-bigplay { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  background: var(--green); color: var(--charcoal); font-size: 28px; box-shadow: 0 0 0 10px rgba(253, 253, 252, .55), var(--shadow-button);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s; }
.is-paused .hp-bigplay { opacity: 1; visibility: visible; }
.hp-stagebox:fullscreen { display: grid; place-items: center; border: 0; border-radius: 0; background: var(--charcoal); }
.hp-stagebox:fullscreen .hp-stage { width: min(100vw, 100vh * 1200 / 675); }
.hp-phone .hp-stage { aspect-ratio: 390 / 488; }
.hp-phone .hp-stagebox:fullscreen .hp-stage { width: min(100vw, 100vh * 390 / 488); }

/* Transport */
.hp-ctrl { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.hp-play { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: var(--r); background: var(--green); color: var(--charcoal); font-size: 18px; box-shadow: var(--shadow-button); transition: box-shadow .3s var(--ease); }
.hp-play:hover { box-shadow: var(--shadow-button-hover); }
.hp-ghost { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: var(--r); color: var(--ink-body); font-size: 17px; }
.hp-ghost:hover { background: rgba(253, 253, 252, .6); }
.hp-track { position: relative; flex: 1; height: 24px; cursor: pointer; touch-action: none; }
.hp-track::before { content: ''; position: absolute; left: 0; right: 0; top: 9px; height: 6px; border-radius: 999px; background: rgba(253, 253, 252, .75); }
.hp-track-fill { position: absolute; left: 0; top: 9px; height: 6px; width: 0; border-radius: 999px; background: var(--green); }
.hp-track-tick { position: absolute; top: 6px; width: 2px; height: 12px; margin-left: -1px; border-radius: 1px; background: rgba(16, 24, 32, .22); }
/* Scrubber handle: grab and drag; the tip shows the time and step while hovering or dragging */
.hp-track-thumb { position: absolute; top: 12px; left: 0; z-index: 1; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--green); box-shadow: 0 2px 6px rgba(16, 24, 32, .25); cursor: grab;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.hp-track:hover .hp-track-thumb, .hp-track:focus-visible .hp-track-thumb { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(72, 168, 72, .18), 0 2px 6px rgba(16, 24, 32, .25); }
.hp-track.is-dragging { cursor: grabbing; }
.hp-track.is-dragging .hp-track-thumb { cursor: grabbing; transform: scale(1.3); box-shadow: 0 0 0 8px rgba(72, 168, 72, .22), 0 2px 8px rgba(16, 24, 32, .3); }
.hp-track-tip { position: absolute; bottom: calc(100% + 12px); left: 50%; padding: 5px 9px; border-radius: 8px; background: var(--charcoal); color: var(--ivory);
  font: 600 12px/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translate(var(--tx, -50%), 4px); transition: opacity .2s var(--ease), transform .2s var(--ease); }
.hp-track:hover .hp-track-tip, .hp-track.is-dragging .hp-track-tip { opacity: 1; transform: translate(var(--tx, -50%), 0); }
.hp-track:focus-visible { outline-offset: 6px; }
.hp-stagebox.is-scrubbing .hp-bigplay { opacity: 0; visibility: hidden; }
.hp-time { font: 600 13px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--ink-body); white-space: nowrap; }
.hp-full { display: none; }
@media (hover: none) and (pointer: coarse) { .has-fullscreen .hp-full { display: inline-grid; } }

/* Caption */
.hp-cap { display: flex; align-items: flex-start; gap: 16px; margin-top: 14px; padding: 16px 18px; border-radius: var(--r); background: rgba(253, 253, 252, .78); }
.hp-cap-num { display: none; }
.hp-cap-body { flex: 1; min-width: 0; }
.hp-cap-k { font: 600 12.5px/1 var(--display); color: var(--muted); }
.hp-cap-title { margin-top: 6px; font: 700 20px/1.25 var(--display); letter-spacing: -.025em; color: var(--charcoal); text-wrap: balance; }
.hp-cap-text { margin-top: 4px; font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 620px; }
.hp-need { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; line-height: 1.4; color: var(--charcoal); }
.hp-need[hidden] { display: none; }
.hp-need b { width: 100%; font: 600 12.5px/1 var(--display); color: var(--muted); }
.hp-need span { display: inline-flex; align-items: center; gap: 6px; }
.hp-need .hp-i { color: var(--green-ink); }
.hp-cap-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.hp-tabs, .hp-dock { display: none; }
.hp-note { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* ---------- Read the steps ---------- */
.hp-read { padding: 96px 0 80px; }
.hp-h2 { font: 700 clamp(26px, 2.9vw, 40px)/1.12 var(--display); letter-spacing: -.035em; text-wrap: balance; }
.hp-h2 span { color: var(--green-ink); }
.hp-read-lede { margin-top: 12px; max-width: 560px; color: var(--muted); font-size: 18px; }
.hp-read-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 36px; }
.hp-read-col { padding: 28px; border-radius: var(--r); background: var(--white); box-shadow: var(--shadow-card); }
.hp-read-col h3 { margin-top: 12px; font: 700 22px/1.25 var(--display); letter-spacing: -.025em; }
.hp-read-col ol { margin-top: 18px; counter-reset: s; }
.hp-read-col li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.hp-read-col li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-badge); background: var(--frame); font: 600 12.5px/1 var(--display); color: var(--muted); }
.hp-read-col a { font: 600 16px/1.35 var(--display); letter-spacing: -.015em; text-decoration: none; }
.hp-read-col a:hover { color: var(--green-ink); }
.hp-read-col p { margin-top: 3px; font-size: 15px; line-height: 1.5; color: var(--muted); }

/* ---------- Footer ---------- */
.hp-footer { padding: 32px 0 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.hp-footer .hp-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.hp-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.hp-footer a { text-decoration: none; }
.hp-footer a:hover { color: var(--charcoal); }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  :root { --gutter: 32px; }
  .hp-layout { grid-template-columns: 280px minmax(0, 1fr); gap: 28px; padding: 24px; }
  .hp-cap { flex-wrap: wrap; }
  .hp-cap-actions { width: 100%; }
}

/* ---------- Phones: tabs on top, dock at the bottom ---------- */
@media (max-width: 899px) {
  :root { --gutter: 20px; }
  .hp-brand img { width: 132px; }
  .hp-player .hp-wrap { width: 100%; }
  .hp-card { border-radius: 0; }
  .hp-layout { display: block; padding: 16px var(--gutter) 0; }
  .hp-title { font-size: 24px; }
  .hp-lede { display: none; }
  .hp-guides { display: none; }
  .hp-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 14px 0; padding: 4px; border-radius: var(--r); background: rgba(253, 253, 252, .5); }
  .hp-tab { min-height: 44px; border-radius: 12px; font: 600 14px/1 var(--display); color: var(--ink-body); }
  .hp-tab[aria-selected="true"] { background: var(--badge); color: var(--badge-fg); box-shadow: var(--shadow-card); }
  .hp-stagebox { border-width: 4px; border-radius: 18px; }
  .hp-ctrl { margin-top: 10px; gap: 10px; }
  .hp-track { height: 36px; }
  .hp-track::before, .hp-track-fill { top: 15px; }
  .hp-track-tick { top: 12px; }
  .hp-track-thumb { top: 18px; width: 22px; height: 22px; margin: -11px 0 0 -11px; }
  .hp-track:hover .hp-track-tip { opacity: 0; }
  .hp-track.is-dragging .hp-track-tip { opacity: 1; }
  .hp-ctrl .hp-play, .hp-ctrl [data-act="restart"] { display: none; }
  .hp-cap { margin-top: 10px; padding: 0; background: none; gap: 12px; }
  .hp-cap-num { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: var(--r-badge); background: var(--badge); color: var(--badge-fg); font: 600 14px/1 var(--display); }
  .hp-cap-k { display: none; }
  .hp-cap-title { margin-top: 3px; font-size: 18px; color: var(--ink); }
  .hp-cap-text { font-size: 14.5px; color: var(--ink-body); }
  .hp-need { color: var(--ink); }
  .hp-need b { color: var(--ink-body); }
  .hp-cap-actions { margin: 14px 0 0; }
  .hp-cap-actions .hp-btn { flex: 1; }
  .hp-cap-actions .hp-btn--out { background: rgba(253, 253, 252, .5); }
  .hp-dock { position: sticky; bottom: 12px; z-index: 4; display: flex; align-items: center; gap: 6px; margin: 16px 12px 16px; padding: 8px; border-radius: 20px; background: var(--charcoal); color: var(--ivory); box-shadow: 0 16px 40px -12px rgba(16, 24, 32, .6); }
  .hp-dock .hp-ghost { width: 44px; height: 44px; color: var(--muted-dark); }
  .hp-dock .hp-ghost:hover { background: rgba(251, 250, 247, .08); }
  .hp-dock .hp-ghost:disabled { opacity: .35; cursor: default; }
  .hp-dots { flex: 1; display: flex; justify-content: center; }
  .hp-dot { display: grid; place-items: center; width: 22px; height: 44px; }
  .hp-dot i { display: block; width: 6px; height: 6px; border-radius: 3px; background: var(--line-dark); transition: width .3s var(--ease), background-color .3s; }
  .hp-dot.is-done i { background: var(--muted-dark); }
  .hp-dot.is-cur i { width: 18px; background: var(--green); }
  .hp-note { padding: 0 var(--gutter); }
  .hp-read { padding: 64px 0 56px; }
  .hp-read-grid { grid-template-columns: 1fr; }
  .hp-read-col { padding: 20px; }
}

/* ---------- Recording: the stage alone, full window ---------- */
body.hp-record { overflow: hidden; background: #eef1ea; }
body.hp-record > :not(main), body.hp-record main > :not(.hp-player), body.hp-record .hp-side, body.hp-record .hp-ctrl, body.hp-record .hp-cap,
body.hp-record .hp-dock, body.hp-record .hp-note, body.hp-record .hp-ground, body.hp-record .hp-band, body.hp-record .hp-bigplay { display: none !important; }
body.hp-record .hp-player, body.hp-record .hp-layout { padding: 0; }
body.hp-record .hp-wrap { width: 100%; }
body.hp-record .hp-layout { display: block; }
body.hp-record .hp-card { border-radius: 0; }
body.hp-record .hp-stagebox { width: min(100vw, 100vh * 1200 / 675); margin: 0 auto; border: 0; border-radius: 0; box-shadow: none; }
body.hp-record.hp-phone .hp-stagebox { width: min(100vw, 100vh * 390 / 488); }

@media (prefers-reduced-motion: reduce) {
  .hp-ground i, .hp-band i, .hp-badge, .hp-dot i { transition: none; }
}
