/* =====================================================================================
   The signup page (Identity/Account/Register), invited and public (mockup 5,
   HeartBeatAppOthers/docs/mockups/prospect-signup-free-membership/Signup.dc.html).

   Colours are --hbs-* tokens: light on :root, dark under [data-theme="dark"] (theme.js
   stamps that on <html>). The app preview reads the app's own tokens instead
   (hb-app-tokens.css + hb-brand-tokens.js on #pvFrame), so it shows their colours.

   Motion: the owner wants the welcome to animate whatever the device's reduced-motion
   setting says (memory animate-regardless-of-reduced-motion), so nothing here checks
   prefers-reduced-motion. Every animation is short, runs once, and is on something that
   doesn't take input. A page that comes back from a failed post is drawn still (.hbs-still).
   ===================================================================================== */

:root {
    --hbs-page: #F4F3F8;
    --hbs-card: #FFFFFF;
    --hbs-ink: #1F1F29;
    --hbs-muted: #4A4A5C;
    --hbs-soft: #6B6B80;
    --hbs-line: #D4D2E0;
    --hbs-line-soft: #ECEAF4;
    --hbs-dash: #C9C5DE;
    --hbs-accent: #512BD4;
    --hbs-accent-ink: #4B25C7;
    --hbs-accent-hover: #3F1FB0;
    --hbs-on-accent: #FFFFFF;
    --hbs-accent-tint: #F3EFFF;
    --hbs-ok: #15803D;
    --hbs-ok-bg: #F2FBF5;
    --hbs-ok-line: #D9F0E1;
    --hbs-ok-ink: #1F3A2A;
    --hbs-strike: #B91C1C;
    --hbs-chip: #FFFFFF;
    --hbs-skel: #EDEDF2;
    --hbs-skel-2: #D9D9E1;
    --hbs-phone-rim: #1F1F29;
    --hbs-shadow: 0 1px 3px rgba(20, 20, 40, .08);
    --hbs-shine: rgba(255, 255, 255, .7);
    --hbs-tip-bg: #201F1E;
    --hbs-tip-fg: #F3F2F1;
    --hbs-error: #B42318;
    --hbs-focus: #512BD4;
}

[data-theme="dark"] {
    --hbs-page: #17161C;
    --hbs-card: #23222A;
    --hbs-ink: #F1F0F5;
    --hbs-muted: #C9C7D4;
    --hbs-soft: #A3A1B2;
    --hbs-line: #45434F;
    --hbs-line-soft: #34323D;
    --hbs-dash: #57546A;
    --hbs-accent: #A880FF;
    --hbs-accent-ink: #C2A6FF;
    --hbs-accent-hover: #BC9CFF;
    --hbs-on-accent: #1B1A19;
    --hbs-accent-tint: #2E2840;
    --hbs-ok: #5FD39C;
    --hbs-ok-bg: #14281D;
    --hbs-ok-line: #24442F;
    --hbs-ok-ink: #CDEFD9;
    --hbs-strike: #FF8A80;
    --hbs-chip: #2C2A35;
    --hbs-skel: #2C2B33;
    --hbs-skel-2: #3A3942;
    --hbs-phone-rim: #0B0B0F;
    --hbs-shadow: 0 1px 3px rgba(0, 0, 0, .4);
    --hbs-shine: rgba(255, 255, 255, .12);
    --hbs-tip-bg: #4A4948;
    --hbs-tip-fg: #FFFFFF;
    --hbs-error: #FF8A80;
    --hbs-focus: #C2A6FF;
}

body { background: var(--hbs-page); }

