/* ===================================
   QUIZ FUNNEL - MINIMALIST DESIGN
   Ultra-Clean, Maximum Whitespace
   =================================== */

/* ============= CSS VARIABLES ============= */
:root {
    /* Colors - Pure & Clean */
    --color-background: #FFFFFF;
    --color-background-alt: #FAFAFA;
    --color-surface: rgba(255, 255, 255, 0.6);
    --color-glass: rgba(255, 255, 255, 0.3);
    --color-glass-border: rgba(0, 0, 0, 0.06);

    /* Accent Colors - Vibrant & Premium */
    --color-primary: hsl(220, 90%, 56%);
    --color-primary-hover: hsl(220, 90%, 48%);
    --color-secondary: hsl(280, 70%, 60%);
    --color-accent: hsl(340, 82%, 62%);
    --color-success: hsl(142, 71%, 45%);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, hsl(220, 90%, 56%) 0%, hsl(260, 80%, 65%) 100%);
    --gradient-accent: linear-gradient(135deg, hsl(340, 82%, 62%) 0%, hsl(280, 70%, 60%) 100%);

    /* Text Colors - Maximum Contrast */
    --color-text-primary: #1A1A1A;
    --color-text-secondary: hsl(220, 15%, 45%);
    --color-text-tertiary: hsl(220, 10%, 65%);
    --color-text-inverse: #ffffff;

    /* Shadows - Minimal & Subtle */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.1);

    /* Spacing Scale - Generous (8px base) */
    --space-xs: 0.5rem;
    /* 8px */
    --space-sm: 1rem;
    /* 16px */
    --space-md: 1.5rem;
    /* 24px */
    --space-lg: 2rem;
    /* 32px */
    --space-xl: 3rem;
    /* 48px */
    --space-2xl: 5rem;
    /* 80px */
    --space-3xl: 7.5rem;
    /* 120px */

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Typography */
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    /* 12px */
    --font-size-sm: 0.875rem;
    /* 14px */
    --font-size-base: 1rem;
    /* 16px */
    --font-size-lg: 1.125rem;
    /* 18px */
    --font-size-xl: 1.375rem;
    /* 22px */
    --font-size-2xl: 1.75rem;
    /* 28px */
    --font-size-3xl: 2.25rem;
    /* 36px */
    --font-size-4xl: 3rem;
    /* 48px */
    --font-size-5xl: 3.5rem;
    /* 56px */

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Glassmorphism - Subtle */
    --glass-blur: 16px;
    --glass-opacity: 0.6;
}

/* ============= RESET & BASE ============= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-background);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============= TYPOGRAPHY ============= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text-primary);
    margin-bottom: var(--space-sm);
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

h5 {
    font-size: var(--font-size-lg);
}

h6 {
    font-size: var(--font-size-base);
}

p {
    margin-bottom: var(--space-sm);
    color: var(--color-text-secondary);
}

/* ============= GLASS COMPONENTS (Buttons Only) ============= */
.glass-button {
    background: var(--color-surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-family);
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    text-align: left;
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
}

@media (hover: hover) {
    .glass-button:hover {
        background: rgba(255, 255, 255, 0.85);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: #FF0000;
    }
}

.glass-button:active {
    transform: translateY(0);
}

/* Admin panel cards (glass allowed here) */
.admin-card {
    background: var(--color-surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============= BUTTONS ============= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: 44px;
    /* Touch target */
    white-space: normal;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-md);
}

@media (hover: hover) {
    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
        filter: brightness(1.05);
        outline: 2px solid #FF0000;
    }
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--color-surface-elevated);
    backdrop-filter: blur(var(--glass-blur));
    color: var(--color-text-primary);
    border: 1px solid var(--color-glass-border);
    box-shadow: var(--shadow-sm);
}

@media (hover: hover) {
    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.95);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }
}

.btn-accent {
    background: var(--gradient-accent);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-md);
}

@media (hover: hover) {
    .btn-accent:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
        filter: brightness(1.05);
    }
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-lg);
    min-height: 56px;
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--font-size-sm);
    min-height: 36px;
}

