/* Library quizzes (quizzes.html). Builds on css/play.css. */
.qz-progress { height: 8px; border-radius: 999px; background: #dcdce6; margin: 4px 0 14px; overflow: hidden; }
.qz-progress span { display: block; height: 100%; width: 0; background: var(--navy); border-radius: 999px; transition: width 0.35s ease; }

.qz-q { display: grid; gap: 14px; }
.qz-count { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-align: center; }
.qz-lead { margin: 0; font-size: 15px; color: var(--muted); text-align: center; }
.qz-prompt { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(22px, 6.4vw, 30px); line-height: 1.25; color: var(--navy); text-align: center; }
.qz-prompt.is-big { font-family: Geist, Inter, system-ui, sans-serif; font-weight: 800; font-size: clamp(34px, 11vw, 56px); letter-spacing: 0.01em; }
.qz-prompt.is-long { font-family: Geist, Inter, system-ui, sans-serif; font-weight: 700; font-size: clamp(20px, 5.6vw, 25px); line-height: 1.35; }
.qz-read-word { font-family: Geist, Inter, system-ui, sans-serif; font-size: clamp(56px, 18vw, 96px) !important; letter-spacing: 0.04em; }
.qz-unit, .qz-how { margin: 0; text-align: center; color: var(--muted); font-size: 15px; }
.qz-how { text-align: left; font-size: 16px; color: var(--ink); margin-bottom: 8px; padding-left: 22px; position: relative; }
.qz-how::before { content: '•'; position: absolute; left: 6px; color: var(--navy); font-weight: 800; }

/* Rating scale */
.qz-scale { display: grid; gap: 10px; }
.qz-opt { display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 12px; text-align: left; min-height: 56px; padding: 10px 16px; border-radius: 16px; border: var(--edge); background: #fff; box-shadow: var(--lift); font-size: 17px; font-weight: 600; color: var(--navy); cursor: pointer; transition: background-color 0.15s, transform 0.08s, box-shadow 0.08s; }
.qz-opt:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--navy); }
.qz-opt.is-on { background: var(--yellow); }
.qz-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--navy); background: #fff; }
.qz-opt.is-on .qz-dot { background: var(--navy); box-shadow: inset 0 0 0 4px var(--yellow); }

/* Number pad with a decimal point and a minus key */
.px-pad.is-wide { grid-template-columns: repeat(3, 1fr); }
.px-key[disabled] { opacity: 0.55; }

