/* Strategic Launch Protocol form — ported from forms/mockup/index-v3.html. */
/* ==========================================================================
   TOKENS — same DNA as v2 (try-saisify), light + dark themes
   ========================================================================== */
:root {
    --slp-saisify-purple:    #7525f9;
    --slp-saisify-purple-dk: #5b1cc7;
    --slp-hero-magenta:      #c220f0;
    --slp-hero-violet:       #8c3dff;
    --slp-grad-cta:          linear-gradient(135deg, #c220f0 0%, #8c3dff 100%);
    --slp-grad-section:      linear-gradient(135deg, #8c3dff 0%, #c220f0 100%);

    --slp-r-pill:   9999px;
    --slp-r-card:   18px;
    --slp-r-input:  10px;
    --slp-r-btn:    10px;

    --slp-dur-fast: 180ms;
    --slp-dur-med:  340ms;
    --slp-dur-slow: 480ms;
    --slp-ease:     cubic-bezier(0.22, 1, 0.36, 1);
}
:root[data-theme="light"] {
    --slp-page-bg:           #f8fafc;
    --slp-page-glow:         radial-gradient(ellipse 1100px 600px at 50% -10%, rgba(194,32,240,0.07), transparent 60%),
                             radial-gradient(ellipse 800px 500px at 100% 100%, rgba(117,37,249,0.06), transparent 60%);
    --slp-surface:           #ffffff;
    --slp-surface-soft:      #faf5ff;
    --slp-surface-tint:      #f5f0ff;
    --slp-card-border:       #ebe5fd;
    --slp-card-shadow:       0 1px 2px rgba(0,0,0,0.04),
                             0 12px 30px -10px rgba(117, 37, 249, 0.10),
                             0 40px 64px -32px rgba(117, 37, 249, 0.18);
    --slp-text:              #020817;
    --slp-text-soft:         #1e293b;
    --slp-text-muted:        #64748b;
    --slp-text-faint:        #94a3b8;
    --slp-form-label:        #7e22ce;
    --slp-border:            #e2e8f0;
    --slp-border-hover:      #d6cbfb;
    --slp-input-bg:          #f8fafc;
    --slp-section-chip-bg:   #f5f0ff;
    --slp-section-chip-fg:   #6b21a8;
    --slp-success-bg:        #dcfce7;
    --slp-success-fg:        #166534;
    --slp-progress-bg:       #f1f5f9;
    --slp-q-card-bg:         #ffffff;
    --slp-q-card-border:     #f1f5f9;
    --slp-divider:           #f1f5f9;
    --slp-logo-filter:       none;
}
:root[data-theme="dark"] {
    --slp-page-bg:           #1a0740;
    --slp-page-glow:         radial-gradient(ellipse 1200px 700px at 50% -8%, rgba(194,32,240,0.18), transparent 55%),
                             radial-gradient(ellipse 800px 500px at 80% 100%, rgba(140,61,255,0.16), transparent 60%),
                             radial-gradient(ellipse 600px 400px at 0% 60%, rgba(194,32,240,0.10), transparent 65%);
    --slp-surface:           rgba(42, 14, 94, 0.72);
    --slp-surface-soft:      rgba(58, 22, 122, 0.5);
    --slp-surface-tint:      rgba(140, 61, 255, 0.08);
    --slp-card-border:       rgba(194, 32, 240, 0.22);
    --slp-card-shadow:       0 0 0 1px rgba(255, 255, 255, 0.04) inset,
                             0 18px 40px -12px rgba(0,0,0,0.5),
                             0 40px 80px -32px rgba(194, 32, 240, 0.45);
    --slp-text:              #f2e7ff;
    --slp-text-soft:         #e8d8ff;
    --slp-text-muted:        rgba(242, 231, 255, 0.70);
    --slp-text-faint:        rgba(242, 231, 255, 0.45);
    --slp-form-label:        #d9b3ff;
    --slp-border:            rgba(255, 255, 255, 0.10);
    --slp-border-hover:      rgba(194, 32, 240, 0.45);
    --slp-input-bg:          rgba(20, 5, 60, 0.55);
    --slp-section-chip-bg:   rgba(194, 32, 240, 0.16);
    --slp-section-chip-fg:   #f2c8ff;
    --slp-success-bg:        rgba(25, 215, 94, 0.15);
    --slp-success-fg:        #7af0a7;
    --slp-progress-bg:       rgba(255, 255, 255, 0.08);
    --slp-q-card-bg:         rgba(58, 22, 122, 0.32);
    --slp-q-card-border:     rgba(255, 255, 255, 0.06);
    --slp-divider:           rgba(255, 255, 255, 0.08);
    --slp-logo-filter:       brightness(0) invert(1);
}

/* ==========================================================================
   PAGE SHELL
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--slp-page-bg); }
body {
    font-family: Inter, system-ui, sans-serif;
    color: var(--slp-text);
    background: var(--slp-page-bg);
    background-image: var(--slp-page-glow);
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--slp-dur-slow) var(--slp-ease);
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: transparent; color: inherit; }
input, textarea { outline: none; }

/* Theme toggle */
.theme-toggle {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 12px;
    background: var(--slp-surface);
    border: 1px solid var(--slp-card-border);
    border-radius: var(--slp-r-pill);
    color: var(--slp-text-soft);
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 16px -4px rgba(0,0,0,0.1);
    transition: background-color var(--slp-dur-fast), border-color var(--slp-dur-fast);
}
.theme-toggle:hover { border-color: var(--slp-border-hover); }
.theme-toggle svg { width: 14px; height: 14px; }
.theme-toggle .ico-moon { display: inline-block; }
.theme-toggle .ico-sun  { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun  { display: inline-block; }
.theme-toggle .label-light { display: inline; }
.theme-toggle .label-dark  { display: none; }
:root[data-theme="dark"] .theme-toggle .label-light { display: none; }
:root[data-theme="dark"] .theme-toggle .label-dark  { display: inline; }

.demo-host {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 60px 24px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* ==========================================================================
   WIDGET SHELL — wider for section view (760px max)
   ========================================================================== */
.slp-widget {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    font-family: Inter, system-ui, sans-serif;
    color: var(--slp-text);
    background: var(--slp-surface);
    border: 1px solid var(--slp-card-border);
    border-radius: var(--slp-r-card);
    box-shadow: var(--slp-card-shadow);
    isolation: isolate;
    overflow: hidden;
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    transition:
        background-color var(--slp-dur-slow) var(--slp-ease),
        border-color var(--slp-dur-slow) var(--slp-ease),
        box-shadow var(--slp-dur-slow) var(--slp-ease);
}

/* Hairline magenta accent at top */
.slp-widget::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #c220f0 30%, #8c3dff 70%, transparent 100%);
    opacity: 0.85;
    z-index: 2;
}

/* ==========================================================================
   HEADER (logo + autosave + section pill)
   ========================================================================== */
.slp-card-header {
    padding: 22px 32px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.slp-brand { display: inline-flex; align-items: center; gap: 10px; }
.slp-brand img { height: 22px; width: auto; filter: var(--slp-logo-filter); opacity: 0.95; }
.slp-brand-fallback { display: none; align-items: center; gap: 8px; }
.slp-brand-mark {
    width: 24px; height: 24px;
    border-radius: 7px;
    background: var(--slp-grad-cta);
    display: grid; place-items: center;
    color: #fff; font-weight: 800; font-size: 11px;
    box-shadow: 0 2px 8px rgba(194, 32, 240, 0.45);
}
.slp-brand-name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; color: var(--slp-text); }
.slp-meta-right { display: inline-flex; align-items: center; gap: 10px; }

.slp-section-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px 5px 9px;
    background: var(--slp-section-chip-bg);
    color: var(--slp-section-chip-fg);
    border-radius: var(--slp-r-pill);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.slp-section-chip-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--slp-hero-magenta);
    box-shadow: 0 0 0 3px rgba(194, 32, 240, 0.18), 0 0 8px rgba(194, 32, 240, 0.5);
    animation: slp-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes slp-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(194, 32, 240, 0.18), 0 0 8px rgba(194, 32, 240, 0.5); }
    50%      { box-shadow: 0 0 0 5px rgba(194, 32, 240, 0.06), 0 0 14px rgba(194, 32, 240, 0.7); }
}