/* ---- Motion ---- */
@keyframes hbsPop { 0% { transform: scale(.3); opacity: 0; } 65% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes hbsRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes hbsPaint { from { clip-path: circle(0% at 36px 36px); } to { clip-path: circle(160% at 36px 36px); } }
@keyframes hbsStrike { from { width: 0; } to { width: 100%; } }
@keyframes hbsFade { from { opacity: 1; } to { opacity: .45; } }
@keyframes hbsShine { 0% { transform: translateX(-120%); } 100% { transform: translateX(260%); } }
@keyframes hbsPanelIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

.hbs .a-pop { opacity: 0; animation: hbsPop .6s cubic-bezier(.2, .9, .3, 1.2) forwards; animation-delay: var(--d, 0s); }
.hbs .a-rise { opacity: 0; animation: hbsRise .5s ease-out forwards; animation-delay: var(--d, 0s); }
.hbs .a-paint { clip-path: circle(0% at 36px 36px); animation: hbsPaint 1.1s cubic-bezier(.6, 0, .2, 1) forwards; animation-delay: var(--d, 0s); }
.hbs .a-strike { width: 0; animation: hbsStrike .45s ease-in forwards; animation-delay: var(--d, 0s); }
.hbs .a-fade { animation: hbsFade .4s ease forwards; animation-delay: var(--d, 0s); }
.hbs .a-shine { transform: translateX(-120%); animation: hbsShine 1.4s ease-in-out forwards; animation-delay: var(--d, 0s); }

/* Back from a failed post: everything where it ends up, at once. What moves after that (.is-live,
   set by signup.js on anything it animates later) moves as usual. */
.hbs.hbs-still .a-pop:not(.is-live), .hbs.hbs-still .a-rise:not(.is-live), .hbs.hbs-still .a-paint:not(.is-live),
.hbs.hbs-still .a-strike:not(.is-live), .hbs.hbs-still .a-fade:not(.is-live) { animation-duration: 0s; animation-delay: 0s; }
.hbs.hbs-still .a-shine { display: none; }

.hbs [hidden] { display: none !important; }

/* ---- Page ---- */
.hbs {
    min-height: 100vh;
    background: var(--hbs-page);
    color: var(--hbs-ink);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    padding: 24px 24px 40px;
    box-sizing: border-box;
}

.hbs *, .hbs *::before, .hbs *::after { box-sizing: border-box; }
.hbs a { color: var(--hbs-accent-ink); }
.hbs a:hover { color: var(--hbs-accent-hover); }

.hbs-brand { max-width: 1180px; margin: 0 auto 16px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; color: var(--hbs-ink); }
.hbs-brand a { color: inherit; text-decoration: none; }
/* The logo in each theme: one file pair (images/brand-on-light.svg, brand-on-dark.svg) for the whole portal. */
.hbs-logo { display: inline-flex; }
.hbs-logo img { height: 30px; width: auto; display: block; }
.hbs-logo .on-dark { display: none; }
[data-theme="dark"] .hbs-logo .on-light { display: none; }
[data-theme="dark"] .hbs-logo .on-dark { display: block; }
.hbs-brand-signin { margin-left: auto; font-weight: 500; font-size: 14px; }

.hbs-wrap { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }

.hbs-main {
    flex: 999 1 560px; min-width: 0;
    background: var(--hbs-card); border-radius: 18px; box-shadow: var(--hbs-shadow);
    padding: 36px 40px; display: flex; flex-direction: column; gap: 26px;
}

.hbs-aside {
    flex: 1 1 320px; max-width: 380px; margin: 0 auto;
    background: var(--hbs-card); border-radius: 18px; box-shadow: var(--hbs-shadow);
    padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 16px;
}

@media (min-width: 960px) {
    .hbs-aside { position: sticky; top: 16px; margin: 0; }
}

.hbs-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---- Welcome (invited) ---- */
.hbs-welcome {
    display: flex; gap: 18px; align-items: center;
    background: var(--hbs-accent-tint); border-radius: 14px; padding: 20px 22px;
    position: relative; overflow: hidden;
}

.hbs-welcome-badge {
    width: 56px; height: 56px; flex: 0 0 56px; border-radius: 14px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font: 700 22px Montserrat, Inter, sans-serif;
}

.hbs-welcome-badge img { width: 100%; height: 100%; object-fit: cover; }
.hbs-welcome-body { flex: 1 1 auto; min-width: 0; }
.hbs-welcome h1, .hbs-hello h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; color: var(--hbs-ink); }
.hbs-hello h1 { font-size: 24px; }
.hbs-welcome p, .hbs-hello p { margin: 4px 0 0; font-size: 15px; color: var(--hbs-muted); }

