/**
 * MAIN STYLES
 * All colors must come from theme.css tokens.
 * No hardcoded colors allowed.
 */

/* ===== RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

/* Prevent scroll on start screen */
body:has(.start-screen.active) {
    overflow: hidden;
    height: 100dvh;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ===== BASE ===== */
body {
    font-family: var(--font-family);
    font-size: var(--body);
    line-height: var(--line-height-relaxed);
    color: var(--text);
    background: var(--bg);
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
}

.app {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ===== CONTAINER ===== */
.container {
    width: var(--container-max);
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-4);
    padding-top: clamp(2rem, 5vw, 4.5rem);
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .container {
        padding: var(--space-6);
        padding-top: clamp(2rem, 5vw, 4.5rem);
    }
}

/* ===== CARD ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(1.125rem, 2.2vw, 1.75rem);
    box-shadow: var(--shadow-soft);
    max-width: var(--card-max);
    width: 100%;
}

.card--flat {
    box-shadow: none;
}

.card--accent {
    border-color: var(--accent);
    background: var(--surface);
}

/* ===== TYPOGRAPHY ===== */
.h1, .title {
    font-size: var(--h1);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--text);
    letter-spacing: -0.02em;
}

.h2 {
    font-size: var(--h2);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--text);
}

.lead, .subtitle {
    font-size: var(--body);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    color: var(--text-muted);
}

.label {
    font-size: var(--label);
    font-weight: var(--font-weight-semibold);
    color: var(--text);
}

.hint {
    font-size: var(--caption);
    color: var(--text-muted);
}

.text-sm {
    font-size: var(--label);
}

.text-xs {
    font-size: var(--caption);
}

.text-muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

/* ===== FIELD & INPUT ===== */
.field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.field__label {
    font-size: var(--label);
    font-weight: var(--font-weight-semibold);
    color: var(--text);
}

.field__hint {
    font-size: var(--caption);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

.input,
input[type="text"],
input[type="email"] {
    width: 100%;
    height: clamp(3.25rem, 6vw, 3.5rem);
    padding: 0.875rem 1rem;
    font-family: inherit;
    font-size: var(--body);
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input::placeholder,
input[type="text"]::placeholder,
input[type="email"]::placeholder {
    color: var(--text-muted);
}

.input:hover,
input[type="text"]:hover,
input[type="email"]:hover {
    border-color: var(--accent);
}

.input:focus,
input[type="text"]:focus,
input[type="email"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--focus);
}

.input:disabled,
input[type="text"]:disabled,
input[type="email"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    height: clamp(3rem, 5vw, 3.25rem);
    padding: 0 var(--space-6);
    font-family: inherit;
    font-size: var(--body);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    outline: none;
}

.btn:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--surface);
}

.btn:focus-visible {
    box-shadow: 0 0 0 4px var(--focus);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
    height: clamp(3.25rem, 6vw, 3.5rem);
    border-radius: var(--radius-full);
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    font-weight: var(--font-weight-semibold);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-primary:active:not(:disabled) {
    background: var(--accent-active);
    border-color: var(--accent-active);
    transform: translateY(1px);
}

.btn-primary:focus-visible {
    box-shadow: 0 0 0 4px var(--focus);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg);
    border-color: var(--text-muted);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
    background: var(--surface);
    color: var(--text);
}

.btn--lg, .btn-lg {
    height: clamp(3.25rem, 6vw, 3.5rem);
    padding: 0 var(--space-8);
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    border-radius: var(--radius-full);
}

.btn--block, .btn-block {
    width: 100%;
}

/* ===== OPTION TILES (Quiz answers) ===== */
.option-tile {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--body);
    color: var(--text);
    text-align: left;
    width: 100%;
}

.option-tile:hover {
    border-color: var(--accent);
    background: var(--surface);
}

.option-tile:has(input:checked) {
    border-color: var(--accent);
    background: var(--surface);
}

.option-tile:has(input:focus-visible) {
    box-shadow: 0 0 0 3px var(--focus);
}

.option-tile input[type="radio"],
.option-tile input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.option-tile span {
    flex: 1;
}

/* ===== PROGRESS ===== */
.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--bg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
}

.progress-indicator__text {
    font-size: var(--label);
    color: var(--text-muted);
    font-weight: var(--font-weight-medium);
}

.progress-indicator__bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: var(--radius-full);
    margin-left: var(--space-4);
    overflow: hidden;
}

