/*
 *   tedsquiz/static/quiz.css -- Mobile-first styles for the quiz engine
 *
 * <andy@payne.org>
 * Jun, 2026
 */

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    margin: 0;
    min-height: 100vh;
}

.wrap {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

h1 {
    font-size: 24px;
    margin: 8px 0 4px;
}

.muted {
    color: #6e6e73;
    font-size: 15px;
    margin: 0 0 16px;
}

a {
    color: #0066cc;
}

/* --- Picker (index.html) --- */

.quiz-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.quiz-card:active {
    background: #eee;
}

.quiz-card h2 {
    font-size: 18px;
    margin: 0 0 4px;
}

.quiz-card p {
    margin: 0;
    color: #6e6e73;
    font-size: 14px;
}

/* --- Quiz runner --- */

.progress {
    font-size: 14px;
    color: #6e6e73;
    margin-bottom: 8px;
}

.progress-bar {
    height: 4px;
    background: #e0e0e3;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar > div {
    height: 100%;
    background: #0066cc;
    transition: width 0.2s;
}

.prompt {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px;
    line-height: 1.35;
}

.choice {
    display: block;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 2px solid #d2d2d7;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    font-size: 17px;
    font-family: inherit;
    color: inherit;
    min-height: 48px;
    cursor: pointer;
}

.choice.selected {
    border-color: #0066cc;
    background: #eaf2fb;
}

.btn {
    display: block;
    width: 100%;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-size: 17px;
    font-weight: 600;
    font-family: inherit;
    margin-top: 20px;
    min-height: 48px;
    cursor: pointer;
}

.btn:disabled {
    background: #b9b9be;
    cursor: default;
}

/* --- Results --- */

.score-banner {
    background: #fff;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.score-banner .big {
    font-size: 40px;
    font-weight: 700;
    margin: 0;
}

.score-banner .verdict {
    font-size: 17px;
    font-weight: 600;
    margin: 8px 0 0;
}

.verdict.pass { color: #1a7f37; }
.verdict.fail { color: #c0392b; }

.score-banner .commentary {
    font-style: italic;
    font-size: 17px;
    line-height: 1.5;
    color: #222;
    margin: 14px auto 0;
    max-width: 34em;
}

.review-item {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.review-item .q {
    font-weight: 600;
    margin: 0 0 8px;
}

.review-item .ans {
    margin: 4px 0;
    font-size: 15px;
}

.ans.right { color: #1a7f37; }
.ans.wrong { color: #c0392b; }

.review-item .explanation {
    margin: 8px 0 0;
    font-size: 14px;
    color: #6e6e73;
}

.error-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