.hbs-chips { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.hbs-chips li {
    display: flex; align-items: center; gap: 6px;
    background: var(--hbs-chip); color: var(--hbs-ink); border-radius: 999px;
    padding: 5px 12px; font-size: 13px; font-weight: 500;
}
.hbs-chips svg { flex: 0 0 13px; stroke: var(--hbs-ok); }

.hbs-shine-bar {
    position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
    background: linear-gradient(100deg, transparent, var(--hbs-shine), transparent);
    pointer-events: none;
}

/* ---- Price strip: the plan's price as a note, or the agreed price with the old one struck out ---- */
.hbs-price {
    display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
    border-radius: 12px; padding: 14px 18px; font-size: 14px;
}

.hbs-price svg { flex: 0 0 20px; }
.hbs-price-text { flex: 1 1 240px; min-width: 0; }

.hbs-price.is-note { border: 1px dashed var(--hbs-dash); color: var(--hbs-muted); padding: 12px 16px; }
.hbs-price.is-note svg { stroke: var(--hbs-accent); }

.hbs-price.is-agreed { border: 1px solid var(--hbs-ok-line); background: var(--hbs-ok-bg); color: var(--hbs-ok-ink); }
.hbs-price.is-agreed svg { stroke: var(--hbs-ok); }

.hbs-price-figures { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; margin-left: auto; }
.hbs-price-was { position: relative; font-size: 14px; color: var(--hbs-soft); }
.hbs-price-was .hbs-strike-line { position: absolute; left: 0; top: 50%; height: 2px; background: var(--hbs-strike); }
.hbs-price-now { font-size: 20px; font-weight: 700; color: var(--hbs-ok); }
/* Free membership: no price to weigh up, just the date and a reassurance under it. */
.hbs-price-figures.is-free { flex-direction: column; align-items: flex-end; gap: 2px; }
.hbs-price-sub { font-size: 13px; color: var(--hbs-ok-ink); opacity: .8; white-space: normal; text-align: right; }

/* ---- Kind of organisation ---- */
.hbs-kind { display: flex; flex-direction: column; gap: 14px; border: 0; padding: 0; margin: 0; min-width: 0; }
.hbs-kind-h { margin: 6px 0 0; font-size: 16px; font-weight: 600; color: var(--hbs-ink); display: flex; align-items: center; gap: 6px; }
.hbs-kind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }

.hbs-kind-card { position: relative; display: block; margin: 0; cursor: pointer; }
.hbs-kind-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hbs-kind-face {
    min-height: 64px; height: 100%; padding: 10px 12px; border-radius: 12px;
    display: flex; flex-direction: column; gap: 2px;
    background: var(--hbs-card); border: 1px solid var(--hbs-line); color: var(--hbs-ink);
    transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.hbs-kind-card:hover .hbs-kind-face { border-color: var(--hbs-accent); }
.hbs-kind-label { font-size: 14px; font-weight: 600; }
.hbs-kind-hint { font-size: 12px; color: var(--hbs-soft); font-weight: 400; }
.hbs-kind-card input:checked + .hbs-kind-face { background: var(--hbs-accent-tint); border: 2px solid var(--hbs-accent); padding: 9px 11px; }
.hbs-kind-card input:focus-visible + .hbs-kind-face { outline: 3px solid var(--hbs-focus); outline-offset: 2px; }
.hbs-kind-note { margin: 0; font-size: 13px; color: var(--hbs-soft); min-height: 1.2em; }
.hbs-kind-error { margin: 0; font-size: 13px; color: var(--hbs-error); }

.hbs-kind-summary { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--hbs-muted); }
.hbs-kind-summary strong { color: var(--hbs-ink); }