/* 2026-05-07: mobile sizing for the section chip.
   - Default desktop sizing already works.
   - On phone-sized screens, shrink font + cap max-width + truncate with
     ellipsis if section title is long. Chip stays visible on iPhone 16 Pro
     (~402px viewport) and similar.
   - Below 370px (legacy iPhone SE 1st gen / Galaxy Fold inner), hide the
     chip entirely — section title is also shown inside the form body so
     no info is lost. */
@media (max-width: 600px) {
    .slp-section-chip {
        font-size: 10px;
        padding: 4px 9px 4px 8px;
        gap: 6px;
        max-width: 60vw;
        min-width: 0;
        overflow: hidden;
    }
    .slp-section-chip > span:not(.slp-section-chip-dot) {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }
}
@media (max-width: 369px) {
    .slp-section-chip { display: none; }
}

.slp-autosave {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--slp-success-bg);
    color: var(--slp-success-fg);
    border-radius: var(--slp-r-pill);
    font-size: 11px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(-3px);
    transition: opacity var(--slp-dur-fast) var(--slp-ease), transform var(--slp-dur-fast) var(--slp-ease);
    pointer-events: none;
}
.slp-autosave.visible { opacity: 1; transform: translateY(0); }
.slp-autosave svg { width: 10px; height: 10px; }

