#questionnaire-container {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    min-height: 0;
}

.questionnaire-card {
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.questionnaire-card h2 {
    font-size: 18px;
    margin-bottom: 6px;
}

.questionnaire-card p {
    color: #444;
    line-height: 1.4;
}

/* Replay affordance of the evaluation-only summary: a quiz without a retake
   cooldown (e.g. the dessert quiz) hides its questions after the final save and
   this card brings them back. */
.questionnaire-replay p {
    margin-bottom: 10px;
}

.questionnaire-instruction {
    background: #f7f3e6;
    border-left: 3px solid #2c4e6e;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 12px;
    color: #2c4e6e;
    font-size: 14px;
}

.questionnaire-card select,
.questionnaire-card textarea,
.questionnaire-card input[type="number"] {
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d6d6d6;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.questionnaire-card textarea {
    resize: vertical;
}

.questionnaire-question {
    padding: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.questionnaire-question:last-child {
    border-bottom: none;
}

.questionnaire-question-title {
    font-weight: 600;
    margin-bottom: 10px;
}

.likert-scale {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.likert-option {
    background: #f2f2f2;
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid transparent;
}

.likert-option input {
    display: none;
}

.likert-option.selected {
    background: #007AFF;
    color: white;
    border-color: #0060d0;
}

.likert-scale.boolean-scale {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.boolean-scale .likert-option {
    font-size: 14px;
    font-weight: 600;
    padding: 14px 8px;
}

/* Modern, mobile-friendly agreement scale: numbered circles in a single row
   with anchor labels at the two extremes instead of the long value names. */
.likert-scale.likert-agreement {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.likert-agreement-options {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.likert-option.likert-agreement-option {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    background: #f2f2f2;
}

.likert-option.likert-agreement-option.selected {
    background: #007AFF;
    color: #ffffff;
    border-color: #0060d0;
}

.likert-agreement-labels {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    line-height: 1.35;
    color: #6b7280;
}

.likert-agreement-labels span {
    min-width: 0;
}

.likert-agreement-labels span:first-child {
    text-align: left;
}

.likert-agreement-labels span:last-child {
    text-align: right;
}

.questionnaire-no-options {
    padding: 8px 10px;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    font-size: 12px;
    color: #6b7280;
}

.questionnaire-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
}

.questionnaire-button {
    border: none;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.questionnaire-button.primary {
    background: #007AFF;
    color: white;
}

.questionnaire-button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.questionnaire-button.secondary {
    background: #e5e5e5;
    color: #333;
}

.questionnaire-status {
    background: #111;
    color: white;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
}

.questionnaire-result {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    background: #111;
    color: white;
}

.questionnaire-result-note {
    margin-bottom: 0;
    font-size: 13px;
    opacity: 0.85;
}

/* Long-term relationship result card (test_key=longterm).
   One colour-graded overview instead of long bullet lists: every bar is the same
   red -> amber -> green scale, so the marker alone tells how strong a dimension
   is. The tag next to each dimension repeats the same information in words, so
   the card stays readable without relying on colour alone. */
.lt-result-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 6px 0 10px;
}

.lt-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

.lt-badge-functioning {
    background: #1f7a4d;
}

.lt-badge-vulnerable {
    background: #a9700f;
}

.lt-badge-dysfunctional {
    background: #b3311f;
}

.lt-badge-unknown {
    background: #4b5563;
}

.lt-index {
    font-size: 14px;
    font-weight: 700;
}

.lt-confidence {
    font-size: 12px;
    opacity: 0.8;
}

.lt-verdict {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
}

.lt-self {
    margin: 10px 0 0;
    font-size: 13px;
}

.lt-hint {
    margin: 12px 0 0;
    font-size: 12px;
    opacity: 0.85;
}

/* Páros (két személyes) kitöltés ajánlója a hosszú távú eredménykártyán: a
   link a paros-kerdoiv.html-re visz, ahol a felhasználó indíthat egy párost
   vagy csatlakozhat egy kóddal. */
.lt-pair-cta {
    margin: 16px 0 0;
    padding: 14px 16px;
    border: 1px solid rgba(44, 78, 110, 0.25);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
}

.lt-pair-cta-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.lt-pair-cta-text {
    margin: 6px 0 12px;
    font-size: 13px;
    line-height: 1.45;
}

.lt-pair-cta a.questionnaire-button {
    display: inline-block;
    text-decoration: none;
}

.lt-scale {
    position: relative;
    display: block;
    height: 10px;
    border-radius: 999px;
    margin: 24px 0 0;
    background: linear-gradient(90deg,
        #c0392b 0%,
        #d9822b 25%,
        #e0a80f 40%,
        #cbbf18 52%,
        #7fa63f 62%,
        #3a9d6e 70%,
        #2e8b57 100%);
}

.lt-scale-marker {
    position: absolute;
    top: -20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
    line-height: 1;
}

.lt-scale-marker-value {
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid rgba(44, 78, 110, 0.3);
    background: #ffffff;
    font-size: 11px;
    font-weight: 700;
    color: #2c4e6e;
    white-space: nowrap;
}

.lt-scale-marker-pin {
    width: 0;
    height: 0;
    margin-top: -1px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid #2c4e6e;
}

.lt-scale-tick {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 2px;
    background: rgba(255, 255, 255, 0.7);
}

.lt-scale-legend {
    position: relative;
    height: 16px;
    margin-top: 2px;
    font-size: 11px;
    color: rgba(44, 78, 110, 0.8);
}

.lt-scale-legend span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}

.lt-scale-legend span:first-child {
    transform: none;
}

.lt-scale-legend span:last-child {
    transform: translateX(-100%);
}

.lt-dims {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.lt-dim {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(44, 78, 110, 0.07);
}

.lt-dim-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 10px;
}

.lt-dim-name {
    font-size: 14px;
    font-weight: 600;
}

.lt-dim-tag {
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.lt-dim-tag-strong {
    background: #d7f0e3;
    color: #1f7a4d;
}

.lt-dim-tag-attention {
    background: #fbeacb;
    color: #8a5a00;
}

.lt-dim-tag-weak {
    background: #fadbd8;
    color: #a5271a;
}

/* The dimension bars are compact: no value bubble, only the position marker.
   The extra top margin keeps the marker pin clear of the label row above it. */
.lt-dim .lt-scale {
    height: 6px;
    margin-top: 14px;
}

.lt-dim .lt-scale-marker {
    top: -12px;
}

.lt-dim .lt-scale-marker-pin {
    border-top-width: 5px;
}

.lt-flags {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-left: 3px solid #b3311f;
    border-radius: 10px;
    background: rgba(179, 49, 31, 0.1);
}

.lt-flags p {
    margin: 0 0 6px;
    font-weight: 700;
}

.lt-flags ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
}

.lt-flags li + li {
    margin-top: 4px;
}

.lt-flags p.lt-flags-note {
    margin: 8px 0 0;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.85;
}

/* Lifestyle result card: the answers are concrete settings, so they are shown
   as label -> chosen option rows instead of 0-100 scores. */
.questionnaire-result-values {
    list-style: none;
    margin: 12px 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.questionnaire-result-values li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(44, 78, 110, 0.08);
    font-size: 14px;
}

.questionnaire-result-values li strong {
    font-weight: 700;
    text-align: right;
}

@media (max-width: 480px) {
    .questionnaire-result-values li {
        flex-direction: column;
        gap: 2px;
    }

    .questionnaire-result-values li strong {
        text-align: left;
    }
}

.questionnaire-footer {
    min-height: 0;
    padding: 0;
}

@media (max-width: 768px) {
    #questionnaire-container {
        padding: 16px;
    }

    .likert-scale {
        grid-template-columns: repeat(1, 1fr);
    }
}