/* ---- Step bar ---- */
.hbs-steps { display: flex; flex-direction: column; gap: 12px; }
.hbs-track { height: 6px; background: var(--hbs-line-soft); border-radius: 3px; overflow: hidden; }
.hbs-fill { height: 100%; width: 0; background: var(--hbs-accent); border-radius: 3px; transition: width .5s ease-out; }
.hbs-step-list { margin: 0; padding: 0; list-style: none; display: flex; text-align: center; font-size: 12px; color: var(--hbs-soft); }
.hbs-step { flex: 1 1 0; min-width: 0; padding: 0 2px; }
.hbs-step[hidden] { display: none; }
.hbs-step.is-active { color: var(--hbs-accent-ink); font-weight: 600; }
.hbs-step.is-skipped { opacity: .35; }
.hbs-step-tick { display: none; color: var(--hbs-ok); font-weight: 700; margin-left: 2px; }
.hbs-step.is-done .hbs-step-tick { display: inline-block; animation: hbsPop .6s cubic-bezier(.2, .9, .3, 1.2) both; animation-delay: var(--d, 0s); }
.hbs.hbs-still .hbs-step:not(.is-live).is-done .hbs-step-tick { animation: none; }
.hbs-step-count { display: none; font-size: 13px; color: var(--hbs-muted); }

/* ---- Form ---- */
.hbs-form { display: flex; flex-direction: column; gap: 18px; }
.hbs-panel { display: none; }
.hbs-panel.is-active { display: block; animation: hbsPanelIn .3s ease; }
.hbs-panel-h { margin: 0 0 16px; font-size: 20px; font-weight: 700; color: var(--hbs-ink); display: flex; align-items: center; gap: 6px; }
.hbs-sub-h { margin: 22px 0 10px; font-size: 15px; font-weight: 600; color: var(--hbs-ink); display: flex; align-items: center; gap: 6px; }

.hbs-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hbs-fields.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hbs-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hbs-field.is-wide { grid-column: 1 / -1; }
.hbs-field > label, .hbs-label { font-size: 14px; font-weight: 500; color: var(--hbs-ink); margin: 0; display: flex; align-items: center; gap: 6px; }
.hbs-optional { font-weight: 400; color: var(--hbs-soft); font-size: 13px; }

.hbs .hbs-input, .hbs .hbs-form select.hbs-input {
    height: 44px; width: 100%; border: 1px solid var(--hbs-line); border-radius: 10px; padding: 0 12px;
    font: 400 15px Inter, "Segoe UI", system-ui, sans-serif; color: var(--hbs-ink); background: var(--hbs-card);
}
.hbs .hbs-input:focus { outline: none; border-color: var(--hbs-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hbs-accent) 25%, transparent); }
.hbs .hbs-input[readonly] { background: var(--hbs-line-soft); }
.hbs input[type="file"].hbs-input { padding: 8px 10px; height: auto; }
.hbs input[type="color"].hbs-input { padding: 3px; cursor: pointer; }
.hbs .input-validation-error { border-color: var(--hbs-error) !important; }
.hbs .field-validation-error, .hbs .text-danger, .hbs label.error { color: var(--hbs-error) !important; font-size: 13px; font-weight: 400; }
.hbs .validation-summary-errors ul { margin: 0; padding-left: 18px; }
.hbs .validation-summary-valid { display: none; }

.hbs-address { display: flex; align-items: stretch; }
.hbs-address .hbs-input { border-top-right-radius: 0; border-bottom-right-radius: 0; text-align: right; }
.hbs-address-suffix {
    display: flex; align-items: center; padding: 0 12px; font-size: 14px; color: var(--hbs-muted);
    border: 1px solid var(--hbs-line); border-left: 0; border-radius: 0 10px 10px 0; background: var(--hbs-line-soft); white-space: nowrap;
}

.hbs-range { display: block; width: 100%; accent-color: var(--hbs-accent); }