.progress-indicator__fill {
    height: 100%;
    background: var(--accent);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress {
    height: 6px;
    background: var(--border);
    border: none;
    border-radius: var(--radius-full);
    margin: var(--space-6) 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

/* ===== SCREENS ===== */
.screen {
    display: none;
    flex: 1;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

.screen-header {
    font-size: var(--h2);
    font-weight: var(--font-weight-semibold);
    color: var(--text);
    margin-bottom: var(--space-4);
    letter-spacing: -0.01em;
}

.screen-step {
    display: none;
}

/* ===== QUESTION SECTIONS ===== */
.section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}

.section-title {
    font-size: var(--body);
    font-weight: var(--font-weight-semibold);
    color: var(--text);
    margin-bottom: var(--space-4);
    line-height: var(--line-height-normal);
}

.section label {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    margin: var(--space-2) 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--body);
}

/* Hover only on desktop (no white flash) */
@media (hover: hover) {
    .section label:hover {
        background: rgba(221, 194, 255, 0.25);
        border-color: rgba(64, 30, 105, 0.25);
    }
}

/* Selected state - more prominent than hover */
.section label:has(input:checked) {
    background: rgba(221, 194, 255, 0.35);
    border-color: rgba(64, 30, 105, 0.5);
}

.section input[type="radio"],
.section input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    accent-color: var(--text); /* #401e69 for radio dot */
    flex-shrink: 0;
}

/* ===== ACTIONS (Bottom nav) ===== */
.actions {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-5) 0;
    margin-top: auto;
}

.actions .btn {
    flex: 1;
}

.actions .btn:only-child {
    flex: none;
    margin-left: auto;
}

/* ===== QUIZ SCREENS (02-05) STICKY FOOTER ===== */
/* Target only ACTIVE quiz screens via data-testid */
.screen.active[data-testid^="screen-quiz-"] {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding-bottom: 0;
}

/* Quiz content area - scrollable (only when active) */
.screen.active[data-testid^="screen-quiz-"] > :not(.actions) {
    flex-shrink: 0;
}

/* Sticky header for quiz - card style, flush with top */
.screen.active[data-testid^="screen-quiz-"] .progress-indicator {
    position: sticky;
    top: 0;
    z-index: 10;
    margin: 0;
    margin-bottom: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

/* Sticky footer for quiz - card style with full rounding */
.screen.active[data-testid^="screen-quiz-"] .actions {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    margin-top: auto;
    padding: var(--space-4);
    padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 -4px 16px rgba(64, 30, 105, 0.06);
    z-index: 10;
}

/* Remove container top/bottom padding for quiz screens */
.container:has(.screen.active[data-testid^="screen-quiz-"]) {
    padding-top: 0;
    padding-bottom: 0;
}

/* ===== QUIZ DESKTOP: STICKY HEADER + FOOTER ===== */
@media (min-width: 1024px) {
    /* No top padding - header flush with top */
    .container:has(.screen.active[data-testid^="screen-quiz-"]) {
        padding-top: 0;
    }

    /* Progress indicator as card, flush with top */
    .screen.active[data-testid^="screen-quiz-"] .progress-indicator {
        position: sticky;
        top: 0;
        z-index: 10;
        margin: 0;
        margin-bottom: var(--space-5);
        padding: var(--space-4);
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-card);
    }

    /* Hide screen-step on desktop (redundant with progress-indicator) */
    .screen.active[data-testid^="screen-quiz-"] .screen-step {
        display: none;
    }

    /* Sticky footer with card styling */
    .screen.active[data-testid^="screen-quiz-"] .actions {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        box-shadow: 0 -4px 16px rgba(64, 30, 105, 0.06);
        padding: var(--space-4);
    }
}

/* ===== RESULT BLOCKS ===== */
.result-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin: var(--space-4) 0;
}

.result-block h3 {
    font-size: var(--label);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}

/* ===== ALERTS ===== */
.warning {
    background: var(--warning-bg);
    border: 1px solid var(--warning);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin: var(--space-4) 0;
    font-size: var(--label);
    color: var(--text);
}

.error {
    background: var(--danger-bg);
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin: var(--space-4) 0;
    font-size: var(--label);
    color: var(--text);
}

.success {
    background: var(--success-bg);
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin: var(--space-4) 0;
    font-size: var(--label);
    color: var(--text);
}

/* ===== PRICE ===== */
.price {
    font-size: var(--h1);
    font-weight: var(--font-weight-bold);
    color: var(--text);
    margin: var(--space-2) 0;
}

.guarantee {
    font-size: var(--caption);
    color: var(--text-muted);
}

/* ===== CHECKLIST ===== */
.checklist {
    list-style: none;
}

.checklist li {
    padding: var(--space-2) 0;
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: var(--label);
}

.checklist li:before {
    content: "✓";
    color: var(--accent);
    font-weight: var(--font-weight-semibold);
    flex-shrink: 0;
}

/* ===== DIVIDER ===== */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--space-5) 0;
}

/* ===== META ===== */
.meta {
    font-size: var(--caption);
    color: var(--text-muted);
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
    line-height: var(--line-height-relaxed);
}

/* ===== TELEGRAM/EMAIL MOCK ===== */
.telegram-mock,
.email-mock {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin: var(--space-4) 0;
}

/* ===== PAID SECTIONS ===== */
.paid-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin: var(--space-4) 0;
    padding: var(--space-5);
    overflow: hidden;
}