/* 2026-05-07 fix #4: distinct visual states for save success / retrying / error.
   .success keeps default green; .retrying = amber transient; .error = red persistent. */
.slp-autosave.retrying {
    background: #fef3c7;
    color: #92400e;
    pointer-events: auto;
}
.slp-autosave.error {
    background: #fee2e2;
    color: #991b1b;
    pointer-events: auto;
}

/* 2026-05-07 fix #1: submit-error banner replaces the old "silently open Calendly
   on submit failure" path. Shown inline when /api/slp/submit/ returns non-OK or
   throws. */
.slp-submit-error {
    /* 2026-05-08: was margin 0 32px 16px — error banner sat directly on the
       progress bar with no breathing room. Bumped top to 24px so the banner
       is visually clearly separate from the form chrome above it. */
    margin: 24px 32px 16px;
    padding: 14px 18px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    color: #7f1d1d;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.slp-submit-error strong { font-weight: 700; }
.slp-submit-error-msg { flex: 1 1 auto; min-width: 200px; }
.slp-submit-error-retry {
    flex: 0 0 auto;
    padding: 6px 14px;
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.slp-submit-error-retry:hover { background: #6d28d9; }

/* PROGRESS — section progress bar */
.slp-progress {
    margin: 16px 32px 0;
    height: 4px;
    background: var(--slp-progress-bg);
    border-radius: var(--slp-r-pill);
    overflow: hidden;
    position: relative;
}
.slp-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--slp-grad-cta);
    border-radius: var(--slp-r-pill);
    transition: width var(--slp-dur-slow) var(--slp-ease);
    box-shadow: 0 0 14px rgba(194, 32, 240, 0.5);
}

/* ==========================================================================
   SECTION HEADER — subtle, text-only (no gradient banner)
   ========================================================================== */
.slp-section-banner {
    margin: 28px 32px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.slp-section-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--slp-form-label);
    font-variant-numeric: tabular-nums;
}
.slp-section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--slp-text);
    letter-spacing: -0.022em;
    line-height: 1.2;
}

/* Optional section description — italic, muted */
.slp-section-desc {
    margin: 8px 32px 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--slp-text-muted);
    font-style: italic;
    max-width: 620px;
}

/* ==========================================================================
   BODY — stacked question cards
   ========================================================================== */
.slp-body {
    padding: 22px 32px 28px;
    position: relative;
    min-height: 280px;
}
.slp-section-pages { position: relative; }
.slp-page {
    display: none;
    flex-direction: column;
    gap: 14px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--slp-dur-med) var(--slp-ease), transform var(--slp-dur-med) var(--slp-ease);
}
.slp-page.active { display: flex; opacity: 1; transform: translateY(0); }

/* Questions are bare blocks separated by airy spacing + a hairline divider.
   No surrounding border — the card itself contains them. */
.slp-question {
    padding: 22px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-bottom: 1px solid var(--slp-divider);
}
.slp-question:last-child { border-bottom: 0; padding-bottom: 4px; }
.slp-question:first-child { padding-top: 8px; }

.slp-q-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.slp-q-num {
    flex-shrink: 0;
    width: 26px; height: 26px;
    display: inline-grid;
    place-items: center;
    background: var(--slp-section-chip-bg);
    color: var(--slp-section-chip-fg);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}