.hbs-note { margin: 0; font-size: 13px; color: var(--hbs-soft); }
.hbs-alert { border-radius: 12px; padding: 12px 16px; font-size: 14px; }
.hbs-alert.is-warn { background: color-mix(in srgb, #F59E0B 14%, var(--hbs-card)); color: var(--hbs-ink); border: 1px solid color-mix(in srgb, #F59E0B 40%, var(--hbs-card)); }
.hbs-alert.is-error { background: color-mix(in srgb, var(--hbs-error) 10%, var(--hbs-card)); border: 1px solid color-mix(in srgb, var(--hbs-error) 35%, var(--hbs-card)); }

/* ---- Promo, plan, confirm ---- */
.hbs-promo { max-width: 420px; display: flex; flex-direction: column; gap: 10px; }
.hbs-promo-row { display: flex; gap: 10px; }
.hbs-promo-row .hbs-input { flex: 1 1 auto; text-transform: uppercase; }
.hbs-promo-result { margin: 0; color: var(--hbs-ok); font-size: 14px; min-height: 1.2em; }

.hbs-switch { display: flex; margin: 0 0 14px; border: 1px solid var(--hbs-accent); border-radius: 999px; overflow: hidden; max-width: 420px; }
.hbs-switch label { flex: 1 1 0; margin: 0; padding: 9px 12px; cursor: pointer; font-weight: 600; font-size: 14px; text-align: center; color: var(--hbs-ink); }
.hbs-switch input { position: absolute; opacity: 0; pointer-events: none; }
.hbs-switch label:has(input:checked) { background: var(--hbs-accent); color: var(--hbs-on-accent); }
.hbs-switch label:has(input:focus-visible) { outline: 3px solid var(--hbs-focus); outline-offset: -3px; }
.hbs-switch label:has(input:disabled) { opacity: .5; cursor: not-allowed; }

.hbs-plan {
    max-width: 480px; border: 2px solid var(--hbs-accent); border-radius: 14px; padding: 20px 22px;
    background: var(--hbs-accent-tint); color: var(--hbs-ink);
}
.hbs-plan h3 { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.hbs-plan ul { margin: 14px 0 0; padding-left: 20px; font-size: 14px; color: var(--hbs-muted); }
.hbs-plan-note { margin: 0 0 10px; color: var(--hbs-ok); font-size: 14px; }

.hbs-price-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hbs-price-table th, .hbs-price-table td { padding: 6px 0; }
.hbs-price-table th { text-align: left; font-weight: 400; }
.hbs-price-table td { text-align: right; font-weight: 600; white-space: nowrap; }
.hbs-price-table .hbs-price-total th, .hbs-price-table .hbs-price-total td { border-top: 1px solid var(--hbs-line); padding-top: 10px; font-weight: 700; font-size: 17px; }
.hbs-price-then { text-align: right; margin: 4px 0 0; font-size: 13px; color: var(--hbs-muted); }

.hbs-free-card { max-width: 520px; border: 1px solid var(--hbs-ok-line); background: var(--hbs-ok-bg); color: var(--hbs-ok-ink); border-radius: 14px; padding: 18px 22px; }
.hbs-free-card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.hbs-free-card p { margin: 6px 0 0; font-size: 14px; }

/* ---- Confirm: which demo recordings come over (invitations) ---- */
.hbs-recs { max-width: 560px; margin: 18px 0 0; padding: 16px 18px 6px; border: 1px solid var(--hbs-line); border-radius: 14px; background: var(--hbs-card); }
.hbs-recs-h { float: left; width: 100%; margin: 0 0 4px; padding: 0; font-size: 16px; font-weight: 700; color: var(--hbs-ink); }
.hbs-recs-bar { clear: both; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; color: var(--hbs-muted); padding-bottom: 8px; border-bottom: 1px solid var(--hbs-line-soft); }
.hbs-recs-quick { display: inline-flex; gap: 14px; }
.hbs-recs-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.hbs-recs-list li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--hbs-line-soft); }
.hbs-recs-list li:last-child { border-bottom: 0; }
.hbs-recs-list input[type=checkbox] { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--hbs-accent); }
.hbs-recs-list label { margin: 0; min-width: 0; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.hbs-rec-title { font-size: 14px; color: var(--hbs-ink); overflow-wrap: anywhere; }
.hbs-rec-meta { font-size: 12.5px; color: var(--hbs-soft); }
/* Chosen for them in Admin: a tick, no checkbox */
.hbs-recs-list.is-fixed .hbs-rec-tick { flex: 0 0 auto; margin-top: 2px; stroke: var(--hbs-ok); }
.hbs-rec-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.hbs-consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; font-size: 14px; }
.hbs-consent input[type=checkbox] { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--hbs-accent); }
.hbs-consent label { margin: 0; }
.hbs-captcha { margin-top: 14px; }