.paid-section-title {
    background: var(--accent);
    color: var(--accent-text);
    padding: var(--space-3) var(--space-5);
    margin: calc(var(--space-5) * -1);
    margin-bottom: var(--space-5);
    font-weight: var(--font-weight-semibold);
    font-size: var(--label);
    letter-spacing: 0.02em;
}

.paid-section-title--muted {
    background: var(--text-muted);
    color: var(--surface);
}

.paid-section-title--success {
    background: var(--success);
    color: var(--surface);
}

/* ===== INCI BLOCKS ===== */
.inci-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin: var(--space-3) 0;
}

.inci-section-title {
    font-weight: var(--font-weight-semibold);
    color: var(--text);
    margin: 0 0 var(--space-2) 0;
    font-size: var(--label);
}

.inci-list {
    margin: 0 0 var(--space-3) 0;
    padding-left: 0;
    list-style: none;
}

.examples-list {
    margin: 0 0 var(--space-3) 0;
    padding-left: 0;
    list-style: none;
}

.examples-list li {
    color: #5a9a5a;
    margin-bottom: var(--space-1);
}

.mistakes-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.mistakes-list li {
    margin-bottom: var(--space-2);
}

.simple-list {
    margin: var(--space-3) 0;
    padding-left: 0;
    list-style: none;
}

.simple-list li {
    padding: 0;
    margin-bottom: 4px;
}

.inci-list li {
    font-size: var(--label);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-1);
}

.inci-list li strong {
    font-family: ui-monospace, 'SF Mono', monospace;
    background: var(--border);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: var(--caption);
}

.inci-look-for li strong {
    color: var(--accent-text);
    background: var(--accent);
}

.inci-avoid li strong {
    color: var(--danger);
    background: var(--danger-bg);
}

.inci-anchor {
    font-size: var(--label);
    margin: 0;
    padding: var(--space-3) var(--space-4);
    background: var(--warning-bg);
    border-left: 3px solid var(--warning);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ===== SCIENCE NOTE (top info block) ===== */
.science-note {
    background: rgba(221, 194, 255, 0.12);
    border: 1px solid rgba(64, 30, 105, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    font-size: var(--label);
    line-height: var(--line-height-normal);
    color: var(--text);
    text-align: left;
}

/* ===== FORMAT NOTE ===== */
.format-note {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin: var(--space-4) 0;
}

.format-note-title {
    font-weight: var(--font-weight-semibold);
    color: var(--accent-text);
    margin: 0 0 var(--space-2) 0;
    font-size: var(--label);
}

.format-note ul {
    margin: 0;
    padding-left: var(--space-5);
}

.format-note li {
    font-size: var(--label);
    line-height: var(--line-height-normal);
    margin-bottom: var(--space-1);
}

/* ===== OVERLAP RULES ===== */
.overlap-rules {
    background: var(--warning-bg);
    border: 1px solid var(--warning);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin: var(--space-4) 0;
}

.overlap-rules-title {
    font-weight: var(--font-weight-semibold);
    color: var(--warning);
    margin: 0 0 var(--space-2) 0;
    font-size: var(--label);
}

.overlap-rules ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.overlap-rules li {
    font-size: var(--label);
    line-height: var(--line-height-normal);
    margin-bottom: var(--space-1);
}

/* ===== PRICE BLOCK WITH FLAGS ===== */
.price-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin: var(--space-5) 0;
    padding: var(--space-5);
    background: var(--bg);
    border-radius: var(--radius-lg);
}

.price-block .price {
    margin: 0;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-4) 0;
    font-size: var(--label);
}

th, td {
    border: 1px solid var(--border);
    padding: var(--space-3);
    text-align: left;
}

th {
    background: var(--bg);
    font-weight: var(--font-weight-semibold);
}

/* ===== DEBUG TOOLS ===== */
.reset-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--danger);
    color: var(--surface);
    border: none;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--caption);
    font-family: var(--font-family);
    z-index: 1000;
}

.debug {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--text);
    color: var(--accent);
    padding: var(--space-3);
    font-size: var(--caption);
    font-family: ui-monospace, monospace;
    max-width: 300px;
    display: none;
    border-radius: var(--radius-md);
    z-index: 1000;
}

.debug.visible {
    display: block;
}

#debug-tools {
    display: none;
}

#debug-tools.visible {
    display: block;
}

.required {
    color: var(--danger);
}

/* ===== HIDDEN UTILITY ===== */
.hidden {
    display: none !important;
}

/* ===== START SCREEN ===== */
/* Break out of container to take full viewport */
.container:has(.start-screen.active) {
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    min-height: 100dvh;
}

.start-screen.active {
    flex: none; /* override .screen flex: 1 */
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column; /* explicit */
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 2.5rem);
    padding-top: calc(clamp(1rem, 3vw, 2.5rem) + env(safe-area-inset-top, 0px));
    padding-bottom: calc(clamp(1rem, 3vw, 2.5rem) + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    box-sizing: border-box;
}