.slp-q-title-wrap { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.slp-q-prompt {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.005em;
    line-height: 1.35;
    color: var(--slp-text);
    margin: 0;
    /* Prevent orphaned words on the last line (Chrome 114+, Safari 17.5+, Firefox 121+) */
    text-wrap: pretty;
}
.slp-q-prompt .req {
    color: var(--slp-hero-magenta);
    font-weight: 800;
    margin-left: 0;
}
/* Non-breaking space before the asterisk so it can NEVER orphan to a new line.
   Replaces the old margin-left:2px gap. */
.slp-q-prompt .req::before {
    content: "\00A0";
}
.slp-q-help {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--slp-text-muted);
    margin: 0;
    font-style: italic;
}
.slp-q-help strong { color: var(--slp-text-soft); font-weight: 600; font-style: normal; }

/* INPUTS */
.slp-input {
    width: 100%;
    background: var(--slp-input-bg);
    border: 1px solid var(--slp-border);
    border-radius: var(--slp-r-input);
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.5;
    font-family: Inter, system-ui, sans-serif;
    color: var(--slp-text);
    transition:
        border-color var(--slp-dur-fast),
        box-shadow var(--slp-dur-fast),
        background-color var(--slp-dur-fast);
}
.slp-input::placeholder { color: var(--slp-text-faint); }
.slp-input:hover { border-color: var(--slp-border-hover); }
.slp-input:focus {
    border-color: var(--slp-hero-magenta);
    box-shadow:
        0 0 0 4px rgba(194, 32, 240, 0.10),
        0 6px 16px -8px rgba(194, 32, 240, 0.25);
}
textarea.slp-input { min-height: 90px; resize: vertical; }

/* Phone input — country-code trigger sits inline with the number field.
   The popover (search + country list) is portaled out via position:absolute
   so it can overflow the form card on small viewports. */
.slp-phone {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.slp-phone-cc {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: var(--slp-input-bg);
    border: 1px solid var(--slp-border);
    border-radius: var(--slp-r-input);
    font-size: 15px;
    font-family: Inter, system-ui, sans-serif;
    color: var(--slp-text);
    cursor: pointer;
    flex-shrink: 0;
    transition:
        border-color var(--slp-dur-fast),
        background-color var(--slp-dur-fast);
}
.slp-phone-cc:hover { border-color: var(--slp-border-hover); }
.slp-phone-cc[aria-expanded="true"] {
    border-color: var(--slp-hero-magenta);
    box-shadow: 0 0 0 4px rgba(194, 32, 240, 0.10);
}
.slp-phone-flag {
    font-size: 18px;
    line-height: 1;
}
.slp-phone-dial {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}
.slp-phone-caret {
    width: 10px; height: 7px;
    color: var(--slp-text-muted);
    flex-shrink: 0;
}
.slp-phone-input {
    flex: 1;
    min-width: 0;
}
.slp-phone-pop {
    /* position:fixed escapes the form card's overflow:hidden so the
       country list isn't clipped at the card edges. JS sets top/left
       via getBoundingClientRect() on open + on scroll/resize. */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: min(360px, calc(100vw - 32px));
    background: var(--slp-surface);
    border: 1px solid var(--slp-border);
    border-radius: var(--slp-r-input);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.04),
        0 12px 30px -10px rgba(117, 37, 249, 0.18),
        0 30px 60px -32px rgba(117, 37, 249, 0.30);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: min(420px, calc(100vh - 80px));
}
.slp-phone-pop[hidden] { display: none; }
.slp-phone-search {
    flex-shrink: 0;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--slp-divider);
    background: var(--slp-surface);
    padding: 12px 14px;
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    color: var(--slp-text);
    outline: none;
}
@media (max-width: 640px) {
    /* iOS Safari zooms in on any input < 16px on focus, which would also
       desync our position:fixed popover from the trigger. Bump to 16px on
       mobile only — desktop keeps the more compact 14px. */
    .slp-phone-search { font-size: 16px; }
}
.slp-phone-search::placeholder { color: var(--slp-text-faint); }
.slp-phone-list {
    overflow-y: auto;
    flex: 1;
    padding: 4px 0;
}
.slp-phone-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 14px;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    color: var(--slp-text);
    text-align: left;
    transition: background var(--slp-dur-fast);
}
.slp-phone-option:hover,
.slp-phone-option[aria-selected="true"] {
    background: var(--slp-surface-tint, #f5f0ff);
}
.slp-phone-option-flag {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}
.slp-phone-option-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.slp-phone-option-dial {
    color: var(--slp-text-muted);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.slp-phone-empty {
    padding: 16px 14px;
    color: var(--slp-text-muted);
    font-size: 13px;
    text-align: center;
}

/* 2026-05-07: voice-input mic button overlay. Wraps inputs/textareas with
   .slp-mic-wrap; mic button sits absolutely positioned in the top-right.
   Only rendered by JS when SpeechRecognition is supported (Chrome / Edge
   / Safari). Firefox users see no button. */
.slp-mic-wrap {
    position: relative;
    display: block;
}
.slp-mic-wrap > .slp-input {
    padding-right: 46px;   /* leave room for the mic button */
}
.slp-mic-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.08);
    color: #7c3aed;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: background var(--slp-dur-fast), color var(--slp-dur-fast);
    -webkit-tap-highlight-color: transparent;
}
.slp-mic-btn:hover {
    background: rgba(124, 58, 237, 0.16);
}
.slp-mic-btn svg { width: 15px; height: 15px; }
.slp-mic-btn.listening {
    background: #ef4444;
    color: #fff;
    animation: slp-mic-pulse 1.4s ease-in-out infinite;
}
@keyframes slp-mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
    50%      { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);    }
}