/* ---- Buttons ---- */
.hbs-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--hbs-line-soft); padding-top: 18px; }
.hbs-nav-end { margin-left: auto; display: flex; gap: 10px; }
.hbs-btn {
    height: 46px; padding: 0 28px; border-radius: 10px; cursor: pointer;
    font: 600 15px Inter, "Segoe UI", system-ui, sans-serif; border: 0;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: background-color .15s ease, border-color .15s ease;
}
.hbs-btn:focus-visible { outline: 3px solid var(--hbs-focus); outline-offset: 2px; }
.hbs-btn-primary { background: var(--hbs-accent); color: var(--hbs-on-accent); }
.hbs-btn-primary:hover { background: var(--hbs-accent-hover); }
.hbs-btn-quiet { height: 40px; padding: 0 16px; border: 1px solid var(--hbs-line); background: var(--hbs-card); color: var(--hbs-muted); font-weight: 500; font-size: 14px; }
.hbs-btn-quiet:hover { border-color: var(--hbs-accent); color: var(--hbs-ink); }
.hbs-btn[disabled] { opacity: .6; cursor: progress; }
.hbs-link-btn { border: 0; background: none; padding: 0; color: var(--hbs-accent-ink); font: inherit; text-decoration: underline; cursor: pointer; }

/* ---- Info tips: a small (i) that shows its words on hover, focus or tap ---- */
.hbs-tip { position: relative; display: inline-flex; }
.hbs-tip-btn {
    width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--hbs-soft); background: transparent;
    color: var(--hbs-soft); font: 700 11px/1 Georgia, serif; font-style: italic; padding: 0; cursor: help;
    display: inline-flex; align-items: center; justify-content: center;
}
.hbs-tip-btn:focus-visible { outline: 2px solid var(--hbs-focus); outline-offset: 2px; }
.hbs-tip-text {
    display: none; position: absolute; z-index: 30; left: 50%; top: calc(100% + 6px); transform: translateX(-50%);
    width: max-content; max-width: min(280px, 80vw); padding: 8px 10px; border-radius: 8px;
    background: var(--hbs-tip-bg); color: var(--hbs-tip-fg); font-size: 13px; font-weight: 400; line-height: 1.4; text-align: left;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}
.hbs-tip:hover .hbs-tip-text, .hbs-tip-btn:focus + .hbs-tip-text, .hbs-tip.is-open .hbs-tip-text { display: block; }