/* Small height devices: tighter spacing */
@media (max-height: 700px) {
    .start-screen.active {
        padding: 0.75rem;
        padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }
    .start-block {
        padding: 1rem 1.25rem;
    }
    .start-block__title {
        font-size: 1.5rem;
        margin-bottom: 0.375rem;
    }
    .start-block__subtitle {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
    .start-block .input {
        height: 2.75rem;
        margin-bottom: 0.5rem;
    }
    .start-block .btn {
        height: 2.75rem;
    }
}

/* ===== START BLOCK ===== */
.start-block {
    width: min(24rem, 92vw); /* max 384px - more square */
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 2rem);
    text-align: center;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transform: translateY(-8vh); /* slightly above center ~10% */
}

.start-block__title {
    font-size: clamp(1.625rem, 3.2vw, 2.25rem); /* 26px - 36px */
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 clamp(0.5rem, 1vh, 0.75rem);
}

.start-block__subtitle {
    font-size: clamp(0.875rem, 1.6vw, 1.125rem); /* 14px - 18px */
    font-weight: 400;
    color: var(--text-soft);
    line-height: 1.45;
    margin: 0 0 clamp(1rem, 2vh, 1.5rem);
}

.start-block .input {
    width: 100%;
    height: clamp(2.75rem, 5vh, 3.25rem);
    padding: 0 1rem;
    text-align: left;
    margin-bottom: clamp(0.5rem, 1vh, 0.75rem);
}

.start-block .btn {
    width: 100%;
    height: clamp(3rem, 5.5vh, 3.5rem);
}

/* ===== FEATURE LIST ===== */
.features {
    display: none;
}

/* ===== ACCORDION ===== */
.accordion {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: var(--space-4) 0;
}

.accordion__item {
    border-bottom: 1px solid var(--border);
}

.accordion__item:last-child {
    border-bottom: none;
}

.accordion__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background: var(--surface);
    cursor: pointer;
    font-weight: var(--font-weight-medium);
    font-size: var(--label);
    transition: background var(--transition-fast);
}

.accordion__header:hover {
    background: var(--bg);
}

.accordion__icon {
    transition: transform var(--transition-fast);
}

.accordion__item.open .accordion__icon {
    transform: rotate(180deg);
}

.accordion__content {
    display: none;
    padding: 0 var(--space-4) var(--space-4);
}

.accordion__item.open .accordion__content {
    display: block;
}

/* ===== BLURRED PREVIEW ===== */
.blur-preview {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin: var(--space-4) 0;
}

.blur-preview__content {
    filter: blur(4px);
    opacity: 0.6;
    pointer-events: none;
    padding: var(--space-4);
    background: var(--bg);
}

.blur-preview__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    opacity: 0.9;
    backdrop-filter: blur(2px);
    padding: var(--space-4);
    text-align: center;
}

.blur-preview__icon {
    font-size: 2rem;
    margin-bottom: var(--space-3);
}

.blur-preview__text {
    font-size: var(--label);
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

/* ===== PAYWALL CARD ===== */
.paywall-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
    margin: var(--space-6) 0;
}

.paywall-card__badge {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-text);
    font-size: var(--caption);
    font-weight: var(--font-weight-semibold);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.paywall-card__title {
    font-size: var(--h2);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-4);
    color: var(--text);
}

/* ===== SUCCESS SCREEN ===== */
.success-block {
    text-align: center;
    padding: var(--space-8) var(--space-4);
}

.success-block__icon {
    width: 4rem;
    height: 4rem;
    background: var(--success-bg);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    font-size: 2rem;
    color: var(--success);
}

.success-block__title {
    font-size: var(--h2);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-2);
    color: var(--text);
}

.success-block__text {
    color: var(--text-muted);
    font-size: var(--label);
}

/* ===== TOC ===== */
.toc {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-6);
}

.toc__title {
    font-size: var(--label);
    font-weight: var(--font-weight-semibold);
    color: var(--text-muted);
    margin-bottom: var(--space-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toc__list {
    list-style: none;
}

.toc__item {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border);
}

.toc__item:last-child {
    border-bottom: none;
}

.toc__link {
    color: var(--text);
    text-decoration: none;
    font-size: var(--label);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.toc__link:hover {
    text-decoration: underline;
    color: var(--accent-text);
}

/* ===== INCLUDES LIST ===== */
.includes-list {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin: var(--space-4) 0;
}

.includes-list__title {
    font-weight: var(--font-weight-semibold);
    font-size: var(--label);
    margin-bottom: var(--space-3);
    color: var(--text);
}

.includes-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.includes-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-2) 0;
    font-size: var(--label);
}

.includes-list li::before {
    content: "✓";
    color: var(--success);
    font-weight: var(--font-weight-semibold);
}

