/* Trang luyện tập "Văn Ôn Võ Luyện": nền kem, chữ xanh đậm như thư viện; tiêu đề Comfortaa */
:root { color-scheme: light; --ink: #103b79; --ink-soft: #2d4a73; --paper: #fbf7ea; --line: #e6dcc3; --ok: #1f7a4d; --no: #b4472b; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 "Segoe UI", Arial, sans-serif; }
h1, h2, button, .pr-back, .pr-eyebrow, .pr-chip, .pr-type strong, .pr-count { font-family: "Comfortaa", "Segoe UI", Arial, sans-serif; font-weight: 700; }
button { font-size: inherit; color: inherit; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid #b67744; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.pr-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px max(16px, calc((100% - 920px) / 2)); background: #174e98; color: #fff; }
.pr-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px 0 6px; border-radius: 22px; color: #fff; text-decoration: none; font-size: 15px; }
.pr-back:hover { background: #ffffff1f; }
.pr-back svg { width: 24px; height: 24px; }
.pr-stars { margin: 0; font-size: 14px; color: #ffe59b; font-weight: 700; }

.pr-main { max-width: 920px; margin: 0 auto; padding: 28px 16px 72px; }
.pr-eyebrow { margin: 0 0 6px; font-size: 15px; color: #4a6a99; }
.pr-hero h1 { margin: 0 0 10px; font-size: clamp(30px, 4.6vw, 46px); line-height: 1.15; text-wrap: balance; }
.pr-lead { margin: 0 0 22px; max-width: 34em; color: var(--ink-soft); }
.pr-note { margin: 0 0 14px; color: var(--ink-soft); font-size: 16px; }

.pr-grades { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pr-chip { min-height: 44px; padding: 8px 18px; border: 1.5px solid #c9bd9d; border-radius: 999px; background: transparent; font-size: 15px; }
.pr-chip:hover { background: #f0e8d0; }
.pr-chip[aria-pressed="true"] { background: #1b5fc4; border-color: #1b5fc4; color: #fff; }

.pr-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.pr-type { display: flex; flex-direction: column; gap: 4px; min-height: 92px; padding: 16px 18px; text-align: left; border: 1.5px solid var(--line); border-radius: 18px; background: #fff; }
.pr-type:hover, .pr-type:focus-visible { border-color: #1b5fc4; box-shadow: 0 8px 22px #103b7918; }
.pr-type strong { font-size: 18px; line-height: 1.3; }
.pr-type span { font-size: 14px; color: var(--ink-soft); font-family: "Segoe UI", Arial, sans-serif; font-weight: 400; }
.pr-empty { color: var(--ink-soft); }

.pr-book { margin-top: 40px; padding-top: 28px; border-top: 1.5px dashed #c9bd9d; }
.pr-book h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 28px); line-height: 1.25; text-wrap: balance; }
.pr-book-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pr-book-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: 16px; background: #fff6e0; border: 1.5px solid #ecd9a8; }
.pr-book-item p { margin: 0; font-size: 16px; }
.pr-book-item small { display: block; color: #8a6a2a; font-size: 13px; }

.pr-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pr-count { margin: 0; font-size: 15px; color: #4a6a99; }
.pr-type-name { margin: 0 0 12px; font-size: 20px; color: #4a6a99; }
.pr-question { margin: 0 0 22px; padding: 22px 24px; border-radius: 20px; background: #fff; border: 1.5px solid var(--line); font-size: clamp(19px, 2.5vw, 23px); line-height: 1.55; }
.pr-answer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pr-answer input { flex: 1 1 180px; max-width: 280px; min-height: 54px; padding: 8px 16px; border: 2px solid #9db3d6; border-radius: 16px; font: inherit; font-size: 22px; color: var(--ink); background: #fff; }
.pr-answer input:disabled { background: #f1ede0; }
.pr-unit { font-size: 18px; color: var(--ink-soft); }
.pr-main-btn { min-height: 54px; padding: 10px 26px; border: 0; border-radius: 18px; background: #1b5fc4; color: #fff; }
.pr-main-btn:hover { background: #164fa6; }
.pr-main-btn:disabled { opacity: .5; cursor: default; }
.pr-quiet { min-height: 48px; padding: 8px 18px; border: 1.5px solid #9db3d6; border-radius: 16px; background: transparent; }
.pr-quiet:hover { background: #e8eefa; }

.pr-verdict { margin-top: 22px; padding: 18px 22px; border-radius: 20px; background: #eef6ee; border: 1.5px solid #bfdcc5; }
.pr-verdict.is-wrong { background: #fdf0ea; border-color: #ecc4b4; }
.pr-verdict-line { margin: 0 0 8px; font-size: 20px; font-family: "Comfortaa", "Segoe UI", Arial, sans-serif; font-weight: 700; color: var(--ok); }
.pr-verdict.is-wrong .pr-verdict-line { color: var(--no); }
.pr-steps { margin: 0 0 14px; padding-left: 22px; color: var(--ink-soft); }
.pr-steps li { margin: 2px 0; }
.pr-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.pr-result-title { margin: 0 0 10px; font-size: clamp(26px, 4vw, 38px); }

@media (max-width: 560px) {
  .pr-answer input { max-width: none; }
  .pr-actions { justify-content: stretch; }
  .pr-actions button { flex: 1 1 auto; }
  .pr-book-item { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: no-preference) { .pr-type, .pr-chip, .pr-main-btn, .pr-quiet { transition: background-color .15s, border-color .15s, box-shadow .15s; } }

/* Thử sức đầu vào "Lửa Thử Vàng" */
.pr-place { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: 30px; padding: 18px 22px; border-radius: 20px; background: #fff3d6; border: 1.5px solid #ecd9a8; }
.pr-place h2 { margin: 0 0 4px; font-size: 24px; line-height: 1.25; }
.pr-place .pr-note { margin: 0; max-width: 30em; }
.pr-sheet { background: #eef4ff; border-color: #c9d8f2; }
.pr-sheet .pr-main-btn { display: inline-flex; align-items: center; text-decoration: none; }
.pr-exam { background: #eaf6ef; border-color: #bfe0cc; }
.pr-exam .pr-main-btn { display: inline-flex; align-items: center; text-decoration: none; }
.pr-clock { margin: 0; padding: 4px 12px; border-radius: 999px; background: #fff3d6; border: 1.5px solid #ecd9a8; font-family: "Comfortaa", "Segoe UI", Arial, sans-serif; font-weight: 700; font-size: 15px; color: #8a5a00; }

/* Lộ trình "Đi Một Ngày Đàng": mỗi dạng là một chặng */
.pr-road-title { margin: 0 0 6px; font-size: clamp(22px, 3vw, 28px); line-height: 1.25; }
.pr-step { font-size: 13px; color: #4a6a99; font-family: "Comfortaa", "Segoe UI", Arial, sans-serif; font-weight: 700; }
.pr-type .pr-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pr-type .pr-status, .pr-type .pr-should { padding: 2px 10px; border-radius: 999px; font-size: 13px; font-family: "Segoe UI", Arial, sans-serif; font-weight: 600; background: #eef1f6; color: #4a5a72; }
.pr-type.is-doing .pr-status { background: #fff3d6; color: #8a5a00; }
.pr-type.is-done { border-color: #bfdcc5; background: #f4faf4; }
.pr-type.is-done .pr-status { background: #dff1e2; color: var(--ok); }
.pr-type .pr-should { background: #fde3da; color: var(--no); }

/* Sổ lỗi: câu chưa tới ngày ôn */
.pr-book-item.is-later { background: #f6f2e6; border-color: var(--line); }
.pr-later { flex: 0 0 auto; font-size: 14px; color: #6b6248; }

/* Yêu cầu cần đạt dưới mỗi chặng; chặng được mở từ báo cáo phụ huynh */
.pr-type .pr-yccd { margin-top: 6px; font-family: "Segoe UI", Arial, sans-serif; font-weight: 400; font-size: 13px; line-height: 1.45; color: #6b7a90; }
.pr-type.is-target { border-color: #1b5fc4; box-shadow: 0 0 0 3px #1b5fc433; }
