/* Common styles and variables */
:root {
    --primary-color: #AAB5A6; /* Matcha green */
    --primary-dark-color: #899684; /* Darker matcha */
    --primary-gradient: linear-gradient(90deg, var(--primary-dark-color), var(--primary-color));
    --text-color: var(--k-body-color);
    --light-bg: #F7F6F4; /* empty bar area */
    --border-color: #E8EBE6; /* around charts */
    --shadow: 0 2px 10px rgba(170, 181, 166, 0.15);
    /* Additional Colors */
    --secondary-color: #CDAA94;
    /* Shift Colors */
    --increase-color: #98A79B;
    --neutral-color: #6c757d;
    --decrease-color: #90A2B5;
    /* System Fonts */
    --system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --header-font: 'Prata', serif;
}

/* Enhanced Container Styles */
.belief-types-container,
.score-chart,
.faith-timeline-new {
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .belief-types-container:hover,
    .score-chart:hover,
    .faith-timeline-new:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(170, 181, 166, 0.2);
    }

/* Container Styles */
.belief-types-container,
.score-chart {
    background: #ffffff;
    padding: 30px;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: var(--shadow);
    font-family: var(--system-font);
}

.belief-types-container {
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

/* Score Chart Components */
.score-row {
    display: flex;
    align-items: center;
    margin: 15px 0;
    gap: 15px;
}

.score-label {
    color: var(--text-color);
    width: 115px;
    font-size: 16px;
    font-weight: 500;
}

.score-bar-container {
    flex-grow: 1;
    height: 12px;
    background: var(--light-bg);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.score-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.score-value {
    color: var(--primary-dark-color);
    width: 50px;
    text-align: right;
    font-size: 20px;
    font-weight: 900;
}

.score-divider {
    margin-top: 25px;
    border-top: 1px dashed var(--border-color);
}

.score-note {
    padding: 0 10px 10px 10px;
    font-size: 0.75em;
    color: var(--text-color);
    text-align: left;
    font-style: italic;
    font-family: var(--system-font);
}

/* Belief Bubbles / Pie Charts */
.belief-bubbles {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
    margin: 20px 0;
}

.belief-pie-wrap {
    flex-shrink: 0;
}

.belief-pie-svg {
    width: 130px;
    height: 130px;
    display: block;
}

@media (max-width: 768px) {
    .belief-bubbles { gap: 10px; }
    .belief-pie-svg { width: 100px; height: 100px; }
}

@media (max-width: 400px) {
    .belief-pie-svg { width: 85px; height: 85px; }
}

/* Belief Type Items */
.belief-bubbles {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
    margin: 20px 0;
}
 
.belief-bubble {
    width: 130px;
    height: 130px;
    min-width: 0;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
    box-sizing: border-box;
    text-align: center;
    color: white;
    flex-shrink: 0;
}
 
.bubble-type {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.1;
    color: white;
}
 
.bubble-descriptor {
    font-size: 0.7rem;
    line-height: 1.1;
    color: rgba(255,255,255,0.85);
}
 
.bubble-score {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    color: white;
    margin-top: 2px;
}
 
@media (max-width: 768px) {
    .belief-bubbles {
        gap: 10px;
    }
    .belief-bubble {
        width: 100px;
        height: 100px;
        padding: 6px;
    }
    .bubble-type {
        font-size: 0.75rem;
    }
    .bubble-descriptor {
        font-size: 0.6rem;
    }
    .bubble-score {
        font-size: 1.2rem;
    }
}
 
@media (max-width: 400px) {
    .belief-bubble {
        width: 85px;
        height: 85px;
    }
    .bubble-type {
        font-size: 0.65rem;
    }
    .bubble-descriptor {
        font-size: 0.55rem;
    }
    .bubble-score {
        font-size: 1rem;
    }
}

/* Belief Type Items */
.belief-section {
    margin-bottom: 25px;
    font-family: var(--system-font);
}

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

.group-label {
    color: var(--primary-dark-color);
    font-weight: 600;
    font-size: 1.2em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.belief-type-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0;
    background: var(--light-bg);
    border-radius: 8px;
    transition: all 0.2s ease;
}

    .belief-type-item:hover {
        background: var(--border-color);
        transform: translateX(5px);
    }

.rank-bullet {
    color: var(--primary-color);
    margin-right: 15px;
    font-size: 1.4em;
    line-height: 1;
}

.belief-type-name {
    color: var(--text-color);
    font-size: 19px;
    font-weight: 500;
}

/* List of formation questions */
.answers-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    font-family: var(--system-font);
}

    .answers-section h3 {
        margin-bottom: 15px;
        color: var(--text-color);
        font-family: var(--header-font);
    }

.answers-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-family: var(--system-font);
}

    .answers-table th,
    .answers-table td {
        padding: 8px;
        text-align: left;
        border-bottom: 1px solid var(--border-color);
        vertical-align: top;
    }

        .answers-table td:first-child {
            word-wrap: break-word;
            white-space: normal;
        }

        .answers-table th:last-child,
        .answers-table td:last-child {
            white-space: nowrap;
            min-width: 120px;
        }

    .answers-table th {
        background-color: var(--light-bg);
        font-weight: bold;
    }

    .answers-table tr:hover {
        background-color: var(--light-bg);
    }

    /* Report view */
    .report-logo {
        float: right;
        width: 300px;
        margin-left: 0px;
        margin-top: -3em;
    }

    @media (max-width: 767px) {
        .report-logo {
            width: 170px;
            margin-top: -2em;
        }
    }

    .ai-report {
        max-width: 800px;
        margin: 2em auto;
        padding: 0 10px;
        line-height: 1.6;
        font-size: 18px;
        font-family: var(--system-font);
    }

    .ai-report h3 {
        color: var(--text-color);
        margin-top: 1.5em;
        font-family: var(--header-font);
    }

    .ai-report h4 {
        color: var(--text-color);
        margin-top: 1.2em;
        font-family: var(--header-font);
    }

    .ai-report p {
        margin-bottom: 1em;
    }

    .ai-report em {
        color: var(--text-color);
    }

    .ai-report strong {
        color: var(--text-color);
    }

