/* Molecule card (direct children of global #structures flex container) */
.mol-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mol-card h4 {
    margin-bottom: 0.5rem;
    color: #333;
}

.viewer-wrap {
    position: relative;
}

.value-overlay {
    display: none;
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #c0392b;
    max-width: calc(100% - 16px);
    text-align: center;
    line-height: 1.3;
}

.value-overlay .overlay-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

/* Difficulty toggle pills */
#category-toggle {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 1rem;
}

.category-pill {
    padding: 5px 16px;
    border: 2px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    background: #fff;
    color: #555;
    transition: all 0.15s;
}

.category-pill:hover {
    border-color: #6153cc;
    color: #6153cc;
}

.category-pill.active {
    background: #6153cc;
    border-color: #6153cc;
    color: #fff;
}

/* Answer pills */
#primary-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.answer-pill {
    padding: 8px 20px;
    border: 2px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.15s;
    user-select: none;
    background: #fff;
    color: #333;
}

.answer-pill:hover:not(:disabled) {
    border-color: #6153cc;
    background: #f0eeff;
}

.answer-pill:disabled {
    cursor: default;
}

.answer-pill.correct {
    background: #d4edda;
    border-color: #28a745;
}

.answer-pill.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
}

.answer-pill.missed {
    background: #fff3cd;
    border-color: #ffc107;
}

/* Reason follow-up (lives INSIDE the explanation zone, which is the one
   element allowed to grow downward on interaction) */
.reason-follow {
    margin: 0.4rem 0 0.2rem;
}

.reason-follow .reason-prompt {
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.reason-pills {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}

.reason-pill {
    padding: 5px 14px;
    border: 2px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    background: #fff;
    color: #333;
    transition: all 0.15s;
}

.reason-pill:hover:not(:disabled) {
    border-color: #6153cc;
    background: #f0eeff;
}

.reason-pill:disabled {
    cursor: default;
}

.reason-pill.correct {
    background: #d4edda;
    border-color: #28a745;
}

.reason-pill.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
}

.reason-pill.missed {
    background: #fff3cd;
    border-color: #ffc107;
}

/* Explanation zone (feedback-zone.css). */
#explanation-area { --zone-height: 7em; }

/* Two stacked question rows — both exist from page load (no frameshift);
   the mp row unlocks after the bp call. */
.question-row {
    margin-bottom: 0.6rem;
}

.question-row h3 {
    margin-bottom: 0.4rem;
}

.question-row .row-pills {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}


#category-toggle {
    flex-wrap: wrap;
}

/* Selected-but-unchecked pill state */
.answer-pill.selected {
    border-color: #6153cc;
    background: #f0eeff;
    color: #3d3390;
}

/* Check Both — the verdict-morphing control (feedback-zone btn-* classes) */
#check-btn {
    padding: 8px 22px;
    border: 2px solid #6153cc;
    border-radius: 20px;
    background: #6153cc;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s;
}

#check-btn:disabled {
    background: #fff;
    border-color: #dee2e6;
    color: #aab2ba;
    cursor: default;
}
