/* Elementary theme (Grades 4–5 pages built on worksheet-generator/elementary): bright but coordinated colors, large readable text, touch-friendly controls.
   Scoped to elementary pages only (body.el). Whole-interface zoom uses --el-zoom. */
:root { --el-zoom: 1; --ink: #1d2a3a; --muted: #55657a; --bg: #f4f8ff; --card: #ffffff; --line: #d6e1f0;
  --blue: #2f7fd8; --orange: #f08c1a; --green: #1aa37a; --pink: #d63c7a; --purple: #8a4fd6; --teal: #0f97b5; --yellow: #ffd34d;
  --good: #16865c; --good-bg: #e3f7ee; --try: #b4590b; --try-bg: #fff3e2; --focus: #ffb000; color-scheme: light; }
html { font-size: calc(18px * var(--el-zoom)); }
body.el { margin: 0; font-family: "Nunito", "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg);
  background-image: radial-gradient(circle at 8% 12%, #e1edff 0 70px, transparent 71px), radial-gradient(circle at 92% 88%, #ffeedd 0 90px, transparent 91px); min-height: 100vh; line-height: 1.5; }
.el *, .el *::before, .el *::after { box-sizing: border-box; }
.el :focus-visible { outline: 4px solid var(--focus); outline-offset: 2px; }
.el-top { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .6rem 1rem; background: linear-gradient(90deg, #2f7fd8, #8a4fd6); color: #fff; box-shadow: 0 2px 8px rgba(30, 50, 90, .18); }
.el-home { color: #fff; font-weight: 800; text-decoration: none; background: rgba(255, 255, 255, .18); padding: .35rem .7rem; border-radius: 999px; font-size: .85rem; }
.el-title { display: flex; flex-direction: column; flex: 1; min-width: 12rem; }
.el-title strong { font-size: 1.15rem; } .el-title span { font-size: .8rem; opacity: .92; }
.el-zoom { display: flex; gap: .3rem; }
.el-top .el-btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .12); }
main.el-main { max-width: 62rem; margin: 0 auto; padding: 1rem; }
.el-panel { background: var(--card); border-radius: 1.2rem; padding: 1.2rem 1.4rem; box-shadow: 0 4px 18px rgba(30, 60, 120, .10); border: 2px solid var(--line); margin: 1rem 0; }
.el-panel h2 { margin: 0 0 .5rem; font-size: 1.4rem; color: #22408a; }
.el-intro { color: var(--muted); margin-top: 0; }
.el-btn { font: inherit; font-weight: 800; border: 2px solid var(--blue); background: #fff; color: var(--blue); border-radius: .9rem; padding: .55rem 1.1rem; cursor: pointer; min-height: 2.6rem; touch-action: manipulation; }
.el-btn.primary { background: var(--blue); color: #fff; } .el-btn.primary:hover { background: #2367b3; }
.el-btn.big { font-size: 1.2rem; padding: .75rem 1.6rem; margin-top: 1rem; }
.el-btn.sm { min-height: 2.1rem; padding: .25rem .6rem; font-size: .85rem; }
.el-btn.ghost { background: transparent; }
.el-btn:disabled { opacity: .5; cursor: default; }
.el-pills { border: 0; padding: 0; margin: .8rem 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.el-pills legend { font-weight: 800; margin-bottom: .4rem; width: 100%; }
.el-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.el-pill span { display: inline-block; padding: .45rem 1rem; border-radius: 999px; border: 2px solid var(--line); background: #f7faff; font-weight: 700; cursor: pointer; }
.el-pill input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.el-pill input:focus-visible + span { outline: 4px solid var(--focus); }
/* question card */
.el-q { background: #fff; border-radius: 1.2rem; padding: 1.1rem 1.3rem; border: 3px solid #cfe0fb; box-shadow: 0 6px 20px rgba(30, 60, 120, .12); }
.el-q-label { display: inline-block; background: #eef4ff; color: #2b4f8c; font-weight: 800; border-radius: 999px; padding: .15rem .7rem; font-size: .8rem; margin-bottom: .4rem; }
.el-prompt { font-size: 1.2rem; font-weight: 700; white-space: pre-line; }
.el-fig { display: block; max-width: 100%; max-height: 22rem; margin: .7rem auto; border-radius: .6rem; background: #fff; }
.el-choices { display: grid; gap: .55rem; margin-top: .8rem; } .el-choices.grid { grid-template-columns: 1fr 1fr; }
.el-choice { display: flex; align-items: center; gap: .7rem; text-align: left; font: inherit; font-size: 1.05rem; padding: .6rem .8rem; border: 2px solid var(--line); border-radius: .9rem; background: #fbfdff; cursor: pointer; min-height: 3rem; color: var(--ink); }
.el-choice:hover:not(:disabled) { border-color: var(--blue); background: #f1f7ff; }
.el-choice.on { border-color: var(--purple); background: #f3edff; }
.el-choice.right { border-color: var(--good); background: var(--good-bg); } .el-choice.wrong { border-color: #e2563b; background: #fdecea; }
.el-ct { min-width: 0; overflow-wrap: anywhere; }
.el-letter { flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: #e6efff; color: #2b4f8c; font-weight: 900; }
.el-typed { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
.el-input { font: inherit; font-size: 1.15rem; padding: .5rem .8rem; border: 2px solid var(--line); border-radius: .8rem; min-width: 10rem; flex: 1; }
.el-input.right { border-color: var(--good); background: var(--good-bg); } .el-input.wrong { border-color: #e2563b; background: #fdecea; }
.el-part { display: grid; grid-template-columns: 2rem 1fr minmax(8rem, 12rem); gap: .5rem; align-items: center; margin: .45rem 0; }
.el-hint-text { color: var(--muted); font-size: .8rem; margin: .4rem 0 0; }
.el-feedback { margin-top: .8rem; font-weight: 800; font-size: 1.1rem; border-radius: .8rem; padding: 0; }
.el-feedback.good { color: var(--good); background: var(--good-bg); padding: .5rem .8rem; } .el-feedback.try { color: var(--try); background: var(--try-bg); padding: .5rem .8rem; }
.el-key { margin-top: .3rem; font-weight: 700; color: var(--ink); }
.el-hint { margin-top: .6rem; background: #fff8dc; border-left: 6px solid var(--yellow); padding: .5rem .8rem; border-radius: .5rem; }
.el-steps { margin-top: .6rem; } .el-steps summary { cursor: pointer; font-weight: 800; color: var(--blue); } .el-steps li { margin: .2rem 0; }
.el-q-tools { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
/* game boards */
.el-board { position: relative; }
.el-hud { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin: .5rem 0; }
.el-chip { background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: .25rem .8rem; font-weight: 800; }
.el-team { font-weight: 900; padding: .25rem .9rem; border-radius: 999px; color: #fff; }
.el-turn { outline: 4px solid var(--focus); }
.el-svg { width: 100%; height: auto; display: block; border-radius: 1rem; }
/* Keep the game scene short enough that the question below it is on screen without scrolling (laptops, smartboards). */
.el-board .el-svg { max-height: 36vh; margin: 0 auto; }
.el-grid-btns { display: grid; gap: .5rem; }
.el-celebrate { text-align: center; } .el-celebrate .big { font-size: 3rem; }
.el-summary table { width: 100%; border-collapse: collapse; } .el-summary td, .el-summary th { border-bottom: 1px solid var(--line); padding: .35rem; text-align: left; }
body.el-present main.el-main { max-width: 90rem; } body.el-present { --el-zoom: 1.35; }
@media (max-width: 640px) { .el-choices.grid { grid-template-columns: 1fr; } .el-part { grid-template-columns: 2rem 1fr; } .el-part .el-input { grid-column: 2; } .el-prompt { font-size: 1.05rem; } }
@media (prefers-reduced-motion: reduce) { .el * { transition: none !important; animation: none !important; } }
@media print { .el-top, .el-q-tools, .el-btn { display: none !important; } body.el { background: #fff; } .el-panel, .el-q { box-shadow: none; } }

/* ---- student link ---- */
.el-share{margin-top:.9rem}
.el-share-out{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-top:.5rem}
.el-share-url{flex:1;min-width:14rem;font-size:.9rem}
.el-share-out .el-hint-text{flex-basis:100%;margin:0}

/* ---- printable results page (Understanding Check) ---- */
.el-results{background:#fff;color:#111;max-width:60rem;margin:1.5rem auto;padding:1.5rem;border:2px solid #22408a;border-radius:1rem;font-size:1rem}
.el-results h1{margin:0 0 .6rem;font-size:1.5rem;color:#22408a}
.el-results table{border-collapse:collapse;width:100%;margin:.6rem 0}
.el-results th,.el-results td{border:1px solid #9aa7b8;padding:.35rem .5rem;text-align:left;vertical-align:top}
.el-results-meta th{width:7rem;background:#eef4ff}
.el-results-table th{background:#eef4ff}
.el-results-table img{max-width:16rem;max-height:9rem;display:block;margin-top:.3rem}
.el-results .ok{color:#15803d;font-weight:800;white-space:nowrap}.el-results .no{color:#b4590b;font-weight:800;white-space:nowrap}
.el-results-name{font:inherit;border:0;border-bottom:2px solid #22408a;width:100%;max-width:24rem;padding:.15rem .2rem;background:#fffbe6}
.el-results-note{font-size:.8rem;color:#55657a}
.el-results-bar{display:flex;gap:.6rem;justify-content:center;margin-top:.8rem}
@media print{
  body.el-results-open>*:not(.el-results){display:none!important}
  body.el-results-open{background:#fff!important}
  .el-results{border:0;margin:0;padding:0;max-width:none;font-size:10.5pt}
  .el-results-bar{display:none!important}
  .el-results tr{break-inside:avoid}
}

/* "and" / "or" inside a question are ordinary words on the elementary pages (the shared math display styles them as
   small connector labels between expressions, which reads oddly in a sentence). */
.el .w { font-size: inherit; font-weight: inherit; letter-spacing: normal; text-transform: none; margin: 0; opacity: 1; }
