/* Ask the Toad — supplements Tailwind on homepage and archive.
   Dynamic MCQ markup is built in JS; styles here must not rely on Tailwind utilities in that JS. */

.swami-toad-img {
    width: 5.5rem;
    height: 5.5rem;
    object-fit: contain;
    border-radius: 9999px;
    border: 3px solid rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.15);
}

@media (min-width: 640px) {
    .swami-toad-img {
        width: 7rem;
        height: 7rem;
    }
}

.swami-toad-img--placeholder {
    border-style: dashed;
    opacity: 0.85;
}

.topic-tab {
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.topic-tab:not(.topic-tab--active) {
    opacity: 0.72;
}

.topic-tab--active {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* Panel: reset section text-white inheritance */
.topic-panel {
    display: none;
    animation: topicFade 0.25s ease;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

@media (min-width: 640px) {
    .topic-panel {
        padding: 1.5rem;
    }
}

@media (prefers-color-scheme: dark) {
    .topic-panel {
        color: #f1f5f9;
        background: rgba(30, 41, 59, 0.92);
        border-color: #475569;
    }
}

.topic-panel--active {
    display: block;
}

@keyframes topicFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.topic-panel-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.topic-panel-hint {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

.topic-panel-question {
    font-family: Rokkitt, serif;
    font-weight: 900;
    font-size: 1.125rem;
    line-height: 1.25;
    color: #0f172a;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .topic-panel-question {
        font-size: 1.25rem;
    }
}

@media (prefers-color-scheme: dark) {
    .topic-panel-question {
        color: #ffffff;
    }
}

.mcq-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .mcq-options {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
}

.mcq-option-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mcq-option {
    width: 100%;
    text-align: left;
    border-radius: 0.75rem;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, opacity 0.12s ease;
    color: #0f172a;
}

@media (min-width: 640px) {
    .mcq-option {
        padding: 0.875rem 1rem;
    }
}

@media (prefers-color-scheme: dark) {
    .mcq-option {
        border-color: #475569;
        background: rgba(15, 23, 42, 0.5);
        color: #f1f5f9;
    }
}

.mcq-option:hover {
    transform: translateY(-1px);
    border-color: #69a76d;
}

.mcq-option:focus {
    outline: none;
}

.mcq-option:focus-visible {
    box-shadow: 0 0 0 2px #69a76d;
}

.mcq-option-key {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    color: #568f59;
}

@media (prefers-color-scheme: dark) {
    .mcq-option-key {
        color: #8abd8c;
    }
}

.mcq-option-text {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    color: #1e293b;
}

@media (min-width: 640px) {
    .mcq-option-text {
        font-size: 1rem;
    }
}

@media (prefers-color-scheme: dark) {
    .mcq-option-text {
        color: #f1f5f9;
    }
}

.mcq-option--heard {
    border-color: rgba(105, 167, 109, 0.65) !important;
    background: rgba(105, 167, 109, 0.12) !important;
}

@media (prefers-color-scheme: dark) {
    .mcq-option--heard {
        background: rgba(105, 167, 109, 0.18) !important;
    }
}

.mcq-option-reaction {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0 0.75rem;
}

.mcq-option-reaction--visible {
    max-height: 12rem;
    opacity: 1;
    padding: 0.65rem 0.75rem;
}

.mcq-option-reaction-inner {
    border-radius: 0.75rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    padding: 0.65rem 0.85rem;
}

@media (prefers-color-scheme: dark) {
    .mcq-option-reaction-inner {
        background: #422006;
        border-color: #b45309;
    }
}

.mcq-option-reaction-label {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #b45309;
    margin-bottom: 0.25rem;
}

@media (prefers-color-scheme: dark) {
    .mcq-option-reaction-label {
        color: #fbbf24;
    }
}

.mcq-option-reaction-text {
    font-size: 0.875rem;
    font-weight: 500;
    font-style: italic;
    line-height: 1.45;
    color: #334155;
}

@media (prefers-color-scheme: dark) {
    .mcq-option-reaction-text {
        color: #fde68a;
    }
}

.mcq-share-btn {
    margin-top: 0.5rem;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #b45309;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mcq-share-btn:hover {
    text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
    .mcq-share-btn {
        color: #fbbf24;
    }
}

.topic-complete {
    display: none;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.45;
    color: #065f46;
}

.topic-complete strong {
    color: #047857;
}

@media (prefers-color-scheme: dark) {
    .topic-complete {
        background: rgba(6, 95, 70, 0.25);
        border-color: rgba(52, 211, 153, 0.4);
        color: #a7f3d0;
    }

    .topic-complete strong {
        color: #6ee7b7;
    }
}

.topic-complete--visible {
    display: block;
    animation: topicFade 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
    .topic-panel,
    .mcq-option-reaction,
    .topic-tab,
    .mcq-option,
    .topic-complete--visible {
        animation: none !important;
        transition: none !important;
    }
}
