*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #0a1f3d;
    min-height: 100vh;
    font-family: 'DM Sans', system-ui, sans-serif;
    color: #1a2e4a;
}

/* ── Wordmark ── */
.wordmark {
    position: fixed;
    top: 18px;
    left: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 13px;
    letter-spacing: 0.15em;
    z-index: 100;
    text-decoration: none;
}

/* ── Card ── */
.card {
    background: #d4e3f2;
    border-radius: 18px;
    padding: 32px 28px 24px;
    max-width: 480px;
    width: calc(100% - 32px);
    margin: 72px auto 40px;
}

.card-wide {
    max-width: 720px;
}

/* ── Chapter / category label ── */
.card-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5a7a9a;
    margin-bottom: 16px;
}

/* ── Question text ── */
.question-prompt {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 19px;
    line-height: 1.55;
    color: #0d1f35;
    margin-bottom: 24px;
}

/* ── Multiple choice ── */
.mc-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.mc-option input[type="radio"] {
    display: none;
}

.mc-option label {
    display: block;
    padding: 13px 16px;
    background: white;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    color: #1a2e4a;
    transition: background 0.12s, border-color 0.12s;
    line-height: 1.4;
}

.mc-option label:hover {
    background: #e4eff9;
}

.mc-option input[type="radio"]:checked + label {
    border-color: #0a1f3d;
    background: #c2d8ee;
}

/* ── Textarea ── */
textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 14px;
    border: 2px solid #b0c8e0;
    border-radius: 10px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    background: white;
    color: #1a2e4a;
    margin-bottom: 4px;
}

textarea:focus {
    outline: none;
    border-color: #4a7fb5;
}

.hint {
    font-size: 12px;
    color: #6a8aaa;
    margin-bottom: 16px;
    margin-top: 4px;
}

/* ── Buttons ── */
.btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    background: #0a1f3d;
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.12s;
}

.btn-primary:hover {
    background: #163255;
}

.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    color: #0a1f3d;
    border: 2px solid #0a1f3d;
    border-radius: 10px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s;
}

.btn-secondary:hover {
    background: rgba(10, 31, 61, 0.08);
}

/* ── Progress ── */
.progress {
    font-size: 12px;
    color: #6a8aaa;
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #b8cfe8;
}

/* ── Back link ── */
.back-link {
    display: inline-block;
    font-size: 13px;
    color: #4a7fb5;
    text-decoration: none;
    margin-bottom: 20px;
}

.back-link:hover {
    text-decoration: underline;
}

/* ── Preview screen ── */
.preview-item {
    margin-bottom: 24px;
}

.preview-item + .preview-item {
    border-top: 1px solid #b8cfe8;
    padding-top: 20px;
}

.preview-item-prompt {
    font-size: 14px;
    color: #3a5a7a;
    margin-bottom: 8px;
    line-height: 1.4;
}

.preview-model-answer {
    font-size: 13px;
    color: #4a6741;
    background: #f2f7ef;
    border-left: 3px solid #7ab86e;
    padding: 8px 12px;
    margin-bottom: 10px;
    line-height: 1.5;
    border-radius: 0 4px 4px 0;
}

.preview-model-answer-label {
    font-weight: 600;
}

/* ── Review screen ── */
.review-answer-block {
    background: white;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 12px 0;
    font-size: 15px;
    line-height: 1.5;
}

.review-answer-block.hers {
    border-left: 3px solid #7aadd6;
}

.review-answer-block.correct {
    border-left: 3px solid #2a7a4a;
}

.answer-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6a8aaa;
    margin-bottom: 6px;
}

.forgiving-note {
    font-size: 13px;
    color: #5a7a5a;
    background: #e8f4ec;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* ── Correct review screen ── */
.correct-badge-row {
    margin: 4px 0 20px;
}

.definition-block {
    background: white;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 12px 0;
    border-left: 3px solid #2a7a4a;
}

.definition-text {
    font-size: 15px;
    line-height: 1.55;
    color: #1a2e4a;
    font-style: italic;
    margin-top: 6px;
}

/* ── Done screen ── */
.done-moon {
    text-align: center;
    font-size: 48px;
    margin-bottom: 16px;
}

.done-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    color: #0d1f35;
    text-align: center;
    margin-bottom: 8px;
}

.done-sub {
    font-size: 15px;
    color: #4a6a8a;
    text-align: center;
    margin-bottom: 24px;
}

/* ── Sent screen ── */
.sent-check {
    text-align: center;
    font-size: 44px;
    margin-bottom: 14px;
}

/* ── Landing ── */
.landing-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    color: #0d1f35;
    margin-bottom: 20px;
}

.book-link {
    display: block;
    background: white;
    border-radius: 10px;
    padding: 16px 18px;
    text-decoration: none;
    color: #1a2e4a;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 10px;
    transition: background 0.12s;
}

.book-link:hover {
    background: #e4eff9;
}

.book-link-sub {
    font-size: 12px;
    color: #6a8aaa;
    font-weight: 400;
    margin-top: 2px;
}

.book-author {
    font-size: 14px;
    color: #6a8aaa;
    margin-bottom: 16px;
}

/* ── Chapter picker ── */
.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.chapter-btn {
    display: block;
    background: white;
    border-radius: 10px;
    padding: 16px 10px;
    text-align: center;
    text-decoration: none;
    color: #1a2e4a;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    transition: background 0.12s;
}

.chapter-btn:hover {
    background: #e4eff9;
}

.chapter-btn-num {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    display: block;
    margin-bottom: 4px;
}

/* ── Parents view ── */
.parent-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    color: #0d1f35;
    margin-bottom: 20px;
}

.submissions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.submissions-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #5a7a9a;
    padding: 8px 12px;
    border-bottom: 2px solid #b0c8e0;
}

.submissions-table td {
    padding: 12px 12px;
    border-bottom: 1px solid #c8daea;
    vertical-align: top;
}

.submissions-table tr:last-child td {
    border-bottom: none;
}

.submissions-table a {
    color: #2a5f9a;
    text-decoration: none;
    font-weight: 500;
}

.submissions-table a:hover {
    text-decoration: underline;
}

.empty-state {
    font-size: 14px;
    color: #6a8aaa;
    text-align: center;
    padding: 32px 0;
}

/* ── Parent detail ── */
.detail-response {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #b8cfe8;
}

.detail-response:last-child {
    border-bottom: none;
}

.detail-q-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #5a7a9a;
    margin-bottom: 4px;
}

.detail-q-prompt {
    font-size: 14px;
    color: #2a3e54;
    margin-bottom: 10px;
    line-height: 1.4;
}

.detail-answer {
    background: white;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: #1a2e4a;
    line-height: 1.5;
    margin-bottom: 6px;
}

.result-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 5px;
    letter-spacing: 0.05em;
}

.result-badge.correct   { background: #d4f0e0; color: #1a6a3a; }
.result-badge.forgiving { background: #fef3cc; color: #7a5a00; }
.result-badge.incorrect { background: #fde8e8; color: #8a1a1a; }
.result-badge.open      { background: #e8e8f0; color: #3a3a6a; }

/* ── Login form ── */
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #b0c8e0;
    border-radius: 10px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 15px;
    background: white;
    color: #1a2e4a;
    margin-bottom: 12px;
}

.login-form input:focus {
    outline: none;
    border-color: #4a7fb5;
}

.error-msg {
    font-size: 13px;
    color: #8a1a1a;
    margin-bottom: 12px;
}

/* ── Back nav (parent detail) ── */
.back-nav {
    margin-bottom: 20px;
}