/* ============= FORMS ============= */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: var(--space-xs);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    background: var(--color-surface-elevated);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    min-height: 44px;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px hsla(220, 90%, 56%, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* ============= LAYOUT ============= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-sm {
    max-width: 600px;
}

.container-lg {
    max-width: 1400px;
}

/* ============= PROGRESS BAR ============= */
.progress-bar {
    width: 100%;
    height: 10px;
    background: #E5E7EB;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: var(--space-lg) 0;
}

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

.separator {
    width: 100px;
    height: 2px;
    background: #6B7280;
    margin: var(--space-md) auto;
    border-radius: var(--radius-full);
}

/* ============= ANIMATIONS ============= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn var(--transition-base) ease-out;
}

.slide-in-up {
    animation: slideInUp var(--transition-slow) ease-out;
}

.scale-in {
    animation: scaleIn var(--transition-base) ease-out;
}

/* ============= UTILITY CLASSES ============= */
.text-center {
    text-align: center;
}

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

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

.mt-xs {
    margin-top: var(--space-xs);
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mt-xl {
    margin-top: var(--space-xl);
}

.mb-xs {
    margin-bottom: var(--space-xs);
}

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

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ============= TOUCH DEVICE FIXES ============= */
@media (pointer: coarse) {
    * {
        -webkit-tap-highlight-color: transparent !important;
    }

    button, .glass-button, .btn-primary, .btn-secondary, .btn-clinical {
        -webkit-tap-highlight-color: transparent !important;
        outline: none !important;
        -webkit-appearance: none;
    }

    button:hover, button:focus, button:active,
    .glass-button:hover, .glass-button:focus, .glass-button:active,
    .btn-primary:hover, .btn-primary:focus, .btn-primary:active,
    .btn-secondary:hover, .btn-secondary:focus, .btn-secondary:active,
    .btn-clinical:hover, .btn-clinical:focus, .btn-clinical:active {
        outline: none !important;
        box-shadow: none !important;
        transform: none !important;
        filter: none !important;
        border-color: var(--color-glass-border) !important;
        background: var(--color-surface) !important;
    }

    /* Keep selected state visible for confirmation questions */
    .glass-button.selected {
        border-color: var(--color-primary) !important;
        background: rgba(255, 255, 255, 0.9) !important;
    }
}

/* Quiz main title base style */
.quiz-main-title {
    font-size: var(--font-size-xl);
}

/* ============= RESPONSIVE ============= */
@media (max-width: 768px) {
    :root {
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.75rem;
        --font-size-2xl: 1.5rem;
    }

    .container {
        padding: 0 var(--space-sm);
    }

    h1 {
        font-size: var(--font-size-3xl);
    }

    h2 {
        font-size: var(--font-size-2xl);
    }

    /* Quiz main title on mobile - visible and readable */
    .quiz-main-title {
        font-size: 0.6rem !important;
        margin-bottom: 4px !important;
        display: block !important;
    }

    /* Hide quiz title on visual/graph questions */
    .quiz-screen.visual-question .quiz-main-title,
    .quiz-screen.visual-question .separator {
        display: none !important;
    }

    /* Reduce top spacing on mobile to keep content above fold */
    .quiz-screen {
        padding-top: 8px !important;
        align-items: flex-start !important;
    }

    /* Visual questions: proper spacing so not cut off by header */
    .quiz-screen.visual-question {
        padding-top: 50px !important;
        align-items: flex-start !important;
    }

    /* Compact question buttons on mobile */
    .glass-button {
        padding: 12px 16px !important;
        font-size: 0.95rem !important;
    }

    /* Tighter answer button container */
    .answer-buttons-container {
        gap: 8px !important;
    }
}

/* ============= ACCESSIBILITY ============= */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ============= GRAPH ANIMATIONS ============= */
@keyframes drawLine {
    from {
        stroke-dashoffset: 1000;
    }

    to {
        stroke-dashoffset: 0;
    }
}

@keyframes growShape {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-scale {
    transform-origin: 100px 100px;
    /* Center of the SVG viewBox */
    animation: growShape 1.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Delayed start for second line */
.animate-path-delay {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 4s cubic-bezier(0.4, 0, 0.2, 1) 1s forwards;
}

/* ============= LOADING SPINNER ============= */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 5px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--color-primary);
    border-right-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: var(--shadow-sm);
}

/* ============= NERVOUS SYSTEM ANIMATIONS ============= */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        filter: brightness(1);
    }

    50% {
        opacity: 0.7;
        filter: brightness(1.2);
    }
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

.pulse-animation-delay {
    animation: pulse 2s ease-in-out infinite;
    animation-delay: 1s;
}

/* ============= FEEDBACK ANIMATIONS ============= */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake-error {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
    border-color: #ef4444 !important;
    /* Red error color */
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

/* ============= GLOBAL BRAND HEADER ============= */
.global-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-sm) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.header-support {
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-secondary);
    text-decoration: none;
}

