/* ============================================================================
   Harbor voyage: the game layer (levels, the level frame, the ship, the sheet,
   celebrations). Builds on play-theme.css (sm-*, gc-*, hf-*). Class prefixes:
   hv- (voyage page), lv- (level card and frame), hs- (sheet).
   Motion: only transform, opacity and SVG stroke-dashoffset (plus one filter on a
   single small sticker). Every infinite animation stops under reduced motion
   (test/motion-css.test.js).
   ============================================================================ */

html[data-platform-brand='discovery'] {
  --orange: #ff9a3c;
  --radius-xl: 30px;
  --marina: #0e5a64;
  --bennett: #4d6a87;
}

/* ── Overview: hero, progress, trust strip ── */
.hv { max-width: 1120px; }
.hv-hero .gc-kicker { position: relative; z-index: 1; margin-bottom: 14px; }
.hv-hero .gc-title { font-size: clamp(38px, 4.8vw, 62px); line-height: 1.04; }
.hv-hero-actions { margin-top: 20px; }
.hv-hero-actions .hf-go { margin-top: 0; }
.hv-progress { margin-top: 20px; }
.hv-progress-text { margin: 0; display: block; font-weight: 750; color: var(--ink-2, rgb(22 19 10 / 72%)); grid-column: 1 / -1; }
.hv-progress-text strong { font-size: 30px; color: var(--ink, #16130a); font-variant-numeric: tabular-nums; }
.gc-bar-fill { display: block; height: 100%; width: 100%; background: var(--ink, #16130a); border-radius: 999px; transform-origin: left center; transition: transform .6s var(--spring, ease-out); }
.hv-trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hv-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 0; background: #fff; color: var(--ink, #16130a); font: inherit; font-weight: 750; font-size: 14px; cursor: pointer; box-shadow: inset 0 0 0 2px var(--ink, #16130a); }
.hv-chip:hover { background: var(--sun-soft, #fff4b8); }
.hv-chip img { width: 28px; height: 28px; }

/* ── The route map (desktop lane) with the Voyage-mark ship ── */
.hv-map { position: relative; }
.hv-map .gc-stop { flex: 1 0 92px; }
.hv-map .gc-mark { position: relative; }
.gc-ship { position: absolute; top: -34px; left: 50%; margin-left: -17px; width: 34px; height: 34px; pointer-events: none; animation: none; }
.gc-ship-bob { display: block; animation: hv-bob 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
.hv-ship-svg { display: block; width: 34px; height: 34px; }
.gc-mark--lighthouse { background: #fff; overflow: visible; }
.gc-mark--lighthouse .hv-lighthouse { width: 30px; height: 30px; }
.hv-beam { transform-origin: 24px 12px; }
.is-beaming .hv-beam { animation: hv-beam 4s linear infinite; }
.gc-mark--coming_up, .gc-mark--skipped, .gc-mark--not_needed, .gc-mark--not_connected { background: #f4f2ea; color: var(--ink-3, rgb(22 19 10 / 60%)); }
.gc-mark--yourpart, .gc-mark--half_done { background: var(--sky-soft, #e4efff); }
.gc-mark--half_done { background: var(--sun, #ffe14a); }
.gc-mark--needs_you { background: #fff; }
.hv-lock { display: block; width: 16px; height: 16px; }
.hv-lock-shackle { transform-origin: 16px 11px; }
.gc-stop[data-status='done']::before, .gc-stop[data-status='yourpart']::before { border-top-style: solid; border-top-color: var(--ink, #16130a); }
.gc-stop.is-next .gc-mark { transform: scale(1.12); box-shadow: 0 0 0 4px var(--sun, #ffe14a), 0 0 0 6px var(--ink, #16130a); }

/* ── Chapters and level cards ── */
.hv-chapter { display: grid; gap: 12px; }
.hv-lane { display: grid; gap: 12px; position: relative; }
.lv-card { scroll-margin-top: calc(var(--topbar-h, 62px) + 16px); position: relative; }
.lv-card > summary { min-height: 44px; }
.lv-card .gc-port-main { gap: 3px; }
.lv-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--ink-3, rgb(22 19 10 / 60%)); text-transform: uppercase; }
.lv-mark { position: relative; overflow: visible; }
.lv-mark .hv-lock { width: 15px; height: 15px; }
.lv-ship { display: none; position: absolute; left: -8px; top: -30px; width: 30px; height: 30px; pointer-events: none; }
.lv-ship .hv-ship-svg { width: 30px; height: 30px; }
.lv-card[open] .lv-upnext-hint { display: none; }
.lv-upnext-hint { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; font-weight: 750; color: var(--ink, #16130a); }
.lv-coming { font-size: 13px; color: var(--ink-3, rgb(22 19 10 / 60%)); }
.lv-status { display: inline-flex; align-items: center; gap: 6px; white-space: normal; text-align: left; }
.lv-status-glyph { display: inline-flex; font-weight: 900; }
.lv-status-glyph .hv-lock { width: 12px; height: 12px; }
.lv-status--hatched { background-color: #f4f2ea; background-image: repeating-linear-gradient(135deg, rgb(22 19 10 / 9%) 0 5px, transparent 5px 10px); color: var(--ink-2, rgb(22 19 10 / 72%)); }
.lv-status--sun { background: var(--sun, #ffe14a); color: var(--ink, #16130a); }
.lv-status--green { background: var(--green-soft, #dcf2e4); color: var(--green, #167a43); }
.lv-status--sky { background: var(--sky-soft, #e4efff); color: #1d4f9c; }
.lv-status--hot { background: var(--hot, #ff5c8a); color: #fff; }
.lv-status--muted { background: #efece1; color: var(--ink-2, rgb(22 19 10 / 72%)); }
.lv-update { margin-top: 2px; }
.lv-card[data-status='coming_up'] > summary .gc-port-title, .lv-card[data-status='skipped'] > summary .gc-port-title { color: var(--ink-2, rgb(22 19 10 / 72%)); }
.lv-card[data-status='coming_up'] > summary .gc-mark { filter: none; }
.lv-soft-lock { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 650; }
.lv-unknown { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background-image: repeating-linear-gradient(135deg, rgb(22 19 10 / 6%) 0 6px, transparent 6px 12px); }
.lv-unknown p { margin: 0; }

/* Up next: a static ring (4px sun inside a 6px ink outline). The arrival pulse runs twice, then holds. */
.lv-card.is-up-next { box-shadow: 0 0 0 4px var(--sun, #ffe14a), 0 0 0 6px var(--ink, #16130a), var(--shadow-card, 0 12px 28px -18px rgb(22 19 10 / 35%)); }
.lv-card.is-arriving::before { content: ''; position: absolute; inset: -6px; border-radius: 30px; box-shadow: 0 0 0 4px var(--sun, #ffe14a), 0 0 0 6px var(--ink, #16130a); pointer-events: none; animation: hv-spot 900ms var(--ease, ease-out) 2 both; }

/* ── The level frame (§3.2) ── */
.lv-frame { display: grid; gap: 16px; margin: 0; }
.gc-connect.lv-frame { margin: 8px 0 0; }
.lv-head { display: grid; gap: 6px; }
.lv-dots { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.lv-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-3, rgb(22 19 10 / 60%)); }
.lv-dot-mark { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; font-size: 12px; font-weight: 900; background: #fff; box-shadow: inset 0 0 0 2px var(--line-2, rgb(22 19 10 / 18%)); }
.lv-dot.is-done .lv-dot-mark { background: var(--ink, #16130a); color: var(--sun, #ffe14a); box-shadow: none; }
.lv-dot.is-current { color: var(--ink, #16130a); }
.lv-dot.is-current .lv-dot-mark { background: var(--sun, #ffe14a); box-shadow: inset 0 0 0 2px var(--ink, #16130a); }
.lv-dot.is-current .lv-dot-mark::before { content: ''; position: absolute; left: 50%; bottom: -7px; width: 8px; height: 3px; margin-left: -4px; border-radius: 3px; background: var(--ink, #16130a); transform-origin: center; animation: hv-dot 260ms var(--spring, ease-out) both; }
.lv-dot.is-locked { opacity: .7; }
.lv-step-label { margin: 0; font-size: 13px; font-weight: 750; color: var(--ink-2, rgb(22 19 10 / 72%)); }
.lv-resume { margin: 0; }
.lv-stage { display: grid; gap: 14px; min-width: 0; }
.lv-step, .lv-summary { display: grid; gap: 14px; min-width: 0; }
.lv-step-head { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: center; }
.lv-art { width: 88px; height: 88px; object-fit: contain; }
.lv-step-copy { min-width: 0; display: grid; gap: 6px; }
.lv-headline { margin: 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.02; outline-offset: 4px; }
.lv-why { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--ink-2, rgb(22 19 10 / 72%)); max-width: 62ch; }
.lv-worry { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 650; color: var(--ink-2, rgb(22 19 10 / 72%)); }
.lv-panel { display: grid; gap: 14px; min-width: 0; }
.lv-panel .gc-actions .btn, .lv-frame .btn, .hs-sheet .btn, .hv .btn-sm { min-height: 44px; }
.lv-nav:empty { display: none; }
.lv-note { margin: 0; font-size: 14px; color: var(--ink-2, rgb(22 19 10 / 72%)); }
.lv-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lv-lines li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; align-items: start; }
.lv-lines li > span:first-child { font-weight: 900; }
.lv-lines li.is-locked, .lv-lines li.is-muted { color: var(--ink-3, rgb(22 19 10 / 60%)); }
p.lv-lines { display: block; }
.lv-identity { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.lv-tools, .lv-extras { flex-wrap: wrap; }
.lv-report { width: 100%; }
.lv-report > summary, .lv-technical > summary, .lv-advanced > summary, .lv-add-note > summary { cursor: pointer; font-weight: 750; min-height: 32px; }
.lv-validate:empty { display: none; }
.lv-validate { margin: 0; flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 650; }
.lv-numbered { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.lv-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 650; min-height: 44px; }
.lv-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink, #16130a); }
.lv-form { display: grid; gap: 14px; }
.lv-form .field { margin: 0; }
.lv-legend { font-weight: 800; font-size: 14px; margin-bottom: 6px; padding: 0; }
.lv-preview, .lv-create, .lv-budget, .lv-halfdone { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 16px; align-items: start; }
.lv-create, .lv-budget { grid-template-columns: 1fr; }
.lv-preview p, .lv-halfdone p, .lv-budget p { margin: 0 0 8px; }
.lv-budget-terms { white-space: pre-wrap; }
.lv-conflict { margin: 0; padding: 12px 14px; background: var(--sun-soft, #fff4b8); }
.lv-match { margin-top: 4px; justify-self: start; }
.lv-choice .btn { flex: 1 1 220px; }
.lv-acct-group { display: grid; gap: 8px; }
.lv-acct-group + .lv-acct-group { margin-top: 10px; }
.lv-acct-through { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3, rgb(22 19 10 / 60%)); }
.lv-acct-manager { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 16px; background: #f4f2ea; color: var(--ink-2, rgb(22 19 10 / 72%)); }

/* Radio cards: one tap target per choice, with the selected one inked. */
.lv-radios { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.lv-radio { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--line-2, rgb(22 19 10 / 18%)); cursor: pointer; min-height: 44px; }
.lv-radio:hover { background: #fffdf3; }
.lv-radio:has(input:checked) { box-shadow: inset 0 0 0 3px var(--ink, #16130a), 5px 5px 0 var(--sun, #ffe14a); background: #fffdf3; }
.lv-radio input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink, #16130a); }
.lv-radio-body { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.lv-radio-body small { color: var(--ink-2, rgb(22 19 10 / 72%)); font-size: 13.5px; }
.lv-radio-body .sm-sticker { justify-self: start; }

/* Use one you already have / Create a new one: two separate blocks, never one list. */
.lv-choose { display: grid; gap: 12px; padding: 16px; min-width: 0; }
.lv-choose-title { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 850; }
.lv-choose-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 999px; background: var(--sun, #ffe14a); box-shadow: inset 0 0 0 2px var(--ink, #16130a); font-size: 14px; font-weight: 900; }
.lv-choose .gc-actions { margin: 0; }
.lv-or { margin: -4px 0; display: flex; align-items: center; gap: 12px; color: var(--ink-3, rgb(22 19 10 / 60%)); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.lv-or::before, .lv-or::after { content: ""; flex: 1; height: 1px; background: var(--line-2, rgb(22 19 10 / 18%)); }
.lv-site { color: var(--ink-2, rgb(22 19 10 / 72%)); }
.lv-site-warn { justify-self: start; display: inline-flex; gap: 6px; align-items: baseline; margin-top: 4px; padding: 4px 10px; border-radius: 10px; background: var(--hot-soft, #ffe1ea); color: var(--ink, #16130a); font-size: 13.5px; font-weight: 700; }
.lv-confirm-text { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.lv-plan-container { overflow-wrap: anywhere; }
.lv-pay-key .input, .lv-pay-lines li, .lv-pay-offers li { overflow-wrap: anywhere; }
.lv-dataflow:empty { display: none; }

/* Locks, errors and the trust panel. */
.lv-lock { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 16px; align-items: start; background: #f4f2ea; }
.lv-lock p { margin: 0 0 10px; }
.lv-lock-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 2px var(--ink, #16130a); }
.lv-error[hidden] { display: none; }
.lv-error-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 16px; align-items: start; box-shadow: inset 0 0 0 2px var(--hot, #ff5c8a), 6px 6px 0 var(--hot-soft, #ffe1ea); }
.lv-error-card p { margin: 0 0 8px; }
.lv-error-title { outline-offset: 4px; }
.lv-trust { border-radius: 18px; background: #fffdf3; box-shadow: inset 0 0 0 1px var(--line-2, rgb(22 19 10 / 18%)); }
.lv-trust > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; min-height: 44px; cursor: pointer; font-weight: 800; }
.lv-trust > summary img { width: 28px; height: 28px; }
.lv-trust-body { padding: 0 16px 16px; display: grid; gap: 12px; }
.lv-trust-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lv-trust-head { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3, rgb(22 19 10 / 60%)); }
.lv-trust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.lv-trust-note, .lv-trust-control { margin: 0; font-size: 13.5px; }
.lv-scopes summary { cursor: pointer; font-weight: 700; font-size: 13.5px; }
.lv-scopes ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; }
.lv-scopes code { font-size: 12px; background: #f4f2ea; padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.lv-howto { margin: 0; }
.lv-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding-top: 12px; border-top: 1px dashed var(--line-2, rgb(22 19 10 / 18%)); }
.lv-foot-art { width: 36px; height: 36px; }
.lv-foot-end { margin-left: auto; display: inline-flex; flex-wrap: wrap; gap: 6px; }
.lv-disconnect { color: var(--danger, #b4234d); }

/* The Level cleared screen (§3.3). */
.lv-cleared { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 20px; align-items: center; padding: 20px; border-radius: 24px; background-color: var(--cream, #fffbe6); background-image: radial-gradient(rgb(22 19 10 / 9%) 1.2px, transparent 1.3px); background-size: 16px 16px; box-shadow: inset 0 0 0 2px var(--ink, #16130a), 8px 8px 0 var(--sun, #ffe14a); }
.lv-cleared-art { position: relative; width: 140px; height: 140px; }
.lv-cleared-art img { position: absolute; inset: 0; width: 120px; height: 120px; margin: auto; }
.lv-stamp-art { opacity: .55; transform: rotate(12deg) scale(.92); }
.lv-cleared-sticker { transform: rotate(-3deg); }
.lv-cleared-copy { display: grid; gap: 10px; min-width: 0; }
.lv-cleared-kicker { color: var(--green, #167a43); margin: 0; }
.lv-cleared-extra:empty { display: none; }
.lv-cleared-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lv-move-on { flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; line-height: 1.15; }
.lv-move-on small { font-size: 13px; font-weight: 650; opacity: .85; }
.hf-confirm--compact { margin: 0 0 4px; padding: 14px 18px; grid-template-columns: 64px minmax(0, 1fr); }
.hf-confirm--compact .hf-confirm-art { width: 64px; height: 64px; }
.hf-confirm--compact .hf-confirm-title { font-size: 22px; }

/* M12: the cleared screen and thank-you cards arrive (classes added from state diffs only). */
.is-entering .lv-cleared-sticker, .hf-confirm.is-entering .hf-confirm-art { animation: hv-drop 520ms var(--spring, ease-out) both; }
.is-entering .sm-brush { position: relative; }
.lv-move-on { position: relative; }
.is-entering .lv-move-on { animation: hv-arrive 420ms var(--ease, ease-out) 200ms both; }
.is-entering .lv-move-on::after { content: ''; position: absolute; inset: -5px; border-radius: 999px; box-shadow: 0 0 0 4px var(--sun, #ffe14a); opacity: 0; pointer-events: none; animation: hv-ring-out 600ms var(--ease, ease-out) 620ms 1 both; }

/* Wizard step change (M10) and the busy spinner (M14). */
.hv-step-in { animation: hv-step-in 320ms var(--ease, ease-out) both; }
.hv-step-in.is-back { animation-name: hv-step-back; }
.hv-spin { display: inline-block; width: 16px; height: 16px; border-radius: 999px; border: 2.5px solid currentColor; border-right-color: transparent; vertical-align: -3px; animation: hv-spin 800ms linear infinite; }

/* Celebrations from state diffs (M1, M2, M6). */
.hv-burst { animation: hv-pop 420ms var(--spring, ease-out) both; }
.hv-burst::after { content: ''; position: absolute; inset: -2px; border-radius: 999px; box-shadow: 0 0 0 3px var(--sun, #ffe14a); animation: hv-ring-out 600ms var(--ease, ease-out) both; pointer-events: none; }
.hv-sparks { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.hv-spark { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; background: var(--c, #ffe14a); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: hv-spark 650ms var(--ease, ease-out) both; }
.hv-stamp { animation: hv-stamp 320ms var(--spring, ease-out) both; }
.hv-unlock .hv-lock-shackle { animation: hv-shackle 260ms var(--spring, ease-out) both; }
.hv-unlock .hf-stop-art, .hv-unlock .lv-mark { animation: hv-warm 400ms var(--ease, ease-out) both; }

/* M9: confetti, a fixed overlay that removes itself. */
.hv-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 260; overflow: hidden; }
.hv-confetti-piece { position: absolute; top: -20px; width: 8px; height: 14px; border-radius: 3px; background: var(--c, #ffe14a); animation: hv-fall 1600ms cubic-bezier(.2, .7, .4, 1) both; }
.hv-confetti-piece.is-star { width: 14px; height: 14px; border-radius: 0; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }

/* ── The sheet (§5): bottom sheet on phones, side sheet from 768px ── */
.hs-sheet { border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: 100%; max-height: min(88vh, 720px); border-radius: 28px 28px 0 0; background: #fffdf5; color: var(--ink, #16130a); box-shadow: inset 0 0 0 2px var(--ink, #16130a); display: flex; flex-direction: column; overflow: auto; animation: hs-up 320ms var(--ease, ease-out) both; }
.hs-sheet:not([open]) { display: none; }
.hs-sheet::backdrop { background: rgb(22 19 10 / 45%); animation: hs-fade 200ms ease both; }
.hs-sheet.is-closing { animation: hs-down 200ms ease both; }
.hs-grabber { width: 44px; height: 5px; border-radius: 99px; background: var(--line-2, rgb(22 19 10 / 18%)); margin: 10px auto 0; }
.hs-body { padding: 18px 22px 8px; display: grid; gap: 10px; }
.hs-art { width: 72px; height: 72px; }
.hs-title { margin: 0; font-size: 30px; line-height: 1; outline-offset: 4px; }
.hs-intro { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--ink-2, rgb(22 19 10 / 72%)); }
.hs-subtitle { margin: 6px 0 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3, rgb(22 19 10 / 60%)); }
.hs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hs-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 15px; }
.hs-glyph { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; font-weight: 900; font-size: 13px; }
.hs-list--stops .hs-glyph { background: var(--hot-soft, #ffe1ea); color: #9c1640; }
.hs-list--keeps .hs-glyph { background: var(--green-soft, #dcf2e4); color: var(--green, #167a43); }
.hs-extra { margin: 4px 0 0; font-size: 14px; }
.hs-status:empty { display: none; }
.hs-status { margin: 0; font-weight: 750; }
.hs-error { display: grid; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--hot-soft, #ffe1ea); color: #7d1235; }
.hs-actions { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 22px 20px; background: #fffdf5; }
.hs-actions .btn { flex: 1 1 160px; justify-content: center; }
.hs-done { justify-items: start; }
.hs-check { margin: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: var(--green-soft, #dcf2e4); color: var(--green, #167a43); font-weight: 900; font-size: 22px; animation: hv-pop 420ms var(--spring, ease-out) both; }
@media (min-width: 768px) {
  .hs-sheet { margin: 0 0 0 auto; height: 100%; max-height: 100vh; width: min(460px, 100vw); border-radius: 28px 0 0 28px; animation-name: hs-in; }
  .hs-sheet.is-closing { animation-name: hs-out; }
  .hs-sheet .hs-grabber { display: none; }
  .hs-sheet::backdrop { backdrop-filter: blur(2px); }
}
.hs-sheet.is-still, .hs-sheet.is-still::backdrop { animation: none; }

/* ── Welcome: the deal lines and the signing error ── */
.hf-deal--lines { display: grid; gap: 8px; }
.hf-deal--lines li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; padding: 0; background: none; box-shadow: none; font-weight: 650; font-size: 15px; border-radius: 0; }
.hf-lead--sm { font-size: 18px; max-width: 46ch; }
.hf-stop-kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--ink-3, rgb(22 19 10 / 60%)); }
.hf-sign-error { display: grid; gap: 2px; }
.hf-stop .gc-mark { display: inline-grid; }

/* Before / Now / What we're building (variant B). */
.hf-compare { padding: 22px; display: grid; gap: 12px; }
.hf-compare-title { margin: 0; font-size: 28px; line-height: 1; }
.hf-compare-sub { margin: 0; color: var(--ink-2, rgb(22 19 10 / 72%)); max-width: 62ch; }
.hf-compare-cols { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: start; }
.hf-compare-col { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 18px; background: #fffdf3; box-shadow: inset 0 0 0 1px var(--line-2, rgb(22 19 10 / 18%)); min-width: 0; }
.hf-compare-col img { width: 56px; height: 56px; }
.hf-compare-col .sm-sticker { justify-self: start; }
.hf-compare-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; overflow-wrap: anywhere; }
.hf-compare-unknown { margin: 0; padding: 10px 12px; border-radius: 12px; background-image: repeating-linear-gradient(135deg, rgb(22 19 10 / 8%) 0 5px, transparent 5px 10px); font-size: 14px; }
.hf-compare-level { margin: 0; font-weight: 750; font-size: 13.5px; }
.hf-compare-arrow { align-self: center; color: var(--ink, #16130a); }
.hf-compare-footer { margin: 0; }
.hf-compare--compact { padding: 18px; }
.hf-compare--compact .hf-compare-cols { grid-template-columns: 1fr; }
.hf-compare--compact .hf-compare-arrow { display: none; }
.hf-compare--compact .hf-compare-title { font-size: 22px; }
.hv-compare-top { display: none; }

/* Home: the voyage card and This week in Harbor. */
.hv-home { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 18px; padding: 24px; align-items: center; margin-bottom: 18px; }
.hv-home-copy { display: grid; gap: 10px; min-width: 0; }
.hv-home-title { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1; }
.hv-home-art { width: 140px; height: 140px; }
.hv-home-lane { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 6px; }
.hv-home-lane .hv-lighthouse { width: 22px; height: 22px; }
.hv-home-lane .hv-lock { width: 13px; height: 13px; }
.hv-home-lane li { position: relative; }
.hv-home-lane .gc-mark { width: 30px; height: 30px; font-size: 12px; }
.hv-home-ship { position: absolute; top: -26px; left: -2px; width: 30px; height: 30px; }
.hv-home-ship .hv-ship-svg { width: 30px; height: 30px; }
.hv-home .gc-actions { margin-top: 6px; }
.hv-home .hf-go { margin-top: 0; }
.hv-week { padding: 22px; margin: 18px 0; display: grid; gap: 12px; }
.hv-week-title { margin: 0; font-size: 26px; }
.hv-week .sm-basis { display: block; margin-top: 6px; }
.hf-facts { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; gap: 6px; font-size: 14px; }

/* Get connected extras: the waiting-on-you card, more channels, the container explainer. */
.hv-waiting { padding: 20px; display: grid; gap: 10px; }
.hv-waiting .setup-section { margin: 0; }
.hv-more { padding: 14px 18px; }
.hv-more > summary { cursor: pointer; font-weight: 800; min-height: 32px; }
.hv-more-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.hv-more-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hp-container { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 16px; border-radius: 20px; background: #fffdf3; box-shadow: inset 0 0 0 1px var(--line-2, rgb(22 19 10 / 18%)); }
.hp-box { padding: 12px 14px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 2px var(--ink, #16130a); min-width: 0; }
.hp-box-title { margin: 0 0 8px; font-weight: 800; overflow-wrap: anywhere; }
.hp-tags { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; font-size: 13px; }
.hp-tags li { padding: 6px 8px; border-radius: 10px; background: var(--sun-soft, #fff4b8); overflow-wrap: anywhere; }
.hp-tags li.is-later { background: #f4f2ea; color: var(--ink-3, rgb(22 19 10 / 60%)); }
.hp-arrow { margin: 0; font-size: 26px; font-weight: 900; }
.hp-site { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.hp-container figcaption { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2, rgb(22 19 10 / 72%)); }
.hp-container code { font-size: 12px; }

/* Story toast (M20), under the Discovery brand. */
html[data-platform-brand='discovery'] .toast { background: var(--cream, #fffbe6); color: var(--ink, #16130a); box-shadow: inset 0 0 0 2px var(--ink, #16130a), 6px 6px 0 var(--ink, #16130a); border-radius: 18px; animation: hv-toast 380ms var(--spring, ease-out) both; font-weight: 650; }
html[data-platform-brand='discovery'] .toast-success { background: var(--green-soft, #dcf2e4); }
html[data-platform-brand='discovery'] .toast-error { background: var(--hot-soft, #ffe1ea); }

/* ── Layout ── */
@media (min-width: 1100px) {
  .hv .gc-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1099px) {
  .hv .gc-grid { grid-template-columns: 1fr; }
  .hv .gc-side { order: 2; }
  .hv .gc-side .hf-compare { display: none; }
  .hv-compare-top { display: block; }
}
/* Phone (<768px): the map hides and the cards become a vertical quest lane with the ship on Up next. */
@media (max-width: 767px) {
  .hv-map { display: none; }
  .hv-lane { padding-left: 14px; }
  .hv-lane::before { content: ''; position: absolute; left: 3px; top: 24px; bottom: 24px; border-left: 3px dashed var(--line-2, rgb(22 19 10 / 18%)); }
  .lv-card[data-status='done']::after, .lv-card[data-status='yourpart']::after { content: ''; position: absolute; left: -11px; top: 0; bottom: -12px; border-left: 3px solid var(--ink, #16130a); }
  .hv-lane .lv-card:last-child::after { display: none; }
  .lv-card.is-up-next .lv-ship { display: block; }
  .hv-hero .gc-title { font-size: 40px; }
  .hv-chip { font-size: 13px; }
  .lv-step-head { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .lv-art { width: 56px; height: 56px; }
  .lv-trust-cols { grid-template-columns: 1fr; }
  .lv-cleared { grid-template-columns: 1fr; padding: 16px; }
  .lv-cleared-art { width: 110px; height: 110px; }
  .lv-cleared-art img { width: 100px; height: 100px; }
  .lv-cleared-actions .btn { width: 100%; justify-content: center; }
  .lv-move-on { align-items: center; text-align: center; }
  .lv-foot-end { margin-left: 0; }
  .hf-compare-cols { grid-template-columns: 1fr; }
  .hf-compare-arrow { justify-self: center; transform: rotate(90deg); }
  .hv-home { grid-template-columns: 1fr; padding: 18px; }
  .hv-home-art { display: none; }
  .hv-home .hf-go { width: 100%; justify-content: center; text-align: center; }
  .hp-container { grid-template-columns: 1fr; }
  .hp-arrow { transform: rotate(90deg); justify-self: start; }
  .lv-preview, .lv-halfdone { grid-template-columns: 1fr; }
}

/* ── Keyframes ── */
@keyframes hv-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-4px) rotate(4deg); } }
@keyframes hv-beam { from { transform: rotate(-16deg); } 50% { transform: rotate(16deg); } to { transform: rotate(-16deg); } }
@keyframes hv-spot { 0% { opacity: .4; transform: scale(1); } 50% { opacity: 1; transform: scale(1.02); } 100% { opacity: .4; transform: scale(1); } }
@keyframes hv-dot { from { transform: scaleX(1); } to { transform: scaleX(2.8); } }
@keyframes hv-drop { from { opacity: 0; transform: translateY(-24px) rotate(-8deg) scale(.8); } to { opacity: 1; transform: rotate(-3deg); } }
@keyframes hv-arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes hv-step-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes hv-step-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes hv-spin { to { transform: rotate(360deg); } }
@keyframes hv-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes hv-ring-out { from { opacity: 1; transform: scale(.6); } to { opacity: 0; transform: scale(1.9); } }
@keyframes hv-spark { 0% { opacity: 0; transform: translate(0, 0) scale(0); } 40% { opacity: 1; transform: translate(calc(var(--dx) * .6), calc(var(--dy) * .6)) scale(1); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0); } }
@keyframes hv-stamp { from { opacity: 0; transform: scale(1.6) rotate(-12deg); } to { opacity: 1; transform: rotate(-2.5deg); } }
@keyframes hv-shackle { from { transform: none; } to { transform: translateY(-4px) rotate(-20deg); } }
@keyframes hv-warm { from { filter: grayscale(.55) opacity(.72); } to { filter: none; } }
@keyframes hv-fall { from { opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg); } to { opacity: 0; transform: translate3d(var(--dx, 0), 105vh, 0) rotate(var(--rot, 360deg)); } }
@keyframes hs-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes hs-down { from { transform: none; } to { transform: translateY(100%); } }
@keyframes hs-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes hs-out { from { transform: none; } to { transform: translateX(100%); } }
@keyframes hs-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hv-toast { from { opacity: 0; transform: translateY(-8px) scale(.96); } to { opacity: 1; transform: none; } }

/* ── Reduced motion: every end state at once, no loops (§9) ── */
@media (prefers-reduced-motion: reduce) {
  .gc-ship-bob { animation: none; }
  .is-beaming .hv-beam { animation: none; }
  .hv-spin { animation: none; border: 0; width: auto; height: auto; }
  .hv-spin::before { content: '⏳'; }
  .lv-card.is-arriving::before { animation: none; opacity: 1; }
  .lv-dot.is-current .lv-dot-mark::before { animation: none; transform: scaleX(2.8); }
  .hv-step-in, .hv-step-in.is-back, .hv-burst, .hv-burst::after, .hv-spark, .hv-stamp, .hv-unlock .hv-lock-shackle,
  .hv-unlock .hf-stop-art, .hv-unlock .lv-mark, .is-entering .lv-cleared-sticker, .hf-confirm.is-entering .hf-confirm-art,
  .is-entering .lv-move-on, .is-entering .lv-move-on::after, .hv-confetti-piece, .hs-check { animation: none; }
  .hs-sheet, .hs-sheet::backdrop, .hs-sheet.is-closing { animation: none; }
  html[data-platform-brand='discovery'] .toast { animation: none; }
  .gc-bar-fill { transition: none; }
}

/* Brush headings: enough line height that wrapped lines never overlap. */
.hf-title, .gc-title, .lv-headline, .hs-title, .hf-confirm-title, .hv-home-title { line-height: 1.08; }

/* The one button each level step is about (Connect with Google, Use this account, Publish…):
   big, sun-yellow, ink outline and a sticker shadow, centred. Andy, 10-06: the black button got lost. */
.lv-card .gc-actions:has(> .btn[data-level-primary]) { justify-content: center; }
.lv-card .gc-actions > .btn[data-level-primary] {
  min-height: 60px; min-width: min(100%, 360px); padding: 14px 34px;
  font-size: 18px; font-weight: 800; letter-spacing: .01em;
  background: var(--sun, #ffe14a); color: var(--ink, #16130a);
  border: 2px solid var(--ink, #16130a); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink, #16130a);
  transition: transform .12s var(--ease, ease-out), box-shadow .12s var(--ease, ease-out);
}
.lv-card .gc-actions > .btn[data-level-primary]:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink, #16130a); }
.lv-card .gc-actions > .btn[data-level-primary]:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink, #16130a); }
.lv-card .gc-actions > .btn[data-level-primary]:focus-visible { outline: 3px solid var(--ink, #16130a); outline-offset: 4px; }
.lv-card .gc-actions > .btn[data-level-primary]:disabled { background: #efece1; color: var(--ink-3, rgb(22 19 10 / 60%)); border-color: rgb(22 19 10 / 25%); box-shadow: none; cursor: not-allowed; }
@media (max-width: 600px) { .lv-card .gc-actions > .btn[data-level-primary] { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .lv-card .gc-actions > .btn[data-level-primary] { transition: none; } }

/* Connect your website (Keep my website): the one line, builder tabs, tags and the site check. */
.cs-install { display: grid; gap: 16px; min-width: 0; }
.cs-line { display: grid; gap: 10px; padding: 16px; min-width: 0; box-shadow: inset 0 0 0 2px var(--ink, #16130a), 5px 5px 0 var(--sun, #ffe14a); }
.cs-line-head { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cs-key { padding: 3px 9px; border-radius: 999px; background: var(--sun-soft, #fff4b8); font: 700 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.cs-code { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--ink, #16130a); color: #fff8d6; font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }
.cs-code:focus-visible { outline: 3px solid var(--sun, #ffe14a); outline-offset: 2px; }
.cs-code--line { font-size: 13.5px; }
.cs-code-block { display: grid; gap: 6px; min-width: 0; position: relative; }
.cs-code-label { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; color: var(--ink-2, rgb(22 19 10 / 72%)); }
.cs-code-copy { justify-self: start; }
.cs-subhead { margin: 0 0 8px; font-size: 15px; font-weight: 800; }
.cs-where { min-width: 0; }
.cs-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.cs-tab { flex: none; min-height: 40px; padding: 8px 14px; border: 0; border-radius: 999px; background: #fff; color: var(--ink, #16130a); font: inherit; font-weight: 750; font-size: 14px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line-2, rgb(22 19 10 / 18%)); }
.cs-tab:hover { background: var(--sun-soft, #fff4b8); }
.cs-tab[aria-selected="true"] { background: var(--ink, #16130a); color: var(--sun, #ffe14a); box-shadow: none; }
.cs-tab:focus-visible { outline: 3px solid var(--sky, #6aa8ff); outline-offset: 2px; }
.cs-tabpanel { display: grid; gap: 12px; padding: 14px 16px; border-radius: 16px; background: #fffdf3; box-shadow: inset 0 0 0 1px var(--line-2, rgb(22 19 10 / 18%)); min-width: 0; }
.cs-steps li { overflow-wrap: anywhere; }
.cs-tags, .cs-line-details { min-width: 0; }
.cs-tags > summary, .cs-line-details > summary { cursor: pointer; font-weight: 750; min-height: 44px; display: flex; align-items: center; gap: 10px; list-style: none; }
.cs-tags > summary::-webkit-details-marker, .cs-line-details > summary::-webkit-details-marker { display: none; }
.cs-tags > summary::before, .cs-line-details > summary::before { content: '+'; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sun, #ffe14a); color: var(--ink, #16130a); font-weight: 900; }
.cs-tags[open] > summary::before, .cs-line-details[open] > summary::before { content: '\2212'; }
.cs-tag-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 16px; }
.cs-tag-list p { margin: 0 0 6px; overflow-wrap: anywhere; }
.cs-next { margin-top: 2px; }
.cs-result { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 14px 16px; align-items: start; }
.cs-result p { margin: 0 0 6px; overflow-wrap: anywhere; }
.cs-result p:last-child { margin-bottom: 0; }
.cs-result.is-ok { box-shadow: inset 0 0 0 2px var(--green, #167a43), 5px 5px 0 var(--green-soft, #dcf2e4); }
.cs-result.is-warn { box-shadow: inset 0 0 0 2px var(--ink, #16130a), 5px 5px 0 var(--sun-soft, #fff4b8); }
.cs-result-kicker { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2, rgb(22 19 10 / 72%)); }
.cs-result-tip { font-size: 13.5px; color: var(--ink-2, rgb(22 19 10 / 72%)); }
.cs-out[hidden] { display: none; }
.cs-send { margin: 0; }
.cs-link { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.cs-send-actions { margin-top: 12px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .cs-line, .cs-tabpanel { padding: 12px; }
  .cs-code { font-size: 12.5px; padding: 10px 12px; }
  .cs-next > .btn, .cs-check .gc-actions > .btn { width: 100%; }
  .cs-result { grid-template-columns: 36px minmax(0, 1fr); }
  .cs-result img { width: 36px; height: 36px; }
}