/* 2026-05-07: voice-input discovery banner — one-time, dismissible. Injected
   by JS only on browsers that support SpeechRecognition (Chrome / Edge /
   Safari). Auto-dismissed on first mic click OR when user clicks X. */
.slp-voice-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    padding: 12px 16px;
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.10), rgba(192, 38, 211, 0.07));
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: 12px;
    font-size: 13.5px;
    color: var(--slp-text);
    line-height: 1.4;
    animation: slp-voice-banner-in 0.35s ease-out;
}
@keyframes slp-voice-banner-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.slp-voice-banner-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.15);
    color: #7c3aed;
}
.slp-voice-banner-icon svg { width: 15px; height: 15px; }
.slp-voice-banner-text {
    flex: 1 1 auto;
    color: #4c1d95;
    font-weight: 500;
}
.slp-voice-banner-close {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    border-radius: 6px;
    padding: 0;
    transition: background var(--slp-dur-fast), color var(--slp-dur-fast);
}
.slp-voice-banner-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #111827;
}
@media (max-width: 600px) {
    .slp-voice-banner { font-size: 12.5px; padding: 10px 12px; }
}

.slp-input.error,
.slp-input.error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}
.slp-field-error {
    display: none;
    font-size: 12.5px;
    font-weight: 600;
    color: #ef4444;
    margin-top: -2px;
    line-height: 1.4;
}
.slp-field-error.visible { display: block; }

/* TYPO SUGGEST */
.slp-typo-suggest {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 10px 14px;
    margin-top: 4px;
    background: var(--slp-section-chip-bg);
    border: 1px solid var(--slp-card-border);
    border-radius: var(--slp-r-input);
    font-size: 13px;
    color: var(--slp-text-soft);
    line-height: 1.45;
}
.slp-typo-suggest.visible { display: flex; }
.slp-typo-suggest > svg.slp-typo-icon { width: 14px; height: 14px; flex-shrink: 0; color: var(--slp-hero-magenta); }
.slp-typo-suggest .slp-typo-msg { flex: 1; }
.slp-typo-suggest button.slp-typo-link {
    padding: 0; margin: 0;
    background: transparent;
    color: var(--slp-hero-magenta);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    font-size: inherit;
}
.slp-typo-suggest button.slp-typo-link:hover { color: var(--slp-hero-violet); }
.slp-typo-keep {
    flex-shrink: 0;
    padding: 7px 14px;
    background: var(--slp-surface);
    border: 1.5px solid var(--slp-border-hover);
    border-radius: var(--slp-r-pill);
    font-size: 12px;
    font-weight: 700;
    color: var(--slp-text);
    cursor: pointer;
    transition: background-color var(--slp-dur-fast), border-color var(--slp-dur-fast), color var(--slp-dur-fast), box-shadow var(--slp-dur-fast);
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.slp-typo-keep:hover {
    background: var(--slp-surface-tint);
    border-color: var(--slp-hero-magenta);
    color: var(--slp-section-chip-fg);
    box-shadow: 0 2px 6px rgba(194, 32, 240, 0.15);
}
.slp-typo-keep:active { transform: scale(0.97); }
@keyframes slp-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}
.slp-typo-suggest.shake {
    animation: slp-shake 360ms ease-in-out;
    border-color: var(--slp-hero-magenta);
    box-shadow: 0 0 0 3px rgba(194, 32, 240, 0.12);
}