/* Header scroll visibility */
.header-hidden {
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.header-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 640px) {
    .global-header {
        padding: var(--space-xs) var(--space-md);
    }

    .header-logo {
        height: 40px;
    }

    .header-support {
        font-size: 10px;
    }
}

/* ============= MEDICAL DOCUMENT THEME ============= */
/* Clinical Color Palette */
:root {
    --clinical-bg: #F8F9FA;
    --clinical-paper: #FFFFFF;
    --clinical-border: #D1D5DB;
    --clinical-accent: #1E3A5F;
    --clinical-accent-light: #2D5A87;
    --clinical-success: #0D6E4F;
    --clinical-text-dark: #111827;
    --clinical-text-muted: #6B7280;
    --clinical-seal-gold: #B8860B;
    --clinical-seal-gold-light: #DAA520;
    --shadow-paper: 0 1px 3px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.05),
        0 8px 24px rgba(0, 0, 0, 0.04);
}

/* Clinical page background */
.clinical-page-bg {
    background: var(--clinical-bg);
    min-height: 100vh;
    padding: 4rem 1.5rem;
}

/* Medical document container */
.medical-document {
    background: var(--clinical-paper);
    max-width: 650px;
    margin: 0 auto;
    padding: 3rem 2.5rem;
    border-radius: 2px;
    box-shadow: var(--shadow-paper);
    position: relative;
    border: 1px solid var(--clinical-border);
}

.medical-document::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.01) 0%,
            transparent 5%,
            transparent 95%,
            rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
    border-radius: 2px;
}

/* Document header */
.doc-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--clinical-border);
    margin-bottom: 2rem;
}

.doc-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--clinical-text-muted);
    margin-bottom: 0.5rem;
}

.doc-subtitle {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.125rem;
    color: var(--clinical-accent);
    font-weight: 400;
    font-style: italic;
}

/* Assessment seal/badge */
.assessment-seal {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--clinical-seal-gold);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg,
            rgba(184, 134, 11, 0.05) 0%,
            rgba(218, 165, 32, 0.1) 100%);
}

.assessment-seal::before {
    content: '';
    position: absolute;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 1px solid var(--clinical-seal-gold);
    opacity: 0.4;
}

.assessment-seal::after {
    content: '';
    position: absolute;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    border: 1px dashed var(--clinical-seal-gold);
    opacity: 0.6;
}

.assessment-seal svg {
    width: 40px;
    height: 40px;
    stroke: var(--clinical-seal-gold);
    stroke-width: 3;
    fill: none;
    z-index: 1;
}

/* Status badge */
.assessment-status {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: var(--clinical-success);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 2px;
    margin-bottom: 1.5rem;
}

/* Diagnosis statement */
.diagnosis-statement {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--clinical-text-dark);
    text-align: center;
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* Clinical text */
.clinical-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--clinical-text-dark);
}

/* Branded note box */
.breathesober-note {
    background: rgba(30, 58, 95, 0.04);
    border-left: 3px solid var(--clinical-accent);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
}

.breathesober-note-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clinical-accent);
    margin-bottom: 0.5rem;
}

.insight-signature {
    font-family: 'Mr Dafoe', cursive;
    font-size: 1.75rem;
    color: var(--clinical-accent);
    text-align: right;
    margin-top: 1rem;
    margin-bottom: 0;
    display: flex;
    justify-content: flex-end;
    overflow: hidden;
}