/* Faith Timeline Chart */
.faith-timeline-new {
    background: #ffffff;
    padding: 30px;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: var(--shadow);
    font-family: var(--system-font);
}

.timeline-row {
    display: flex;
    align-items: center;
    margin: 4px 0;
    gap: 15px;
}

.type-label {
    color: var(--text-color);
    width: 115px;
    min-width: 115px;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--system-font);
}

.score-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.progress-bar {
    flex-grow: 1;
    height: 12px;
    background: var(--light-bg);
    border-radius: 6px;
    overflow: hidden;
    min-width: 36px;
}

.progress {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.arrow-connector {
    position: relative;
    width: 60px;
    min-width: 10px;
    flex-shrink: 1;
    height: 2px;
    background: var(--border-color);
    margin: 0 5px;
}

    .arrow-connector::after {
        content: '';
        position: absolute;
        right: -6px;
        top: -4px;
        width: 0;
        height: 0;
        border-left: 8px solid var(--border-color);
        border-top: 5px solid transparent;
        border-bottom: 5px solid transparent;
    }

.shift-indicator {
    min-width: 60px;
    text-align: right;
    font-weight: 600;
    margin-left: 5px;
    font-family: var(--system-font);
}

/* Hide the save draft link */
a.frm_save_draft {
    display: none;
}

/* Shift Colors */
.increase .shift-indicator {
    color: var(--increase-color);
}

.decrease .shift-indicator {
    color: var(--decrease-color);
}

.neutral .shift-indicator {
    color: var(--neutral-color);
}

/* Progress Bar Colors */
.decrease .progress {
    background: var(--decrease-color);
}

.neutral .progress {
    background: var(--neutral-color);
}

/* Section Divider */
.section-divider {
    margin: 60px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .section-divider::before,
    .section-divider::after {
        content: '';
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--secondary-color) 50%, transparent);
        flex: 1;
    }

    .section-divider .divider-icon {
        margin: 0 20px;
        width: 200px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 18px;
        background: var(--secondary-color);
        color: white;
        font-size: 15px;
        font-weight: 500;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        box-shadow: 0 2px 10px rgba(168, 181, 165, 0.2);
        font-family: var(--system-font);
    }

    @media (max-width: 600px) {
        .belief-types-container {
            padding: 15px;
        }

        .group-label {
            margin-bottom: 10px;
            padding-bottom: 5px;
        }

        .score-chart {
            padding: 15px;
        }
        .score-label {
            min-width: 95px;
            width: 95px;
        }
        .type-label {
            width: 95px;
            min-width: 85px;
        }
        
        .faith-timeline-new {
            padding: 15px;
        }        
    }

