/**
 * Longreads Reader Quiz Styles
 *
 * Typography: Palatino/Georgia serif for editorial feel
 * Brand color: --lr-brand #cc0000 (Longreads red), defined once on the container
 * Layout: Max-width 680px, responsive at 520px breakpoint
 */

/* === QUIZ CONTAINER === */
#lr-quiz-wrap * { box-sizing: border-box; }
#lr-quiz-wrap {
    --lr-brand: #cc0000;
    --lr-brand-hover: #aa0000;
    font-family: Palatino, Georgia, serif;
    color: #111111;
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 24px;
}
/* === HEADER & PROGRESS === */
#lr-quiz-wrap .quiz-header { text-align: center; margin-bottom: 40px; }
#lr-quiz-wrap .quiz-header h1 {
    font-size: 2rem; font-weight: normal;
    margin: 0 0 12px; line-height: 1.2;
}
#lr-quiz-wrap .quiz-header p {
    font-size: 1.05rem; color: #666666;
    margin: 0; font-style: italic;
}
#lr-quiz-wrap .quiz-progress { margin-bottom: 32px; }
#lr-quiz-wrap .quiz-progress-label {
    font-size: 0.85rem; color: #666666;
    margin-bottom: 8px; text-align: center;
}
#lr-quiz-wrap .quiz-progress-bar {
    height: 3px; background: #eeeeee;
    border-radius: 3px; overflow: hidden;
}
#lr-quiz-wrap .quiz-progress-fill {
    height: 100%; background: var(--lr-brand);
    border-radius: 3px; transition: width 0.3s ease;
}
/* === QUESTION SCREEN === */
#lr-quiz-wrap .quiz-question { animation: lrFadeIn 0.3s ease; }
@keyframes lrFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
#lr-quiz-wrap .quiz-question h2 {
    font-size: 1.4rem; font-weight: normal;
    line-height: 1.4; margin: 0 0 24px;
}
#lr-quiz-wrap .quiz-answers {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 12px;
}
#lr-quiz-wrap .quiz-answers button {
    width: 100%; text-align: left;
    font-family: Palatino, Georgia, serif;
    font-size: 1rem; color: #111111;
    background: #ffffff; border: 1px solid #dddddd;
    border-radius: 4px; padding: 16px 20px;
    cursor: pointer; line-height: 1.4;
    transition: border-color 0.15s ease, background 0.15s ease;
}
#lr-quiz-wrap .quiz-answers button:hover {
    border-color: var(--lr-brand); background: #fff8f8;
}
#lr-quiz-wrap .quiz-answers button:focus {
    outline: 2px solid var(--lr-brand); outline-offset: 2px;
}
/* === RESULTS SCREEN === */
#lr-quiz-wrap .quiz-results { animation: lrFadeIn 0.4s ease; }
#lr-quiz-wrap .result-type {
    text-align: center; margin-bottom: 36px;
    padding-bottom: 32px; border-bottom: 1px solid #eeeeee;
}
#lr-quiz-wrap .result-eyebrow {
    font-size: 0.85rem; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--lr-brand); margin: 0 0 10px;
}
#lr-quiz-wrap .result-label {
    font-size: 2.2rem; font-weight: normal;
    margin: 0 0 16px; line-height: 1.2;
}
#lr-quiz-wrap .result-description {
    font-size: 1.05rem; line-height: 1.7;
    color: #333333; margin: 0; font-style: italic;
}
#lr-quiz-wrap .result-stories-heading {
    font-size: 0.85rem; text-transform: uppercase;
    letter-spacing: 0.08em; color: #666666;
    margin: 0 0 20px; font-weight: normal;
}
/* === STORY CARDS === */
#lr-quiz-wrap .story-cards {
    display: flex; flex-direction: column;
    gap: 20px; margin-bottom: 36px;
}
#lr-quiz-wrap .story-card {
    display: grid; grid-template-columns: 260px 1fr;
    text-decoration: none; color: inherit;
    border: 1px solid #eeeeee; border-radius: 4px;
    overflow: hidden; transition: border-color 0.15s ease;
}
#lr-quiz-wrap .story-card:hover { border-color: var(--lr-brand); }
#lr-quiz-wrap .story-card img {
    width: 260px; height: 100%; min-height: 60px;
    object-fit: cover; display: block; background: #eeeeee;
}
#lr-quiz-wrap .story-card-body { padding: 16px; }
#lr-quiz-wrap .story-card-title {
    font-size: 1rem; font-weight: bold;
    margin: 0 0 4px; line-height: 1.3;
}
#lr-quiz-wrap .story-card-author {
    font-size: 0.85rem; color: #666666;
    margin: 0 0 8px; font-style: italic;
}
#lr-quiz-wrap .story-card-excerpt {
    font-size: 0.9rem; color: #444444;
    margin: 0 0 10px; line-height: 1.5;
}
#lr-quiz-wrap .story-card-cta {
    font-size: 0.85rem; color: var(--lr-brand); font-style: italic;
}
/* === ACTIONS === */
#lr-quiz-wrap .quiz-actions {
    display: flex; flex-wrap: wrap; gap: 12px;
    align-items: center; justify-content: center;
}
#lr-quiz-wrap .btn-share {
    font-family: Palatino, Georgia, serif;
    font-size: 0.95rem; font-style: italic;
    background: var(--lr-brand); color: #ffffff;
    border: none; border-radius: 4px;
    padding: 12px 24px; cursor: pointer;
    transition: background 0.15s ease;
}
#lr-quiz-wrap .btn-share:hover { background: var(--lr-brand-hover); }
#lr-quiz-wrap .btn-restart {
    font-family: Palatino, Georgia, serif;
    font-size: 0.95rem; font-style: italic;
    background: transparent; color: #666666;
    border: 1px solid #cccccc; border-radius: 4px;
    padding: 12px 24px; cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}
#lr-quiz-wrap .btn-restart:hover {
    border-color: #111111; color: #111111;
}
#lr-quiz-wrap .share-confirm {
    font-size: 0.85rem; color: #666666;
    font-style: italic; display: none;
}
/* === RESPONSIVE === */
@media (max-width: 520px) {
    #lr-quiz-wrap .story-card { grid-template-columns: 1fr; }
    #lr-quiz-wrap .story-card img { width: 100%; height: 60px; }
    #lr-quiz-wrap .quiz-header h1 { font-size: 1.6rem; }
    #lr-quiz-wrap .result-label { font-size: 1.8rem; }
}
