/* Education page: sample test, bookshelf features, chalkboard steps and page skin. Prefix ed-. */
:root { --ed-navy: #1b2a4a; --ed-ink: #14203a; --ed-yellow: #ffc83d; --ed-red: #e4572e; --ed-green: #2a9d6f; --ed-paper: #fffdf6; --ed-rule: #d9e6f5; --ed-muted: #56607a; --ed-line: rgba(20, 32, 58, .12); }

/* ---- Sample test ---- */
.ed-quiz { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px; align-items: center; margin-top: 28px; }
.ed-paper { position: relative; padding: 26px 28px 28px 64px; border-radius: 6px 18px 18px 6px; background: repeating-linear-gradient(var(--ed-paper) 0 31px, var(--ed-rule) 31px 32px); box-shadow: 0 30px 50px -30px rgba(20, 32, 58, .55), 0 0 0 1px var(--ed-line); transform: rotate(-.6deg); }
.ed-paper::before { content: ""; position: absolute; left: 44px; top: 0; bottom: 0; width: 2px; background: #f3a6a6; }
.ed-paper::after { content: ""; position: absolute; left: 14px; top: 30px; bottom: 30px; width: 14px; background: radial-gradient(circle at 7px 7px, #e9edf4 5px, transparent 6px) 0 0 / 14px 56px repeat-y; }
.ed-paper-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 700; font-size: 15px; color: var(--ed-navy); }
.ed-timer { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--ed-navy); color: #fff; font-size: 13px; }
.ed-timer i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ed-yellow); }
.ed-timer b { font-variant-numeric: tabular-nums; }
.ed-progress { height: 6px; margin: 14px 0 18px; border-radius: 3px; background: #e6ecf5; overflow: hidden; }
.ed-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ed-yellow), var(--ed-red)); transition: width .4s; }
.ed-q { margin: 0; padding: 0; border: 0; min-width: 0; }
.ed-q legend { display: block; padding: 0; font-size: 20px; font-weight: 700; line-height: 1.35; color: var(--ed-ink); }
.ed-q legend small { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ed-red); }
.ed-opts { display: grid; gap: 10px; margin-top: 16px; }
.ed-opts button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 15px; text-align: left; color: var(--ed-ink); background: #fff; border: 1.5px solid var(--ed-line); border-radius: 12px; cursor: pointer; transition: border-color .2s, background .2s, transform .15s; }
.ed-opts button:hover:not(:disabled) { border-color: var(--ed-navy); transform: translateX(3px); }
.ed-opts i { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--ed-line); font-style: normal; font-weight: 700; font-size: 13px; }
.ed-opts button.right { border-color: var(--ed-green); background: #e8f7f0; }
.ed-opts button.right i { background: var(--ed-green); border-color: var(--ed-green); color: #fff; }
.ed-opts button.wrong { border-color: var(--ed-red); background: #fdeee9; }
.ed-opts button.wrong i { background: var(--ed-red); border-color: var(--ed-red); color: #fff; }
.ed-opts button:disabled { cursor: default; }
.ed-explain { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--ed-yellow); background: #fff8e1; font-size: 14px; color: var(--ed-muted); }
.ed-btn { display: inline-flex; align-items: center; min-height: 46px; margin-top: 18px; padding: 0 22px; font: inherit; font-weight: 700; font-size: 15px; color: #fff; background: var(--ed-navy); border: 0; border-radius: 999px; cursor: pointer; transition: background .2s; }
.ed-btn:hover { background: var(--ed-red); }
.ed-result { text-align: center; padding: 10px 0; animation: ed-pop .5s cubic-bezier(.3, 1.5, .5, 1); }
.ed-score { display: inline-flex; align-items: baseline; gap: 6px; padding: 18px 30px; border: 4px solid var(--ed-red); border-radius: 50%; color: var(--ed-red); transform: rotate(-8deg); font-family: Georgia, serif; }
.ed-score b { font-size: 54px; line-height: 1; }
.ed-score span { font-size: 22px; }
.ed-result p { max-width: 42ch; margin: 18px auto 0; font-size: 15px; color: var(--ed-muted); }
@keyframes ed-pop { from { opacity: 0; transform: scale(.85); } }
.ed-quiz-side { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ed-quiz-side li { position: relative; padding: 16px 18px 16px 56px; border-radius: 14px; background: #fff; border: 1px solid var(--ed-line); box-shadow: 0 14px 28px -24px rgba(20, 32, 58, .5); }
.ed-quiz-side li::before { content: ""; position: absolute; left: 16px; top: 16px; width: 26px; height: 26px; border-radius: 8px; background: var(--ed-yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%231b2a4a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.ed-quiz-side b { display: block; font-size: 16px; color: var(--ed-ink); }
.ed-quiz-side span { display: block; margin-top: 3px; font-size: 14px; color: var(--ed-muted); }

/* ---- Bookshelf ---- */
.ed-shelf-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: end; margin-top: 28px; }
.ed-shelf { position: relative; padding: 0 18px; }
.ed-books { display: flex; align-items: flex-end; justify-content: center; gap: 6px; min-height: 290px; perspective: 900px; }
.ed-book { --c: #2f5aa8; position: relative; flex: 0 1 62px; height: 230px; padding: 0; border: 0; border-radius: 4px 4px 2px 2px; cursor: pointer; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000) 0 6px, var(--c) 6px calc(100% - 6px), color-mix(in srgb, var(--c) 70%, #000) calc(100% - 6px)); box-shadow: inset 0 18px 0 -12px rgba(255, 255, 255, .25), inset 0 -18px 0 -12px rgba(0, 0, 0, .2), 0 10px 14px -10px rgba(0, 0, 0, .5); transform-origin: 50% 100%; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s; }
.ed-book span { position: absolute; left: 50%; top: 50%; width: 180px; transform: translate(-50%, -50%) rotate(-90deg); font-weight: 700; font-size: 14px; color: #fff; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-book::after { content: ""; position: absolute; left: 10px; right: 10px; top: 22px; height: 3px; background: rgba(255, 255, 255, .5); box-shadow: 0 6px 0 rgba(255, 255, 255, .5); }
.ed-book:hover { transform: translateY(-8px); }
.ed-book[aria-pressed="true"] { transform: translateY(-34px) rotate(-4deg); box-shadow: 0 26px 30px -16px rgba(0, 0, 0, .5), 0 0 0 3px var(--ed-yellow); }
.ed-book:focus-visible { outline: 3px solid var(--ed-yellow); outline-offset: 3px; }
.c1 { --c: #e4572e; } .c2 { --c: #2a9d6f; } .c3 { --c: #7b4fb8; } .c4 { --c: #d99a1c; } .c5 { --c: #1b2a4a; }
.ed-plank { display: block; height: 18px; margin: 0 -18px; border-radius: 4px; background: linear-gradient(#a8743f, #7d5228); box-shadow: 0 16px 20px -14px rgba(0, 0, 0, .6); }
.ed-page { --c: #2f5aa8; position: relative; padding: 26px 26px 28px; border-radius: 4px 16px 16px 4px; background: var(--ed-paper); border-left: 10px solid var(--c); box-shadow: 0 26px 44px -30px rgba(20, 32, 58, .6), 0 0 0 1px var(--ed-line); animation: ed-open .5s cubic-bezier(.3, 1.2, .5, 1); transform-origin: 0 50%; }
.ed-page small { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.ed-page h3 { margin: 8px 0 10px; font-size: 24px; color: var(--ed-ink); }
.ed-page p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ed-muted); }
@keyframes ed-open { from { opacity: 0; transform: perspective(900px) rotateY(-35deg); } }

/* ---- Chalkboard steps ---- */
.ed-board { position: relative; margin-top: 30px; padding: 34px 34px 46px; border-radius: 10px; background: radial-gradient(120% 90% at 30% 20%, #2f4a3f, #1e3129); border: 14px solid #8b5a2b; box-shadow: inset 0 0 40px rgba(0, 0, 0, .45), 0 30px 50px -30px rgba(0, 0, 0, .6); color: #f3f1e8; font-family: "Segoe Print", "Comic Sans MS", cursive, var(--sv-font); }
.ed-board-title { display: block; margin-bottom: 22px; font-size: 22px; color: var(--ed-yellow); text-decoration: underline wavy rgba(255, 200, 61, .5); text-underline-offset: 6px; }
.ed-board-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 40px; }
.ed-board-list li { display: flex; gap: 16px; align-items: flex-start; opacity: 0; clip-path: inset(0 100% 0 0); transition: opacity .2s, clip-path 1s ease; transition-delay: calc(.2s + var(--i) * .6s); }
.ed-board.in .ed-board-list li { opacity: 1; clip-path: inset(0 0 0 0); }
.ed-chalk-num { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 2.5px solid #f3f1e8; border-radius: 50%; font-size: 20px; }
.ed-board-list h3 { margin: 4px 0 6px; font-size: 20px; font-weight: 700; color: #fff; font-family: inherit; }
.ed-board-list p { margin: 0; font-size: 15px; line-height: 1.55; color: #d7e0d9; font-family: var(--sv-font); }
.ed-tray { position: absolute; left: 30px; right: 30px; bottom: -14px; height: 10px; border-radius: 3px; background: #6f461f; }
.ed-tray i { position: absolute; top: -7px; width: 34px; height: 8px; border-radius: 4px; background: #fff; }
.ed-tray i:first-child { left: 18%; } .ed-tray i:last-child { left: 24%; width: 26px; background: var(--ed-yellow); }

/* ---- Page skin: shared sections on this page take the navy and yellow school look. ---- */
body:has(.ed-quiz-sec) main .sv-phero.style-light { background: radial-gradient(800px 380px at 88% 10%, #fff1c4 0%, transparent 60%), repeating-linear-gradient(#fffdf6 0 35px, #e8eff9 35px 36px); }
body:has(.ed-quiz-sec) main .sv-phero h1, body:has(.ed-quiz-sec) main .sv-title { color: var(--ed-ink); }
body:has(.ed-quiz-sec) main .sv-phero-stats li { background: #fff; border-color: #f1d99a !important; }
body:has(.ed-quiz-sec) main .sv-phero-stats li strong { color: var(--ed-red) !important; }
body:has(.ed-quiz-sec) main .sv-phero :is(svg, .sv-art) { filter: hue-rotate(160deg) saturate(.9); }
body:has(.ed-quiz-sec) main :is(.sv-btn, a.btn-dark) { background: var(--ed-navy) !important; border-color: var(--ed-navy) !important; }
body:has(.ed-quiz-sec) main .sv-intro { background: #fff6dc !important; color: var(--ed-ink) !important; border-color: #f4e2ac !important; }
body:has(.ed-quiz-sec) main .sv-icard2 { border-color: #e7e2d2 !important; }
body:has(.ed-quiz-sec) main .sv-icard2 img { filter: hue-rotate(160deg) saturate(.85); }
body:has(.ed-quiz-sec) main .sv-contact-big { color: var(--ed-red) !important; }

@media (max-width: 900px) {
    .ed-quiz, .ed-shelf-wrap { grid-template-columns: minmax(0, 1fr); gap: 26px; }
    .ed-board-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .ed-paper { padding: 22px 18px 22px 48px; transform: none; }
    .ed-paper::before { left: 34px; }
    .ed-paper::after { left: 8px; }
    .ed-q legend { font-size: 18px; }
    .ed-books { min-height: 230px; gap: 4px; }
    .ed-book { flex-basis: 44px; height: 180px; }
    .ed-book:nth-child(3n+2) { height: 200px; } .ed-book:nth-child(3n) { height: 166px; }
    .ed-book span { width: 150px; font-size: 12.5px; }
    .ed-board { padding: 24px 18px 36px; border-width: 10px; }
    .ed-board-title { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .ed-board-list li { transition: none; clip-path: none; opacity: 1; }
    .ed-book, .ed-page, .ed-result { transition: none; animation: none; }
}
.ed-book:nth-child(3n+2) { height: 256px; }
.ed-book:nth-child(3n) { height: 214px; }
@media (max-width: 560px) { .ed-book { height: 180px; } .ed-book:nth-child(3n+2) { height: 200px; } .ed-book:nth-child(3n) { height: 166px; } }
.ed-quiz [hidden], .ed-shelf-wrap [hidden] { display: none !important; }