/* ===== UTILITY CLASSES ===== */
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

/* Content blocks with consistent spacing */
.content-block {
    margin-bottom: var(--space-4);
}

.content-block h4 {
    font-size: var(--body);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-2);
    color: var(--text);
}

.content-block p {
    margin-bottom: var(--space-2);
    color: var(--text);
}

.content-block p:last-child {
    margin-bottom: 0;
}

/* Info box styles */
.info-box {
    background: var(--bg);
    padding: var(--space-3);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-3);
}

.info-box--success {
    background: var(--success-bg);
}

.info-box p {
    font-size: var(--label);
    margin: 0;
}

/* Preview block (blurred) */
.preview-block {
    background: var(--bg);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
}

.preview-block__title {
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-2);
    color: var(--text);
}

.preview-block__content {
    font-size: var(--label);
    color: var(--text-muted);
    filter: blur(2px);
    user-select: none;
}

.preview-block__note {
    font-size: var(--caption);
    color: var(--text-muted);
    margin-top: var(--space-2);
}

/* List styles */
.styled-list {
    margin: 0 0 var(--space-4) 0;
    padding-left: var(--space-5);
}

.styled-list li {
    font-size: var(--label);
    margin-bottom: var(--space-2);
}

/* Debug scenario box */
.debug-scenario {
    display: none;
    font-family: ui-monospace, monospace;
    font-size: var(--caption);
    color: var(--text-muted);
    margin-bottom: var(--space-3);
    padding: var(--space-2);
    background: var(--bg);
}

/* Screen header area */
.screen-header-area {
    text-align: center;
    margin-bottom: var(--space-6);
}

.screen-header-area__icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-3);
}

.screen-header-area__icon--sm {
    font-size: 2rem;
}

/* Email field wrapper */
.email-field {
    margin-bottom: var(--space-4);
}

.email-field__label {
    display: block;
    font-size: var(--label);
    color: var(--text-muted);
    margin-bottom: var(--space-2);
}

/* Section with inline button */
.section--action {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.section--action .btn {
    width: 100%;
}

.section--action__hint {
    font-size: var(--caption);
    color: var(--text-muted);
}

/* QA Panel */
.qa-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--text);
    opacity: 0.95;
    z-index: 9999;
    overflow: auto;
    padding: var(--space-4);
}

.qa-panel__inner {
    max-width: 56rem;
    margin: 0 auto;
    background: var(--surface);
    padding: var(--space-4);
    border-radius: var(--radius-md);
}

.qa-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.qa-panel__title {
    margin: 0;
    font-size: var(--h2);
    color: var(--text);
}

.qa-panel__results {
    font-family: ui-monospace, monospace;
    font-size: var(--caption);
}

/* ===== INLINE STYLE REPLACEMENTS ===== */
/* These classes replace inline styles from HTML */

/* Debug scenario boxes (hidden by default) */
.debug-box {
    display: none;
    font-family: ui-monospace, monospace;
    font-size: var(--caption);
    color: var(--text-muted);
    margin-bottom: var(--space-3);
    padding: var(--space-2);
    background: var(--bg);
}

/* Content block with margin bottom */
.content-mb {
    margin-bottom: var(--space-4);
}

.content-mb-sm {
    margin-bottom: var(--space-3);
}

/* Diagnosis importance text */
/* Diagnosis finding/verdict - key result, slightly emphasized */
.diagnosis-finding {
    font-size: var(--body);
    font-weight: var(--font-weight-medium);
    color: var(--text);
    margin-bottom: var(--space-2);
}

/* Diagnosis importance - explanation text */
.diagnosis-importance {
    color: var(--text-soft);
    font-size: var(--label);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-3);
}

/* Diagnosis risk/warning - distinct visual block */
.diagnosis-risk {
    background: var(--danger-bg);
    border-left: 3px solid var(--danger);
    padding: var(--space-3);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: var(--label);
    color: var(--danger);
    margin-top: var(--space-2);
}

/* List heading (before lists) */
.list-heading {
    font-size: var(--body);
    font-weight: var(--font-weight-medium);
    color: var(--text);
    margin-bottom: var(--space-3);
}

/* Important note block */
.important-note {
    background: rgba(221, 194, 255, 0.15);
    border: 1px solid rgba(64, 30, 105, 0.12);
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
    font-size: var(--label);
    line-height: var(--line-height-normal);
    color: var(--text);
}

.important-note__label {
    font-weight: var(--font-weight-semibold);
    color: var(--accent-text);
}

.important-note--success {
    background: var(--success-bg);
    border-color: rgba(30, 110, 30, 0.2);
}

.important-note--success .important-note__label {
    color: var(--success);
}

/* Info box (legacy) */
.info-box {
    background: var(--bg);
    padding: var(--space-3);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-3);
}

.info-box p {
    font-size: var(--label);
    margin: 0;
}