/* ---- The app preview ---- */
.hbs-aside-title { font-size: 15px; font-weight: 600; }
.hbs-phone {
    width: 260px; height: 430px; border-radius: 34px; border: 8px solid var(--hbs-phone-rim);
    overflow: hidden; position: relative; background: var(--hbs-skel);
    font-family: var(--pv-font-b, Lato, Inter, system-ui, sans-serif);
}
.hbs-phone-skel { position: absolute; inset: 0; background: var(--hbs-skel); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.hbs-phone-skel span { display: block; border-radius: 6px; background: var(--hbs-skel-2); }
.hbs-phone-paint {
    position: absolute; inset: 0; overflow: hidden;
    background: rgb(var(--color-sf-background)); color: rgb(var(--color-sf-on-surface));
}
.hbs-phone-bar {
    background: rgb(var(--color-sf-primary)); color: rgb(var(--color-sf-on-primary));
    padding: 16px; display: flex; align-items: center; gap: 10px; min-height: 62px;
}
.hbs-phone-badge {
    width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; overflow: hidden;
    background: rgb(var(--color-sf-on-primary)); color: rgb(var(--color-sf-primary));
    display: flex; align-items: center; justify-content: center; font: 700 12px Montserrat, Inter, sans-serif;
}
.hbs-phone-badge img { width: 100%; height: 100%; object-fit: cover; }
.hbs-phone-name { font: 700 15px var(--pv-font-h, Montserrat), Inter, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbs-phone-wide { height: 26px; max-width: 170px; object-fit: contain; }
.hbs-phone-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.hbs-phone-welcome { font: 700 calc(17px * var(--pv-hscale, 1)) var(--pv-font-h, Montserrat), Inter, sans-serif; }
.hbs-phone-when { font-size: calc(13px * var(--pv-bscale, 1)); color: rgb(var(--color-sf-on-surface-variant)); }
.hbs-phone-cta {
    align-self: flex-start; background: rgb(var(--color-sf-secondary)); color: rgb(var(--color-sf-on-secondary));
    font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
}
.hbs-phone-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.hbs-phone-tile {
    height: 64px; border-radius: 10px; display: flex; align-items: flex-end; padding: 8px 10px;
    font: 600 12px Inter, sans-serif;
    background: rgb(var(--color-sf-primary-container)); color: rgb(var(--color-sf-on-primary-container));
}
.hbs-phone-tile:nth-child(2), .hbs-phone-tile:nth-child(3) {
    background: rgb(var(--color-sf-secondary-container)); color: rgb(var(--color-sf-on-secondary-container));
}
.hbs-phone-note { margin: 0; font-size: 13px; color: var(--hbs-soft); text-align: center; }

.hbs-theme-switch { display: inline-flex; background: var(--hbs-page); border: 1px solid var(--hbs-line); border-radius: 10px; padding: 3px; }
.hbs-theme-switch button {
    height: 30px; padding: 0 12px; border: 0; border-radius: 8px; cursor: pointer; background: transparent;
    color: var(--hbs-muted); font: 600 13px Inter, "Segoe UI", sans-serif;
}
.hbs-theme-switch button[aria-pressed="true"] { background: var(--hbs-accent); color: var(--hbs-on-accent); }
.hbs-theme-switch button:focus-visible { outline: 2px solid var(--hbs-focus); outline-offset: 1px; }

/* ---- Narrower screens ---- */
@media (max-width: 760px) {
    .hbs { padding: 12px 12px 28px; }
    .hbs-main { padding: 22px 18px; gap: 20px; border-radius: 14px; }
    .hbs-aside { border-radius: 14px; }
    .hbs-welcome { flex-direction: column; align-items: flex-start; padding: 18px; }
    .hbs-fields, .hbs-fields.is-three { grid-template-columns: minmax(0, 1fr); }
    .hbs-kind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* Seven labels don't fit across a phone: the bar keeps a mark for each step and names the one you're on. */
    .hbs-step-list { gap: 4px; }
    .hbs-step-label, .hbs-step-tick { display: none !important; }
    .hbs-step::before { content: ""; display: block; height: 4px; border-radius: 2px; background: var(--hbs-line-soft); }
    .hbs-step.is-done::before { background: var(--hbs-ok); }
    .hbs-step.is-active::before { background: var(--hbs-accent); }
    .hbs-track { display: none; }
    .hbs-step-count { display: block; }
    .hbs-price-figures { margin-left: 0; }
    .hbs-nav { flex-wrap: wrap; }
    .hbs-btn { padding: 0 20px; }
}