/* RADIO OPTIONS — compact for dense section view */
.slp-options { display: flex; flex-direction: column; gap: 8px; }
.slp-options.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slp-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    padding-right: 36px;
    background: var(--slp-surface);
    border: 1px solid var(--slp-border);
    border-radius: var(--slp-r-input);
    cursor: pointer;
    text-align: left;
    width: 100%;
    font-family: Inter, system-ui, sans-serif;
    color: var(--slp-text);
    transition: border-color var(--slp-dur-fast) var(--slp-ease),
                background-color var(--slp-dur-fast) var(--slp-ease),
                box-shadow var(--slp-dur-fast) var(--slp-ease),
                transform var(--slp-dur-fast) var(--slp-ease);
}
:root[data-theme="dark"] .slp-option { background: var(--slp-input-bg); }
.slp-option:hover { border-color: var(--slp-border-hover); transform: translateX(2px); }
.slp-option.selected {
    border-color: var(--slp-hero-magenta);
    background: var(--slp-section-chip-bg);
    box-shadow:
        0 0 0 3px rgba(194, 32, 240, 0.10),
        0 6px 16px -8px rgba(194, 32, 240, 0.25);
}
.slp-option-radio {
    width: 18px; height: 18px;
    flex-shrink: 0;
    border: 1.5px solid var(--slp-border);
    border-radius: 50%;
    background: var(--slp-input-bg);
    display: grid;
    place-items: center;
    transition: all var(--slp-dur-fast) var(--slp-ease);
}
.slp-option-radio::after {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--slp-grad-cta);
    transform: scale(0);
    transition: transform var(--slp-dur-fast) var(--slp-ease);
}
.slp-option.selected .slp-option-radio { border-color: var(--slp-hero-magenta); }
.slp-option.selected .slp-option-radio::after { transform: scale(1); }
.slp-option-label {
    flex: 1;
    font-size: 14px;
    color: var(--slp-text);
    line-height: 1.45;
    font-weight: 500;
}
.slp-option-label strong { font-weight: 700; }
.slp-option.selected .slp-option-label { font-weight: 600; }

/* Scale cards */
.slp-option.scale-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    padding-right: 36px;
    gap: 8px;
    min-height: 130px;
}
.slp-option.scale-card .scale-head { display: flex; align-items: center; gap: 10px; width: 100%; }
.slp-option.scale-card .scale-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--slp-input-bg);
    color: var(--slp-text-muted);
    display: grid; place-items: center;
    font-weight: 800; font-size: 13px;
    border: 1px solid var(--slp-border);
    transition: all var(--slp-dur-fast) var(--slp-ease);
}
.slp-option.scale-card.selected .scale-num {
    background: var(--slp-grad-cta);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(194, 32, 240, 0.45);
}
.slp-option.scale-card .scale-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--slp-text);
    letter-spacing: -0.005em;
}
.slp-option.scale-card .scale-body {
    font-size: 12.5px;
    color: var(--slp-text-muted);
    line-height: 1.55;
}

/* ==========================================================================
   FOOTER — back / next + counter
   ========================================================================== */
.slp-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 32px 24px;
    border-top: 1px solid var(--slp-divider);
}
.slp-foot-left { display: inline-flex; align-items: center; gap: 12px; }
.slp-foot-right { display: inline-flex; align-items: center; gap: 12px; }

.slp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
    border-radius: var(--slp-r-pill);
    transition: background var(--slp-dur-fast), color var(--slp-dur-fast),
                box-shadow var(--slp-dur-fast), transform var(--slp-dur-fast);
    line-height: 1;
    height: 42px;
    color: var(--slp-text);
}
.slp-btn svg { width: 14px; height: 14px; }
.slp-btn:active { transform: scale(0.97); }

.slp-btn-primary {
    background: var(--slp-grad-cta);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.30) inset,
                0 8px 22px -4px rgba(194, 32, 240, 0.45);
}
.slp-btn-primary:hover {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.30) inset,
                0 12px 28px -4px rgba(194, 32, 240, 0.6);
    transform: translateY(-1px);
}
.slp-btn-primary:active { transform: translateY(0) scale(0.97); }