/* Loading overlay */
.loading-overlay {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    margin: 20px 0;
    background: #ffffff;
    border-radius: 10px;
    min-width: 300px;
    font-family: var(--system-font);
}

.loading-spinner {
    border: 5px solid var(--light-bg);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.loading-text {
    margin-top: 20px;
    font-size: 18px;
    color: var(--text-color);
    text-align: center;
    min-height: 27px;
    min-width: 250px;
    font-family: var(--system-font);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Formidable forms */
.frm_forms {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px;
}

.frm_form_field {
    margin-bottom: 24px;
}

.frm_radio {
    width: 100%;
    margin-bottom: 12px;
}

    .frm_radio label {
        display: block;
        width: 100%;
        padding: 16px 24px;
        background: var(--light-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        color: var(--text-color);
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
    }

        .frm_radio label:hover {
            background: white;
            border-color: var(--primary-color);
        }

    .frm_radio input[type="radio"] {
        display: none;
    }

        .frm_radio input[type="radio"]:checked + label {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }

.frm_button_submit,
.frm_prev_page,
.frm_next_page {
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 12px;
}

.frm_button_submit,
.frm_next_page {
    background: var(--primary-color);
    color: white;
}

    .frm_button_submit:hover,
    .frm_next_page:hover {
        background: var(--decrease-color);
        transform: translateY(-1px);
    }

.frm_prev_page {
    background: var(--light-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

    .frm_prev_page:hover {
        background: white;
        border-color: var(--primary-color);
    }

.frm_form_field > label,
.frm_primary_label {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
    display: block;
}

.frm_error {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 8px;
}

/* Hide footer on assessment & report pages */
body.hide-assessment-footer #footer.site-footer {
    display: none !important;
}

@media (max-width: 768px) {
    .frm_forms {
        padding: 16px;
    }

    .frm_button_submit,
    .frm_prev_page,
    .frm_next_page {
        width: 100%;
        margin: 8px 0;
    }
}

/* for creating PDF / priting */

@media print {

    .score-chart,
    .belief-types-container,
    .faith-timeline-new {
        page-break-inside: avoid;
        break-inside: avoid;
        /*  transform: scale(0.8);
        transform-origin: top center;
        width: 80%;*/
        box-shadow: none !important; /* Remove shadows */
        border: none !important; /* Remove borders */
        background: none !important; /* Remove background */
    }

        /* Remove hover effects for print */
        .belief-types-container:hover,
        .score-chart:hover,
        .faith-timeline-new:hover {
            transform: none !important;
            box-shadow: none !important;
        }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        break-after: avoid;
    }

        /* Optional: Also keep paragraphs following headers together */
        h1 + p, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p {
            page-break-before: avoid;
            break-before: avoid;
        }

    .section-divider {
        margin: 0;
        padding: 0;
        height: 100vh; /* Full viewport height */
        display: flex;
        align-items: center;
        justify-content: center;
        page-break-before: always;
        break-before: page;
    }

        .section-divider .divider-icon {
            box-shadow: none !important;
            /* If you want to also remove any background gradient */
            background: var(--secondary-color) !important;
        }
}

/* ── Assumption Spectrum Scales ──────────────────────────────────────────── */

/* Container for each spectrum scale field */
.spectrum-scale .frm_primary_label {
    font-family: var(--header-font, 'Prata', serif);
    font-size: 1.15em;
    font-weight: normal;
    margin-bottom: 0.25em;
}

/* When label is empty, hide it */
.spectrum-scale .frm_primary_label:empty {
    display: none;
}

/* Hide required asterisk on spectrum fields */
.spectrum-scale .frm_required {
    display: none !important;
}

/* Hide the default number labels on scale radio buttons */
.spectrum-scale .frm_scale label {
    font-size: 0 !important;
    line-height: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

/* Style radio buttons as dots on a line */
.spectrum-scale .frm_scale input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    border: 2px solid var(--primary-dark-color) !important;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    outline: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

.spectrum-scale .frm_scale input[type="radio"]:hover {
    background: var(--primary-color);
    border-color: var(--primary-dark-color) !important;
}

.frm_forms.with_frm_style .frm_fields_container .spectrum-scale .frm_scale input[type="radio"]:not([disabled]):checked,
.frm_forms .frm_fields_container .spectrum-scale .frm_scale input[type="radio"]:checked {
    background: var(--primary-dark-color) !important;
    border-color: var(--primary-dark-color) !important;
    box-shadow: none !important;
    outline: none !important;
}

.frm_forms.with_frm_style .frm_fields_container .spectrum-scale .frm_scale input[type="radio"]:not([disabled]):checked::before,
.frm_forms.with_frm_style .frm_fields_container .spectrum-scale .frm_scale input[type="radio"]:not([disabled]):checked::after {
    display: none !important;
    content: none !important;
}

.spectrum-scale .frm_scale input[type="radio"]:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Connect the dots with a line */
.spectrum-scale .frm_opt_container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    align-items: center;
    justify-items: center;
    position: relative;
    padding: 8px 0;
    max-width: 500px;
}

.spectrum-scale .frm_opt_container::before {
    content: '';
    position: absolute;
    top: 50%;
    height: 2px;
    background: var(--primary-color);
    transform: translateY(-50%);
    z-index: 0;
    /* 7 columns = first dot center at 1/14 = 7.14%, last at 13/14 = 92.86% */
    left: calc(100% / 14);
    right: calc(100% / 14);
}

.spectrum-scale .frm_scale {
    position: relative;
    z-index: 1;
    margin: 0 !important;
    background: #fff;
    padding: 0 2px;
}

/* Anchor labels positioned at endpoints */
.spectrum-anchors {
    display: flex;
    justify-content: space-between;
    max-width: 500px;
    margin-top: 4px;
    margin-bottom: 12px;
    gap: 20px;
}

.spectrum-anchors .anchor-left,
.spectrum-anchors .anchor-right {
    font-size: 0.85em;
    color: #666;
    font-style: italic;
    max-width: 50%;
    line-height: 1.3;
}

.spectrum-anchors .anchor-right {
    text-align: right;
}


/* ── Dynamic Prompt Styling ─────────────────────────────────────────────── */

.dq-prompt {
    font-size: 1em;
    font-style: normal;
    color: var(--text-color, #333);
    margin: 1.2em 0 0.3em 0;
    padding: 0;
    background: none;
    border: none;
}

/* Tighten spacing: prompt container closer to textarea, more gap above */
.dq-prompt-container {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.dq-prompt-container + .frm_form_field {
    margin-top: 0 !important;
    padding-top: 0 !important;
}


/* Hide the generic "Your answer" label — the HTML field above serves as the prompt */
.dq-textarea .frm_primary_label {
    display: none !important;
}

/* Hide required asterisk on dynamic prompt textareas */
.dq-textarea .frm_required {
    display: none !important;
}

/* Section intro styling */
.spectrum-section .frm_description h3 {
    font-family: var(--header-font, 'Prata', serif);
    font-weight: normal;
    margin-bottom: 0.25em;
}

.spectrum-section .frm_description p {
    color: #555;
    font-size: 0.95em;
    margin-bottom: 0.5em;
}

/* Save & Return link */
.save-return-link {
    text-align: right;
    margin-top: 1em;
    padding-top: 0.5em;
    border-top: 1px solid #eee;
}

.save-return-link a {
    font-size: 0.8em;
    color: #999;
    text-decoration: none;
}

.save-return-link a:hover {
    color: var(--primary-dark-color);
}

/* ── Responsive: Spectrum scales on mobile ────────────────────────────── */
@media (max-width: 600px) {
    .spectrum-scale .frm_opt_container {
        max-width: 100%;
    }

    .spectrum-anchors {
        max-width: 100%;
    }

    .spectrum-scale .frm_scale input[type="radio"] {
        width: 20px !important;
        min-width: 20px !important;
        height: 20px !important;
    }

    .spectrum-scale .frm_scale label {
        width: 20px;
        height: 20px;
    }

    .spectrum-anchors .anchor-left,
    .spectrum-anchors .anchor-right {
        font-size: 0.78em;
    }
}

/* ── Your Answers (expandable appendix toggle at end of report) ─────────── */
.reflect-viewer {
    margin-top: 40px;
    margin-bottom: 28px;
}

/* High specificity so the theme's global button styles don't win */
.ai-report button.reflect-toggle,
button.reflect-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 28px;
    background: #f6f6f4 !important;
    border: 1px solid #e2e4df !important;
    border-radius: 12px !important;
    font-size: 0.95em;
    font-weight: 500;
    color: #3a3a36 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
}

.ai-report button.reflect-toggle:hover,
button.reflect-toggle:hover {
    background: #fff !important;
    border-color: #899684 !important;
    color: #4a5848 !important;
}

.reflect-toggle .toggle-arrow {
    font-size: 0.8em;
    color: #999;
}

.reflect-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    background: #fafbfc;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: max-height 0.4s ease, padding 0.3s ease, margin-top 0.3s ease, border-color 0.3s ease;
}

.reflect-viewer.expanded .reflect-content {
    max-height: none;
    overflow-y: visible;
    padding: 24px;
    margin-top: 20px;
    border-color: #e9ecef;
}

.reflect-subsection {
    margin-bottom: 28px;
}

.reflect-subsection:last-child {
    margin-bottom: 0;
}

.reflect-subsection h3 {
    font-size: 1.1em;
    font-weight: 600;
    color: #3a3a36;
    margin: 0 0 14px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.reflect-bt {
    margin-bottom: 20px;
}

.reflect-bt h4 {
    font-size: 1em;
    font-weight: 600;
    color: #4a5848;
    margin: 0 0 14px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.reflect-phase {
    margin-bottom: 16px;
}

.reflect-phase:last-child {
    margin-bottom: 0;
}

.reflect-phase-label {
    font-size: 0.78em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #899684;
    margin-bottom: 6px;
}

.reflect-qa {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 16px;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px dotted #e9ecef;
}

.reflect-qa:last-child {
    border-bottom: none;
}

.reflect-qa--stacked {
    grid-template-columns: 1fr;
    gap: 6px;
}

.reflect-q {
    font-size: 0.92em;
    color: #555;
    line-height: 1.45;
}

.reflect-a {
    font-size: 0.92em;
    font-weight: 500;
    color: #3a3a36;
    text-align: right;
}

.reflect-qa--stacked .reflect-a {
    text-align: left;
    font-weight: 400;
    line-height: 1.55;
    background: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Spectrum rows inside The Big Picture */
.reflect-spectrum {
    padding: 10px 0;
    border-bottom: 1px dotted #e9ecef;
}

.reflect-spectrum:last-child {
    border-bottom: none;
}

.reflect-scale {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

.reflect-scale-anchor {
    font-size: 0.82em;
    color: #555;
    line-height: 1.35;
}

.reflect-scale-anchor--left {
    text-align: right;
}

.reflect-scale-anchor--right {
    text-align: left;
}

.reflect-scale-dots {
    display: inline-flex;
    gap: 6px;
    flex-shrink: 0;
}

.reflect-scale-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d8dcd3;
    border: 1px solid #c5cabc;
}

.reflect-scale-dot.active {
    background: #899684;
    border-color: #6f7d6b;
    box-shadow: 0 0 0 3px rgba(137, 150, 132, 0.2);
}

@media (max-width: 640px) {
    .reflect-viewer.expanded .reflect-content {
        padding: 16px;
    }

    .reflect-qa {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .reflect-a {
        text-align: left;
        color: #4a5848;
    }

    /* Mobile spectrum: dots on top, anchors on one row beneath (left/right aligned) */
    .reflect-spectrum {
        padding: 14px 0;
    }

    .reflect-scale {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "dots dots"
            "left right";
        align-items: start;
        gap: 10px 12px;
    }

    .reflect-scale-dots {
        grid-area: dots;
        justify-self: center;
        margin: 2px 0;
    }

    .reflect-scale-anchor {
        font-size: 0.85em;
        max-width: none;
    }

    .reflect-scale-anchor--left {
        grid-area: left;
        text-align: left;
    }

    .reflect-scale-anchor--right {
        grid-area: right;
        text-align: right;
    }
}