.insight-signature span {
    display: inline-block;
    white-space: nowrap;
    animation: signature-write 2s ease-out forwards;
    clip-path: inset(0 100% 0 0);
}

@keyframes signature-write {
    0% {
        clip-path: inset(0 100% 0 0);
    }

    100% {
        clip-path: inset(0 0 0 0);
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .insight-signature span {
        animation: none;
        clip-path: none;
    }
}

/* Patterns section (demoted) */
.patterns-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--clinical-border);
}

.patterns-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.75rem 0;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.patterns-toggle:hover {
    opacity: 0.8;
}

.patterns-toggle-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clinical-text-muted);
}

.patterns-toggle-icon {
    font-size: 0.75rem;
    color: var(--clinical-text-muted);
    transition: transform 0.2s ease;
}

.patterns-toggle[aria-expanded="true"] .patterns-toggle-icon {
    transform: rotate(180deg);
}

.patterns-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.patterns-list.expanded {
    max-height: 500px;
    opacity: 1;
}

.pattern-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9375rem;
    color: var(--clinical-text-dark);
    line-height: 1.5;
}

.pattern-item:last-child {
    border-bottom: none;
}

.pattern-bullet {
    color: var(--clinical-success);
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Read More section (collapsible) */
.read-more-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--clinical-border);
}

.read-more-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.75rem 0;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.read-more-toggle:hover {
    opacity: 0.8;
}

.read-more-toggle-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clinical-text-muted);
}

.read-more-toggle-icon {
    font-size: 0.75rem;
    color: var(--clinical-text-muted);
    transition: transform 0.2s ease;
}

.read-more-toggle[aria-expanded="true"] .read-more-toggle-icon {
    transform: rotate(180deg);
}

.read-more-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    padding: 0;
}

.read-more-content.expanded {
    max-height: 800px;
    opacity: 1;
    padding-top: 1rem;
}

.read-more-content p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--clinical-text-dark);
    margin-bottom: 1.25rem;
}

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

.read-more-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clinical-accent);
    margin-bottom: 0.5rem;
    display: block;
}

.read-more-content ul {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0 0;
}

.read-more-content ul li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.375rem 0;
    font-size: 0.9375rem;
    color: var(--clinical-text-dark);
}

.read-more-content ul li::before {
    content: "•";
    color: var(--clinical-success);
    font-weight: bold;
}

/* Results sections */
.results-section {
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--clinical-border);
}

.results-section:first-of-type {
    border-top: none;
    padding-top: 0;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clinical-accent);
    margin-bottom: 1rem;
}

/* Help list (What Typically Helps) */
.help-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 1rem 0;
}

.help-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.375rem 0;
    font-size: 0.9375rem;
    color: var(--clinical-text-dark);
    line-height: 1.5;
}

.help-list li::before {
    content: "•";
    color: var(--clinical-success);
    font-weight: bold;
    flex-shrink: 0;
}

/* Explore Your Results section */
.explore-section {
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--clinical-border);
}

/* Flashing light bulb icon */
.icon-lightbulb {
    display: inline-block;
    animation: flash-glow 1.5s ease-in-out infinite;
    margin-right: 0.25rem;
}

@keyframes flash-glow {

    0%,
    100% {
        opacity: 0.4;
        filter: brightness(0.8);
    }

    50% {
        opacity: 1;
        filter: brightness(1.3) drop-shadow(0 0 4px rgba(255, 200, 0, 0.6));
    }
}

/* Animated donut chart icon */
.icon-donut-chart {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.375rem;
    animation: donut-spin 8s linear infinite;
}

@keyframes donut-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.donut-segment {
    transform-origin: center;
}

.donut-segment-1 {
    animation: donut-pulse-1 3s ease-in-out infinite;
}

.donut-segment-2 {
    animation: donut-pulse-2 3s ease-in-out infinite 0.5s;
}

.donut-segment-3 {
    animation: donut-pulse-3 3s ease-in-out infinite 1s;
}