/* Preview block (blurred content) */
.preview-block {
    background: var(--bg);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
}

.preview-block:last-child {
    margin-bottom: 0;
}

.preview-block__title {
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-2);
    color: var(--text);
}

.preview-block__list {
    font-size: var(--label);
    color: var(--text-muted);
    filter: blur(2px);
    user-select: none;
    margin: 0;
    padding-left: var(--space-5);
}

.preview-block__note {
    font-size: var(--caption);
    color: var(--text-muted);
    margin-top: var(--space-2);
}

/* Section content blocks */
.section-content p {
    margin-bottom: var(--space-3);
}

.section-content p:last-child {
    margin-bottom: 0;
}

/* Screen header with icon */
.screen-header-icon {
    text-align: center;
    margin-bottom: var(--space-6);
}

.screen-header-icon__emoji {
    font-size: 2.5rem;
    margin-bottom: var(--space-3);
}

.screen-header-icon__emoji--sm {
    font-size: 2rem;
    margin-bottom: var(--space-2);
}

/* Action section (buttons with hints) */
.action-section {
    margin-bottom: var(--space-4);
}

.action-section .btn {
    width: 100%;
}

.action-section__hint {
    font-size: var(--caption);
    color: var(--text-muted);
    margin-top: var(--space-2);
}

/* Email field wrapper */
.email-field-wrap {
    margin-bottom: var(--space-4);
}

.email-field-wrap__label {
    display: block;
    font-size: var(--label);
    color: var(--text-muted);
    margin-bottom: var(--space-2);
}

/* QA Panel (debug only) */
.qa-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--text);
    opacity: 0.95;
    z-index: 9999;
    overflow: auto;
    padding: var(--space-4);
}

.qa-modal {
    max-width: 56rem;
    margin: 0 auto;
    background: var(--surface);
    padding: var(--space-4);
    border-radius: var(--radius-md);
}

/* Success info box */
.info-box--success {
    background: var(--success-bg);
}

/* Muted section title variant */
.paid-section-title--muted {
    background: var(--text-muted);
    color: var(--surface);
}

/* Success section title variant */
.paid-section-title--success {
    background: var(--success);
    color: var(--surface);
}

/* ===== FREE SCREEN: UNIFIED TYPOGRAPHY ===== */

/* Typography scale */
.t-h1 {
    font-size: var(--h1);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--text);
    margin: 0 0 var(--space-4) 0;
}

.t-h2 {
    font-size: var(--h2);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--text);
    margin: 0 0 var(--space-3) 0;
}

.t-h3 {
    font-size: var(--body);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-normal);
    color: var(--text);
    margin: 0 0 var(--space-2) 0;
}

.t-key {
    font-size: var(--body);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-normal);
    color: var(--text);
    margin: 0 0 var(--space-2) 0;
}

.t-body {
    font-size: var(--body);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    color: var(--text);
    margin: 0 0 var(--space-3) 0;
}

.t-muted {
    font-size: var(--label);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--text-muted);
    margin: 0 0 var(--space-3) 0;
}

.t-small {
    font-size: var(--caption);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--text-muted);
    margin: 0;
}

.t-label {
    font-size: var(--body);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-normal);
    color: var(--text);
    margin: 0 0 var(--space-2) 0;
}

/* Section card */
.section-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
    overflow: hidden;
}

/* Section header (colored banner) */
.section-header {
    background: var(--accent);
    color: var(--accent-text);
    padding: var(--space-3) var(--space-5);
    margin: calc(var(--space-5) * -1);
    margin-bottom: var(--space-5);
    font-weight: var(--font-weight-bold);
    font-size: calc(var(--label) + 1px);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.section-header--muted {
    background: var(--text-muted);
    color: var(--surface);
}

.section-header--success {
    background: var(--success);
    color: var(--surface);
}

/* Rules Block (Part 2: Simple Rules) */
.rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

@media (max-width: 600px) {
    .rules-grid {
        grid-template-columns: 1fr;
    }
}

.rules-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.rules-block--full {
    grid-column: 1 / -1;
}

/* Rules section - no dots, no hover */
.benefit-item--dot .benefit-item__icon {
    display: none !important;
}

.rules-grid .benefit-item--dot,
.rules-grid .benefit-item--dot:hover {
    border-color: var(--border) !important;
    background: var(--surface) !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: default !important;
}

/* Rules block title - bigger and bolder */
.rules-grid .value-card__title {
    font-size: var(--body-lg, 1.1rem);
    font-weight: var(--font-weight-bold, 700);
    margin-bottom: var(--space-4);
}

/* Rules result - spacing and full width for climate block */
.rules-block__result {
    font-size: var(--label);
    color: var(--success);
    font-weight: var(--font-weight-medium);
    padding: var(--space-2) var(--space-3);
    background: rgba(16, 185, 129, 0.08);
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-top: var(--space-4);
}

.rules-block--full .rules-block__result {
    display: block;
}

/* Callouts */
.callout {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--label);
    line-height: var(--line-height-normal);
    margin: var(--space-4) 0;
}