/* Picture puzzles */
.qz-visual { display: flex; justify-content: center; }
.qz-matrix { display: grid; gap: 6px; padding: 10px; background: #fff; border: var(--edge); border-radius: 18px; }
.qz-cell { width: 76px; height: 76px; display: grid; place-items: center; background: var(--paper); border-radius: 12px; }
.qz-cell.is-gap { border: 2px dashed var(--navy); font-family: var(--display); font-weight: 700; font-size: 30px; color: var(--navy); background: var(--yellow); }
.qz-fig { display: block; margin: 0 auto; }
.qz-show { text-align: center; font-size: clamp(26px, 8vw, 40px); font-weight: 700; color: var(--navy); background: #fff; border: var(--edge); border-radius: 18px; padding: 12px; letter-spacing: 0.04em; }

/* Times tables timer */
.qz-timebar { height: 10px; border-radius: 999px; background: #e6e6ee; overflow: hidden; }
.qz-timebar span { display: block; height: 100%; width: 100%; background: var(--mint); border-radius: 999px; }

/* Reading speed */
.qz-readbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--paper); padding: 6px 0; }
.qz-clock { font-family: var(--display); font-weight: 700; font-size: 34px; color: var(--navy); }
.qz-readbar .qz-lead { text-align: right; }
.qz-passage { background: #fff; border: var(--edge); border-radius: 20px; padding: 16px 18px; font-size: 21px; line-height: 1.75; }
.qz-passage h2 { font-family: var(--display); font-size: 22px; color: var(--navy); margin: 0 0 8px; }
.qz-w { font: inherit; color: var(--ink); background: none; border: 0; padding: 0 1px; border-radius: 6px; cursor: pointer; }
.qz-w.is-err { background: #ffd2cf; text-decoration: line-through; text-decoration-color: #b42318; }
.qz-w.is-last { background: var(--yellow); outline: 2px solid var(--navy); }
.qz-list { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 17px; line-height: 1.5; text-align: left; }

/* Results */
.qz-result { display: grid; gap: 14px; text-align: left; }
.qz-result .px-title, .qz-result .px-score { text-align: center; margin: 0; }
.qz-kicker { margin: 0; text-align: center; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-wrap: balance; }
.qz-summary { margin: 0; font-size: 17px; line-height: 1.6; }
.qz-trait { display: grid; gap: 6px; padding: 12px 14px; border: 2px solid #e4e4ee; border-radius: 16px; }
.qz-trait-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; color: var(--navy); }
.qz-band { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--paper); color: var(--navy); white-space: nowrap; }
.qz-track { position: relative; height: 12px; border-radius: 999px; background: #e6e6ee; }
.qz-track .qz-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--navy); border-radius: 999px; }
.qz-track.is-marker { background: linear-gradient(90deg, #e9d9ff, #bfffe6); }
.qz-track.is-marker .qz-fill { width: 20px !important; height: 20px; top: -4px; margin-left: -10px; background: var(--navy); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--navy); }
.qz-ends { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.qz-ends span:last-child { text-align: right; }
.qz-trait-text { margin: 2px 0 0; font-size: 15.5px; line-height: 1.55; }
.qz-section h3, .qz-h { margin: 6px 0 6px; font: 700 14px Geist, Inter, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); }
.qz-section { font-size: 16px; line-height: 1.6; }
.qz-section ul { margin: 0; padding-left: 20px; }
.qz-review { border-top: 1.5px dashed #c9c9d8; padding-top: 10px; }
.qz-review summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.qz-review ol { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 10px; }
.qz-review li { font-size: 15px; line-height: 1.5; }
.qz-review li.is-ok::marker { color: #1f9d55; }
.qz-review li.is-no::marker { color: #b42318; }
.qz-review-q { display: block; font-weight: 600; }
.qz-review-show { font-weight: 700; color: var(--navy); }
.qz-review-a, .qz-review-why { display: block; color: var(--muted); }
.qz-practice { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qz-game { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border: var(--edge); border-radius: 16px; background: #fff; box-shadow: var(--lift); color: var(--navy); text-decoration: none; }
.qz-game strong { display: block; font-size: 15px; line-height: 1.25; }
.qz-game small { font-size: 12.5px; color: var(--muted); }
.qz-game-icon { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--navy); display: grid; place-items: center; color: var(--navy); }
.qz-past { margin: 0; font-size: 14px; color: var(--muted); background: var(--paper); border-radius: 12px; padding: 8px 12px; }
.qz-note { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); background: #f4edff; border-radius: 14px; padding: 10px 14px; text-align: left; }
.px-intro .qz-note, .px-intro .qz-past { margin-top: 12px; }

@media (max-width: 400px) {
  .qz-cell { width: 64px; height: 64px; }
  .qz-practice { grid-template-columns: 1fr; }
}
@media print {
  .px-top, .qz-progress, .px-actions, .px-links, .px-toast { display: none !important; }
  .qz-review { display: block; }
  .qz-review ol { display: block; }
  .px-card { box-shadow: none; border-width: 1.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .qz-progress span { transition-duration: 0.35s !important; }
}

/* The 2.5-second rule: a note inside the question card, under the answers (never on top of them) */
.qz-rush { margin: 14px 0 0; padding: 12px 16px; border: 2px solid var(--navy); border-radius: 16px; background: #fff; color: var(--navy); box-shadow: 4px 4px 0 var(--yellow); font: 500 16px/1.5 Geist, Inter, sans-serif; text-align: left; animation: qz-rush-in .3s ease both; }
.qz-rush strong { display: block; margin-bottom: 2px; }
.qz-rush.is-again { animation: qz-rush-again .5s ease; }
@keyframes qz-rush-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes qz-rush-again { 30% { box-shadow: 4px 4px 0 var(--yellow), 0 0 0 5px rgba(254, 219, 113, .5); } }
/* Right or wrong: a line inside the card, under the answer */
.qz-fb { margin: 12px 0 0; padding: 8px 14px; border-radius: 12px; font: 700 16px/1.4 Geist, Inter, sans-serif; text-align: center; }
.qz-fb.is-ok { background: #dff5ea; color: #14532d; }
.qz-fb.is-no { background: #fde8e8; color: #7f1d1d; }
/* Intro: what you get */
.qz-get { margin: 0 0 12px; font-size: 16px; line-height: 1.5; text-align: left; background: #fff8dc; border-radius: 12px; padding: 8px 12px; }
/* Result: this week, games, next step */
.qz-step { margin: 4px 0 0; padding: 14px 16px; border: 2px solid var(--navy); border-radius: 18px; background: #fff; box-shadow: 4px 4px 0 var(--track); text-align: left; }
.qz-step-kicker { margin: 0 0 4px; font: 700 13px Geist, Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.qz-step-focus { margin: 0; font-size: 17px; line-height: 1.5; color: var(--ink); }
.qz-step-say { margin: 10px 0 0; font-size: 17px; line-height: 1.5; font-style: italic; color: var(--navy); }
.qz-step-say span { font-style: normal; font-weight: 700; }
.qz-step-book { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.qz-play { display: grid; gap: 6px; }
.qz-practice li.is-first .qz-game { border-width: 3px; }
.qz-tag { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: #dff5ea; color: #14532d; font-size: 12.5px; font-weight: 700; width: fit-content; }
.qz-tag.is-locked { background: #ecebf5; color: var(--muted); }
.qz-game > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.qz-bridge { padding: 16px; border-radius: 18px; background: #f4edff; text-align: left; display: grid; gap: 8px; }
.qz-bridge h3 { margin: 0; font: 700 20px/1.3 Geist, Inter, sans-serif; color: var(--navy); }
.qz-bridge p { margin: 0; font-size: 16px; line-height: 1.5; }
.qz-bridge .qz-step-kicker { margin: 0; }
.qz-bridge .px-btn { justify-self: start; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; height: auto; min-height: 48px; padding: 10px 20px; white-space: normal; text-align: center; }
/* Parenting style: the four areas, with the one to start with marked */
.qz-areas { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.qz-areas li { padding: 8px 12px; border-radius: 12px; background: #f4f4f8; font-size: 15.5px; line-height: 1.45; }
.qz-areas li.is-start { background: #fff3c4; box-shadow: inset 0 0 0 2px var(--navy); }

/* Real or fake?: a made-up phone screen (a news site, a post, a message or a picture) */
.qz-mock { display: grid; gap: 6px; padding: 12px 14px; border-radius: 16px; background: #fff; border: 2px solid #d9dbe8; box-shadow: 0 2px 0 #d9dbe8; text-align: left; overflow-wrap: anywhere; }
.qz-mock p { margin: 0; }
.qz-mock-src { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--muted); }
.qz-mock-src strong { color: var(--ink); }
.qz-mock-face { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font: 700 14px/1 Geist, Inter, sans-serif; }
.qz-mock-tag { padding: 1px 6px; border-radius: 6px; background: #f1f1f4; font-size: 12px; color: #5f6070; }
.qz-mock-head { font: 800 19px/1.3 Geist, Inter, sans-serif; color: var(--ink); }
.qz-mock-text { font-size: 17px; line-height: 1.45; color: var(--ink); }
.qz-mock-bubble { justify-self: start; max-width: 92%; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #eef0f5; font-size: 16px; line-height: 1.45; color: var(--ink); }
.qz-mock-pic { display: grid; place-items: center; min-height: 110px; border-radius: 12px; background: linear-gradient(#cfe8ff, #9fd0f5); font-size: 46px; letter-spacing: 6px; }
.qz-mock-foot { font-size: 13px; color: var(--muted); }

/* Family fit: tips for a parent's and a child's mix of temperaments */
.qz-fit { display: grid; gap: 8px; padding: 14px 16px; border-radius: 18px; background: #fff4e8; border: 2px solid #ffd2a8; text-align: left; }
.qz-fit .qz-h { margin: 0; }
.qz-fit p { margin: 0; font-size: 16px; line-height: 1.5; }
.qz-fit .qz-areas li { background: #fff; }
.qz-fit .qz-fit-go { justify-self: start; height: auto; min-height: 48px; white-space: normal; }
@media print { .qz-fit .qz-fit-go { display: none !important; } }

/* Stopped partway last time: carry on */
.qz-resume { display: grid; gap: 8px; padding: 14px 16px; border-radius: 18px; background: #e8f4ff; border: 2px solid #9cc9f5; text-align: left; }
.qz-resume p { margin: 0; }
.qz-resume .qz-resume-head { font: 700 17px/1.4 Geist, Inter, sans-serif; color: var(--navy); }
.qz-resume .qz-resume-go { justify-self: start; height: auto; min-height: 48px; white-space: normal; }
.qz-resume .qz-resume-note { font-size: 14px; line-height: 1.45; color: var(--muted); }

/* "Same page?": send the quiz to someone you parent with, or see where you agree */
.qz-same { display: grid; gap: 8px; padding: 14px 16px; border-radius: 18px; background: #eafbf3; border: 2px solid #a8e6c9; text-align: left; }
.qz-same .qz-h { margin: 0; }
.qz-same p { margin: 0; font-size: 16px; line-height: 1.5; }
.qz-same h4 { margin: 6px 0 0; font: 700 16px/1.3 Geist, Inter, sans-serif; color: var(--navy); }
.qz-same-body { display: grid; gap: 8px; }
.qz-same .qz-same-head { font-weight: 700; color: var(--navy); }
.qz-same .qz-same-tip, .qz-same .qz-same-privacy { font-size: 14px; color: var(--muted); }
.qz-same .qz-areas li { background: #fff; }
.qz-same .qz-same-share { justify-self: start; height: auto; min-height: 48px; white-space: normal; }
.qz-same .qz-same-link[hidden] { display: none; }
.qz-same .qz-same-status { font-weight: 700; color: #14532d; }
.qz-same .qz-same-status:empty { display: none; }
@media print { .qz-same:not(.is-compare), .qz-same .qz-same-share, .qz-same .qz-same-link, .qz-same .qz-same-status { display: none !important; } }

/* Locked quiz: a sample result for a made-up family (grey label, dashed edge: clearly not the visitor's own) */
.qz-sample { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 4px 0 12px; padding: 14px 16px; border: 2px dashed #b9b8cc; border-radius: 18px; background: #fafaf7; text-align: left; }
.qz-sample-label { margin: 0; justify-self: start; padding: 3px 10px; border-radius: 10px; background: #ecebf5; color: var(--muted); font: 700 12.5px/1.35 Geist, Inter, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.qz-sample-title { margin: 0; font: 700 19px/1.3 Geist, Inter, sans-serif; color: var(--navy); }
.qz-sample-text { margin: 0; font-size: 16px; line-height: 1.5; }
.qz-sample .qz-trait { gap: 4px; }
.px-lock .px-price { text-align: center; }
.qz-tryfree { margin: 14px 0 0; font-size: 16px; text-align: center; }
.qz-tryfree a { font-weight: 700; color: var(--navy); }
/* Result sections: numbered steps, short paragraphs, and the phone agreement (printable) */
.qz-section ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.qz-section p { margin: 0 0 8px; }
.qz-section p:last-child { margin-bottom: 0; }
.qz-agree li { line-height: 1.7; }
.qz-section .qz-sign { margin-top: 12px; font-weight: 600; }
@media print { .qz-agree li { break-inside: avoid; } }
/* Result: make it a plan ("When …, I’ll …"), kept on this device */
.qz-plan { display: grid; gap: 8px; padding: 14px 16px; border-radius: 18px; background: #fff8dc; text-align: left; }
.qz-plan .qz-step-kicker { margin: 0; }
.qz-plan-lead { margin: 0; font-size: 16px; line-height: 1.5; }
.qz-plan-list { display: grid; gap: 8px; }
.qz-plan-opt { position: relative; display: block; width: 100%; min-height: 48px; padding: 10px 14px 10px 44px; border: var(--edge); border-radius: 14px; background: #fff; color: var(--ink); font: 500 16px/1.45 Geist, Inter, sans-serif; text-align: left; cursor: pointer; }
.qz-plan-opt::before { content: ''; position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; box-sizing: border-box; border: 2px solid var(--navy); border-radius: 50%; background: #fff; }
.qz-plan-opt[aria-pressed="true"] { box-shadow: 3px 3px 0 var(--navy); font-weight: 700; }
.qz-plan-opt[aria-pressed="true"]::before { background: var(--navy); box-shadow: inset 0 0 0 3px #fff; }
.qz-plan-more { justify-self: start; padding: 4px 0; border: 0; background: none; color: var(--navy); font: 700 15px Geist, Inter, sans-serif; text-decoration: underline; cursor: pointer; }
.qz-plan-own { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; }
.qz-plan-own[hidden], .qz-plan-more[hidden] { display: none; }
.qz-plan-own .px-input { margin: 0; }
.qz-plan-own .px-btn { height: auto; min-height: 50px; padding: 10px 18px; white-space: normal; box-shadow: none; }
.qz-plan-saved { margin: 0; font-size: 14px; color: var(--muted); }
.qz-plan-saved:empty { display: none; }
/* Result: email it to yourself */
.qz-email { display: grid; gap: 8px; padding: 14px 16px; border: var(--edge); border-radius: 18px; background: #fff; text-align: left; }
.qz-email .qz-h { margin: 0; }
.qz-email p { margin: 0; font-size: 16px; line-height: 1.5; }
.qz-email-form { display: grid; gap: 8px; }
.qz-email-form .px-label { margin: 4px 0 0; }
.qz-email-form .px-input { margin: 0; }
.qz-email-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.qz-email-buttons .px-btn { height: auto; min-height: 48px; padding: 10px 18px; white-space: normal; text-align: center; }
.qz-email-buttons .px-btn:disabled { opacity: .6; cursor: default; }
.qz-email .qz-email-status:empty { display: none; }
.qz-email .qz-email-status.is-ok { color: #14532d; font-weight: 700; }
.qz-email .qz-email-status.is-no { color: #7f1d1d; font-weight: 700; }
.qz-email .qz-email-privacy { font-size: 14px; color: var(--muted); }
.qz-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 400px) { .qz-plan-own { grid-template-columns: 1fr; } }
@media print {
  .qz-email, .qz-plan-more, .qz-plan-own, .qz-plan-saved, .qz-plan-lead, .qz-plan:not(.has-choice) { display: none !important; }
  .qz-plan .qz-plan-opt[aria-pressed="false"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  @keyframes qz-rush-in { from { opacity: 0; } }
}