.slp-btn-ghost {
    background: var(--slp-surface);
    border: 1.5px solid var(--slp-border);
    color: var(--slp-text-soft);
}
.slp-btn-ghost:hover:not(:disabled) {
    background: var(--slp-surface-tint);
    border-color: var(--slp-border-hover);
    color: var(--slp-section-chip-fg);
}
.slp-btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

.slp-counter {
    font-size: 13px;
    color: var(--slp-text-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.slp-counter strong { color: var(--slp-text); font-weight: 800; }

/* "press Enter" hint removed 2026-05-07 — was unreliable across pages and
   misled users into pressing Enter and getting nothing. The keydown handler in
   slp.js still triggers Next/Submit on Enter where it works, but we no longer
   advertise it. */

/* ==========================================================================
   INTRO + FINAL — special layouts
   ========================================================================== */
.slp-intro,
.slp-final {
    padding: 32px 36px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.slp-intro-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--slp-section-chip-bg);
    color: var(--slp-section-chip-fg);
    border-radius: var(--slp-r-pill);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    align-self: flex-start;
}
.slp-intro-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--slp-text);
    margin: 0;
}
.slp-intro-title em {
    display: inline-block;
    font-style: italic;
    font-weight: 800;
    padding-right: 0.12em;
    margin-right: -0.04em;
    background: var(--slp-grad-cta);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.slp-intro-body {
    font-size: 15px;
    line-height: 1.65;
    color: var(--slp-text-soft);
    margin: 0;
    max-width: 580px;
    font-style: italic;
}
.slp-intro-body b, .slp-intro-body strong {
    font-style: normal; font-weight: 800;
    color: var(--slp-text);
}
.slp-intro-body.small {
    font-size: 13.5px;
    color: var(--slp-text-muted);
    font-style: normal;
}
.slp-intro-sig {
    font-size: 14px;
    font-weight: 700;
    color: var(--slp-form-label);
    margin-top: 4px;
}

.slp-final-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    background: var(--slp-success-bg);
    color: var(--slp-success-fg);
    border-radius: var(--slp-r-pill);
    font-size: 11.5px;
    font-weight: 700;
    align-self: flex-start;
}
.slp-final-eyebrow svg { width: 12px; height: 12px; }
.slp-cal {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 32px 24px;
    background: var(--slp-surface-tint);
    border: 1px solid var(--slp-card-border);
    border-radius: var(--slp-r-card);
}
.slp-cal-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--slp-grad-cta);
    color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 10px 24px -4px rgba(194, 32, 240, 0.55);
    margin-bottom: 4px;
}
.slp-cal-icon svg { width: 24px; height: 24px; }
.slp-cal-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--slp-section-chip-fg);
}
.slp-cal-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--slp-text);
    margin: 0;
    letter-spacing: -0.02em;
}
.slp-cal-desc {
    font-size: 14px;
    color: var(--slp-text-muted);
    line-height: 1.55;
    max-width: 400px;
    margin: 0;
}
.slp-cal .slp-btn { margin-top: 6px; padding: 13px 24px; height: auto; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 700px) {
    .demo-host { padding: 56px 14px 60px; }
    .slp-card-header { padding: 18px 18px 0; }
    .slp-progress { margin: 14px 18px 0; }
    .slp-section-banner { margin: 18px 18px 0; padding: 14px 16px; gap: 12px; }
    .slp-section-num { width: 36px; height: 36px; font-size: 14px; border-radius: 9px; }
    .slp-section-title { font-size: 17px; }
    .slp-section-desc { margin: 12px 18px 0; font-size: 13px; }
    .slp-body { padding: 18px 18px 22px; }
    .slp-foot { padding: 14px 18px 20px; }
    .slp-question { padding: 16px 16px; }
    .slp-q-prompt { font-size: 16px; }
    .slp-options.grid-2 { grid-template-columns: 1fr; }
    .slp-intro, .slp-final { padding: 24px 22px 18px; }
    .slp-intro-title { font-size: 26px; }
    .slp-widget { border-radius: 16px; }
}

/* iOS Safari zooms in on focus when an input's font-size is < 16px.
   Bump form controls to 16px on narrow viewports to prevent that. */
@media (max-width: 640px) {
    .slp-input,
    textarea.slp-input,
    select.slp-input {
        font-size: 16px;
    }
}