.callout--science {
    background: rgba(221, 194, 255, 0.12);
    border: 1px solid rgba(64, 30, 105, 0.15);
    color: var(--text);
}

.callout--risk {
    background: var(--danger-bg);
    border-left: 3px solid var(--danger);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--danger);
}

.callout--important {
    background: rgba(221, 194, 255, 0.15);
    border: 1px solid rgba(64, 30, 105, 0.12);
    color: var(--text);
}

.callout--important strong {
    font-weight: var(--font-weight-semibold);
    color: var(--accent-text);
}

.callout--important .t-label {
    margin-bottom: var(--space-2);
    color: var(--accent-text);
}

.callout--important .t-body {
    margin-bottom: var(--space-2);
}

.callout--important .t-body:last-child {
    margin-bottom: 0;
}

.callout--note {
    background: var(--success-bg);
    border: 1px solid rgba(30, 110, 30, 0.2);
    color: var(--text);
}

.callout--note strong {
    font-weight: var(--font-weight-semibold);
    color: var(--success);
}

/* Lists */
ul.bullets {
    margin: 0 0 var(--space-4) 0;
    padding: 0;
    list-style: none;
}

ul.bullets li {
    position: relative;
    padding-left: var(--space-5);
    margin-bottom: var(--space-2);
    font-size: var(--body);
    line-height: var(--line-height-normal);
    color: var(--text);
}

ul.bullets li::before {
    content: "•";
    position: absolute;
    left: var(--space-2);
    color: var(--text-muted);
}

/* Program cards (Part 2) */
.program-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.program-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    font-size: var(--body);
    line-height: var(--line-height-normal);
    color: var(--text);
}

/* Gap between dynamic and static program cards */
#free-program-blocks {
    margin-bottom: var(--space-3);
}

/* ===== PROGRAM GRID (Two-column layout) ===== */
.program-grid {
    display: grid;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

@media (min-width: 640px) {
    .program-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Value card (Card A and Card B container) */
.value-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.value-card__title {
    font-size: var(--label);
    font-weight: var(--font-weight-semibold);
    color: var(--text);
    margin-bottom: var(--space-3);
}

/* Chip list (Card A: dynamic steps) */
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.chip {
    display: inline-block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: var(--space-1) var(--space-3);
    font-size: var(--caption);
    line-height: var(--line-height-normal);
    color: var(--text);
}

/* Benefit list (both cards) */
.benefit-list {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--space-3) !important;
}

.benefit-item {
    display: flex !important;
    align-items: center !important;
    gap: var(--space-3) !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    padding: var(--space-3) var(--space-4) !important;
    font-size: var(--body) !important;
    line-height: 1.5 !important;
    color: var(--text) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all var(--transition-fast) !important;
}

.benefit-item:hover {
    border-color: var(--accent) !important;
    background: var(--accent) !important;
    box-shadow: var(--shadow-card) !important;
    transform: translateY(-1px);
}

.benefit-item__icon {
    flex-shrink: 0 !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--accent) !important;
    color: var(--accent-text) !important;
    border-radius: 50% !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

.benefit-item__text {
    flex: 1 !important;
}

/* Legacy value-list support */
.value-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.value-list__item {
    font-size: var(--caption);
    line-height: 1.4;
    color: var(--text);
    padding-left: var(--space-4);
    position: relative;
    background: none;
}

.value-list__item::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

ul.checklist {
    margin: 0 0 var(--space-4) 0;
    padding: 0;
    list-style: none;
}

ul.checklist li {
    position: relative;
    padding-left: var(--space-6);
    margin-bottom: var(--space-2);
    font-size: var(--body);
    line-height: var(--line-height-normal);
    color: var(--text);
}

ul.checklist li::before {
    content: "✓";
    position: absolute;
    left: var(--space-2);
    color: var(--success);
    font-weight: var(--font-weight-bold);
}

/* Preview card */
.preview-card {
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
}

.preview-card:last-child {
    margin-bottom: 0;
}

.preview-card__title {
    font-size: var(--body);
    font-weight: var(--font-weight-semibold);
    color: var(--text);
    margin: 0 0 var(--space-2) 0;
}

.preview-card__subtitle {
    font-size: var(--caption);
    color: var(--text-muted);
    margin: 0;
}

/* CTA card */
.cta-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
    margin: var(--space-6) 0;
}

.cta-card__badge {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-text);
    font-size: var(--caption);
    font-weight: var(--font-weight-semibold);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.cta-card__title {
    font-size: var(--h2);
    font-weight: var(--font-weight-bold);
    color: var(--text);
    margin: 0 0 var(--space-3) 0;
}

.cta-card__subtitle {
    font-size: var(--label);
    color: var(--text-muted);
    margin: 0 0 var(--space-5) 0;
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border);
    margin: var(--space-4) 0;
}