@keyframes donut-pulse-1 {

    0%,
    100% {
        stroke-dasharray: 40 60;
    }

    50% {
        stroke-dasharray: 45 55;
    }
}

@keyframes donut-pulse-2 {

    0%,
    100% {
        stroke-dasharray: 35 65;
    }

    50% {
        stroke-dasharray: 30 70;
    }
}

@keyframes donut-pulse-3 {

    0%,
    100% {
        stroke-dasharray: 25 75;
    }

    50% {
        stroke-dasharray: 30 70;
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {

    .icon-lightbulb,
    .icon-donut-chart,
    .donut-segment-1,
    .donut-segment-2,
    .donut-segment-3 {
        animation: none;
    }

    .icon-lightbulb {
        opacity: 1;
        filter: none;
    }
}

/* Generic accordion styling */
.accordion-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.875rem 0;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.accordion-toggle:hover {
    opacity: 0.8;
}

.accordion-toggle-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--clinical-text-dark);
}

.accordion-toggle-icon {
    font-size: 0.75rem;
    color: var(--clinical-text-muted);
    transition: transform 0.2s ease;
}

.accordion-toggle[aria-expanded="true"] .accordion-toggle-icon {
    transform: rotate(180deg);
}

.accordion-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0;
}

.accordion-content.expanded {
    max-height: 600px;
    opacity: 1;
    padding: 0 0 1rem 0;
}

.accordion-hint {
    font-style: italic;
    color: var(--clinical-text-muted) !important;
    font-size: 0.8125rem !important;
    margin-bottom: 0.75rem !important;
}

/* Patterns list inline (inside accordion) */
.patterns-list-inline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.patterns-list-inline .pattern-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    color: var(--clinical-text-dark);
    line-height: 1.5;
}

.patterns-list-inline .pattern-item:last-child {
    border-bottom: none;
}

/* Disclaimer section */
.disclaimer-section {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
    border-left: 3px solid var(--clinical-border);
}

/* CTA tease label */
.cta-tease-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--clinical-accent);
    margin-bottom: 0.75rem;
    text-align: center;
}

/* Clinical CTA section */
.clinical-cta-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--clinical-border);
    text-align: center;
}

.clinical-cta-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--clinical-text-muted);
    margin-bottom: 1rem;
}

.btn-clinical {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 450px;
    padding: 1.125rem 2rem;
    background: var(--clinical-accent);
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.25);
}

@media (hover: hover) {
    .btn-clinical:hover {
        background: var(--clinical-accent-light);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
    }
}

.btn-clinical:active {
    transform: translateY(0);
}

.clinical-cta-note {
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--clinical-text-muted);
}

.social-proof-text {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--clinical-text-muted);
    text-align: center;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .clinical-page-bg {
        padding: 2rem 0.5rem;
    }

    .medical-document {
        padding: 2rem 1.5rem;
        margin: 0 0.5rem;
    }

    .diagnosis-statement {
        font-size: 1.5rem;
    }

    .assessment-seal {
        width: 80px;
        height: 80px;
    }

    .assessment-seal::before {
        width: 90px;
        height: 90px;
    }

    .assessment-seal::after {
        width: 68px;
        height: 68px;
    }

    .assessment-seal svg {
        width: 32px;
        height: 32px;
    }
}

/* ============= EVALUATION VERIFIED BUTTON ============= */
@keyframes button-pop-in {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(5px);
    }

    70% {
        transform: scale(1.02) translateY(0);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes underline-draw {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

.evaluation-verified-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    background: #0D6E4F;
    /* Deep Clinical Green */
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    border-radius: 4px;
    cursor: default;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(13, 110, 79, 0.25);
    animation: button-pop-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
}

.evaluation-verified-btn::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    height: 2px;
    background: #0D6E4F;
    width: 0;
    opacity: 0.5;
    animation: underline-draw 1s ease-out 0.6s forwards;
}

.skip-question-container {
    position: relative;
    z-index: 100;
    pointer-events: auto;
    width: 100%;
    display: flex;
    justify-content: center;
}

.skip-question-btn {
    pointer-events: auto;
    position: relative;
    z-index: 110;
    cursor: pointer;
}/* v2 */