/* Free screen header */
.free-header {
    text-align: center;
    margin-bottom: var(--space-5);
}

.free-header .t-h1 {
    margin-bottom: var(--space-4);
}

.free-header .callout {
    text-align: left;
    margin: 0;
}

/* ===== STICKY CTA FOOTER (FREE screen) ===== */
.sticky-cta-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(var(--container-max) - var(--space-4) * 2);
    max-width: calc(100% - 2rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -4px 16px rgba(64, 30, 105, 0.08);
    padding: var(--space-4);
    padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
    z-index: 100;
}

@media (min-width: 768px) {
    .sticky-cta-footer {
        width: calc((var(--container-max) - var(--space-6) * 2) * 0.6);
    }
}

.sticky-cta-footer .btn {
    max-width: var(--card-max);
    margin: 0 auto;
    display: block;
    border: 2px solid #7b4bb8;
    animation: pulse-soft 3.5s ease-in-out infinite;
    white-space: normal;
    line-height: 1.3;
}

#screen-07-a .sticky-cta-footer .btn {
    min-height: 4.5rem;
}

/* Pulsing button (standalone, not in sticky footer) */
.btn-pulse {
    border: 2px solid #7b4bb8;
    animation: pulse-soft 3.5s ease-in-out infinite;
}

/* Disable animations for automated testing */
@media (prefers-reduced-motion: reduce) {
    .sticky-cta-footer .btn {
        animation: none;
    }
}

/* Payment screen sticky footer with price */
.sticky-cta-footer--payment {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    max-width: var(--container-max);
    margin: 0 auto;
}

.sticky-cta-footer__price {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
}

.sticky-cta-footer__price .price {
    font-size: 2.3rem;
    font-weight: var(--font-weight-bold);
    color: var(--text);
    margin: 0;
}

.sticky-cta-footer__buttons {
    display: flex;
    gap: var(--space-2);
    width: 100%;
    max-width: var(--card-max);
}

.sticky-cta-footer__buttons .btn-primary {
    flex: 6;
    animation: pulse-soft 3.5s ease-in-out infinite;
    border: 2px solid #7b4bb8;
}

.sticky-cta-footer__buttons .btn-back-small {
    flex: 1;
    padding: 0;
    min-width: 2.5rem;
    background: var(--surface) !important;
    border: 2px solid #7b4bb8 !important;
    color: #7b4bb8 !important;
    animation: none !important;
    transform: none !important;
}

@keyframes pulse-soft {
    0%, 100% {
        background: #a87de8;
        color: #ffffff;
        border-color: #7b4bb8;
        box-shadow: 0 0 0 rgba(160, 120, 255, 0.0);
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    50% {
        background: #7b4bb8;
        color: #ffffff;
        border-color: #e8d6ff;
        box-shadow: 0 0 22px rgba(160, 120, 255, 0.45);
        padding: 0.96rem 1.67rem;
        font-size: 1.05rem;
    }
}

/* Add padding to screens with sticky footer so content doesn't hide */
#screen-07-a,
#screen-08 {
    padding-bottom: 6rem;
}

/* ===== SELLING BLOCK (Payment screen) ===== */
.selling-block {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.selling-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.selling-item__title {
    font-size: var(--body);
    font-weight: var(--font-weight-semibold);
    color: var(--text);
    margin-bottom: var(--space-2);
    line-height: var(--line-height-tight);
}

.selling-item__text {
    font-size: var(--caption);
    color: var(--text-muted);
    line-height: var(--line-height-relaxed);
}

/* ===== MOBILE COMPACT TYPOGRAPHY ===== */
@media (max-width: 480px) {
    /* Question titles - smaller, tighter */
    .section-title {
        font-size: 0.9375rem; /* 15px */
        line-height: 1.35;
    }

    /* Quiz option labels - compact */
    .section label {
        font-size: 0.875rem; /* 14px */
        line-height: 1.4;
        padding: var(--space-3); /* slightly smaller padding */
    }

    /* Radio/checkbox - slightly smaller */
    .section input[type="radio"],
    .section input[type="checkbox"] {
        width: 1.125rem;
        height: 1.125rem;
    }

    /* Regular buttons - compact */
    .btn {
        height: 2.75rem; /* 44px */
        font-size: 0.875rem; /* 14px */
        padding: 0 var(--space-4);
    }

    /* Primary/Large buttons - compact */
    .btn-primary,
    .btn-lg,
    .btn--lg {
        height: 3rem; /* 48px */
        font-size: 0.9375rem; /* 15px */
        padding: 0 var(--space-5);
    }

    /* Screen headers - tighter */
    .screen-header {
        font-size: 1.125rem; /* 18px */
        line-height: 1.3;
    }

    /* Progress indicator text - compact */
    .progress-indicator__text {
        font-size: 0.8125rem; /* 13px */
    }
}
