/* ExamPrepSchool 11+ section: test pages, the timed test and its diagrams. Loads after site.css. */
:root { --c-11: #12A4A4; --c-11-soft: #DDF6F4; --warn: #D9480F; --warn-soft: #FFE8DC; --bad: #D33A4A; --bad-soft: #FDE4E7; }
@media (prefers-color-scheme: dark) { :root { --c-11: #3FD0C8; --c-11-soft: #123A3C; --warn: #FF9B6A; --warn-soft: #3D2418; --bad: #FF7B88; --bad-soft: #3E1C24; } }

/* ---- Section pages ---- */
.ep-ages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 8px; }
.ep-age { display: block; position: relative; background: var(--paper); border: 2px solid var(--line); border-radius: 22px; padding: 22px 22px 20px; text-decoration: none; color: var(--ink); box-shadow: 0 14px 30px -26px rgba(27,35,71,.7); overflow: hidden; }
.ep-age::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 8px; background: var(--c); }
a.ep-age:hover { border-color: var(--c); transform: translateY(-2px); }
.ep-age .yr { font-family: var(--display); font-weight: 600; font-size: .95rem; color: var(--muted); }
.ep-age h2, .ep-age h3 { font-family: var(--display); font-size: 1.6rem; margin: 4px 0 8px; }
.ep-age p { margin: 0 0 10px; color: var(--muted); }
.ep-age em { font-style: normal; font-weight: 600; color: var(--blue); }
.ep-soon { display: inline-block; font: 600 .82rem var(--body); background: var(--yellow-soft); color: var(--ink); border: 1.5px solid var(--yellow); border-radius: 999px; padding: 3px 10px; }
.ep-tests { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.ep-test { display: flex; flex-direction: column; gap: 6px; background: var(--paper); border: 2px solid var(--line); border-radius: 20px; padding: 18px; text-decoration: none; color: var(--ink); position: relative; overflow: hidden; }
.ep-test::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 7px; background: var(--c-11); }
.ep-test:hover { border-color: var(--c-11); }
.ep-test .num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--c-11); color: #fff; font: 700 1.3rem var(--display); }
@media (prefers-color-scheme: dark) { .ep-test .num { color: #10152B; } }
.ep-test b { font-family: var(--display); font-size: 1.25rem; }
.ep-test span { color: var(--muted); font-size: .95rem; }
.ep-test .best { color: var(--good); font-weight: 600; font-size: .9rem; }
.ep-test em { font-style: normal; font-weight: 600; color: var(--blue); margin-top: auto; padding-top: 6px; }
@media (max-width: 860px) { .ep-tests { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .ep-ages, .ep-tests { grid-template-columns: 1fr; } }

/* ---- Test page ---- */
.ep-card { background: var(--paper); border: 2px solid var(--line); border-radius: 22px; padding: 22px 24px; margin-bottom: 18px; }
.ep-card h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 6px 0 14px; }
.ep-card h2 { font-family: var(--display); font-size: 1.4rem; margin: 0 0 12px; }
.ep-tag { display: inline-block; font: 600 .85rem var(--body); background: var(--c-11-soft); color: var(--ink); border-radius: 999px; padding: 4px 12px; }
.ep-facts { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0 0 16px; }
.ep-facts li { background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 14px; }
.ep-facts b { font-family: var(--display); font-size: 1.2rem; color: var(--c-11); }
.ep-best { font-weight: 500; }
.ep-intro .cta { margin-top: 18px; }
.ep-intro ul.check { max-width: 46em; }

.ep-testing footer, .ep-testing .crumbs, .ep-testing .ep-pagehead { display: none; }
.ep-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; justify-content: space-between; background: var(--paper); border: 2px solid var(--line); border-radius: 18px; padding: 10px 14px; margin-bottom: 14px; box-shadow: 0 10px 22px -20px rgba(27,35,71,.8); }
.ep-topl { display: flex; flex-direction: column; line-height: 1.25; }
.ep-topl span { color: var(--muted); font-size: .9rem; }
.ep-timer { font: 700 1.6rem var(--display); font-variant-numeric: tabular-nums; background: var(--c-11-soft); border-radius: 12px; padding: 2px 14px; min-width: 96px; text-align: center; }
.ep-timer::before { content: "⏱ "; font-size: 1.1rem; }
.ep-timer.low { background: var(--warn-soft); color: var(--warn); }
.ep-layout { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 16px; align-items: start; }
.ep-side { background: var(--paper); border: 2px solid var(--line); border-radius: 18px; padding: 14px; position: sticky; top: 86px; }
.ep-side h2 { font: 600 1rem var(--body); margin: 0 0 10px; color: var(--muted); }
.ep-map { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ep-map button { font: 600 .9rem var(--body); aspect-ratio: 1; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; position: relative; padding: 0; }
.ep-map button.ans { background: var(--c-11-soft); border-color: var(--c-11); }
.ep-map button.flag::after { content: ""; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.ep-map button.cur { outline: 3px solid var(--blue); outline-offset: 1px; }
.ep-key { font-size: .82rem; color: var(--muted); margin: 10px 0 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ep-key span { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.k-ans { background: var(--c-11-soft); border: 1.5px solid var(--c-11); }
.k-flag { background: var(--warn); border-radius: 50% !important; width: 10px !important; height: 10px !important; margin-left: 8px; }
.ep-qhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.ep-qn { font: 700 1.05rem var(--display); color: var(--c-11); }
.ep-flag { font: 500 .88rem var(--body); background: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 12px; color: var(--muted); cursor: pointer; }
.ep-flag.on { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.ep-qt { font-size: 1.15rem; line-height: 1.55; margin: 6px 0 14px; max-width: 40em; }
.ep-opts { display: grid; gap: 8px; max-width: 34em; }
.ep-opt { display: flex; align-items: center; gap: 12px; text-align: left; font: 500 1.05rem var(--body); color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; cursor: pointer; }
.ep-opt:hover { border-color: var(--c-11); }
.ep-opt.sel { border-color: var(--c-11); background: var(--c-11-soft); box-shadow: inset 0 0 0 1px var(--c-11); }
.ep-l { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--paper); border: 1.5px solid var(--line); font-family: var(--display); font-weight: 700; }
.ep-opt.sel .ep-l { background: var(--c-11); border-color: var(--c-11); color: #fff; }
.ep-write { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 1.1rem; }
.ep-wl { font-weight: 600; }
.ep-write input { font: 600 1.2rem var(--body); width: 11em; max-width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); }
.ep-write input:focus { outline: none; border-color: var(--c-11); box-shadow: 0 0 0 3px var(--c-11-soft); }
.ep-unit { font-weight: 600; color: var(--muted); }
.ep-hint { font-size: .88rem; color: var(--muted); margin: 8px 0 0; }
.ep-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.ep-nav .btn[disabled] { opacity: .4; cursor: default; }
@media (max-width: 860px) {
  .ep-layout { grid-template-columns: minmax(0, 1fr); }
  .ep-side { position: static; }
  .ep-map { grid-template-columns: repeat(10, 1fr); }
}
@media (max-width: 520px) {
  .ep-card { padding: 18px 16px; }
  .ep-top { gap: 8px; padding: 8px 10px; border-radius: 14px; }
  .ep-topl b { display: none; }
  .ep-topl span { font-size: .82rem; }
  .ep-timer { font-size: 1.25rem; min-width: 0; padding: 2px 10px; }
  .ep-top .btn.small { padding: 7px 10px; font-size: .85rem; }
  .ep-map { grid-template-columns: repeat(8, 1fr); }
  .ep-qt { font-size: 1.05rem; }
}

/* ---- Diagrams ---- */
.ep-fig { margin: 4px 0 18px; max-width: 100%; overflow-x: auto; }
.ep-svg { max-width: 100%; height: auto; display: block; }
.ep-t { font: 500 14px var(--body); fill: var(--ink); }
.ep-ts { font-size: 12.5px; fill: var(--muted); }
.ep-tb { font-weight: 600; }
.ep-big { font: 700 20px var(--display); fill: var(--ink); }
.ep-mt { fill: var(--c-pink); font-weight: 600; }
.ep-gl { stroke: var(--line); stroke-width: 1; }
.ep-ax { stroke: var(--ink); stroke-width: 1.6; opacity: .75; }
.ep-thick { stroke-width: 3; opacity: 1; }
.ep-bar { fill: var(--c-maths); }
.ep-line { fill: none; stroke: var(--c-reason); stroke-width: 3; stroke-linejoin: round; }
.ep-dot { fill: var(--paper); stroke: var(--c-reason); stroke-width: 2.5; }
.ep-pieline { stroke: #1B2347; stroke-width: 1.5; }
.ep-pielab { font: 600 13px var(--body); fill: #1B2347; }
.ep-frame { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: .6; }
.ep-ic { fill: var(--c-reading); stroke: #B57400; stroke-width: 1; }
.ep-icl { stroke: #B57400; stroke-width: 2.4; stroke-linecap: round; }
.ep-icd { fill: #1B2347; }
@media (prefers-color-scheme: dark) { .ep-icd { fill: #ECF0FA; } }
.ep-shape { fill: rgba(61,178,255,.28); stroke: var(--blue); stroke-width: 2.4; stroke-linejoin: round; }
.ep-mirror { stroke: var(--c-pink); stroke-width: 2.4; stroke-dasharray: 8 6; }
.ep-cross { stroke: #E8590C; stroke-width: 3; stroke-linecap: round; }
.ep-on { fill: var(--c-reason); fill-opacity: .55; stroke: var(--ink); stroke-width: 1.5; }
.ep-off { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.ep-vc { fill: none; stroke: var(--ink); stroke-width: 2; }
.ep-face { fill: var(--paper); stroke: var(--ink); stroke-width: 4; }
.ep-hand { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.ep-hh { stroke-width: 6; }
.ep-arrow { fill: #E8590C; stroke: #E8590C; stroke-width: 3; stroke-linejoin: round; }
.ep-arc { fill: none; stroke: var(--c-pink); stroke-width: 2.5; }
.ep-tablewrap { overflow-x: auto; }
.ep-table { border-collapse: collapse; background: var(--paper); font-size: 1rem; }
.ep-table th, .ep-table td { border: 1.5px solid var(--line); padding: 8px 14px; text-align: center; }
.ep-table thead th { background: var(--c-11-soft); font-weight: 600; }
.ep-table tbody th { text-align: left; font-weight: 600; background: var(--bg); }

/* ---- Results ---- */
.ep-timeup { background: var(--warn-soft); color: var(--warn); font-weight: 600; border-radius: 12px; padding: 8px 14px; display: inline-block; }
.ep-score { display: flex; align-items: center; gap: 24px; margin: 14px 0 18px; flex-wrap: wrap; }
.ep-score h1 { margin: 0 0 6px; }
.ep-score p { margin: 0 0 4px; }
.ep-muted { color: var(--muted); }
.ep-saved { font-size: .9rem; color: var(--good); margin-top: 6px !important; }
.ep-ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c-11) calc(var(--p) * 1%), var(--line) 0); flex: none; }
.ep-ring b { display: grid; place-items: center; width: 102px; height: 102px; border-radius: 50%; background: var(--paper); font: 700 2.2rem var(--display); }
.ep-ring small { font-size: 1rem; color: var(--muted); margin-top: -10px; }
.ep-topics td, .ep-topics th { text-align: left; }
.ep-lvl { display: inline-block; font-weight: 600; font-size: .88rem; border-radius: 999px; padding: 3px 10px; }
.ep-lvl.ok { background: var(--good-soft); color: var(--good); }
.ep-lvl.mid { background: var(--yellow-soft); color: var(--ink); }
.ep-lvl.no { background: var(--bad-soft); color: var(--bad); }
.ep-revhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ep-revhead h2 { margin: 0; }
.ep-toggle { display: inline-flex; gap: 8px; align-items: center; font-size: .95rem; cursor: pointer; }
.ep-toggle input { width: 18px; height: 18px; accent-color: var(--c-11); }
.ep-review { list-style: none; padding: 0; margin: 0; }
.ep-review > li { border-top: 1.5px solid var(--line); padding: 16px 0; }
.ep-review.only-wrong > li.ok { display: none; }
.ep-rq { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ep-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 700; }
.ok .ep-mark { background: var(--good-soft); color: var(--good); }
.no .ep-mark { background: var(--bad-soft); color: var(--bad); }
.ep-topic { font-size: .82rem; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 2px 10px; }
.ep-review .ep-qt { font-size: 1.05rem; margin: 8px 0 10px; }
.ep-ropts { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.ep-ropts li { border: 1.5px solid var(--line); border-radius: 10px; padding: 4px 10px; font-size: .95rem; }
.ep-ropts li.right { border-color: var(--good); background: var(--good-soft); }
.ep-ropts li.wrong { border-color: var(--bad); background: var(--bad-soft); text-decoration: line-through; }
.ep-ans { display: flex; gap: 8px 22px; flex-wrap: wrap; margin: 0 0 8px; }
.no .ep-ans span:first-child b { color: var(--bad); }
.ep-ans span:nth-child(2) b { color: var(--good); }
.ep-ex { background: var(--bg); border-radius: 12px; padding: 10px 14px; margin: 0; max-width: 46em; }

/* ---- Confirm box ---- */
.ep-modal { position: fixed; inset: 0; z-index: 100; background: rgba(16,21,43,.55); display: grid; place-items: center; padding: 16px; }
.ep-modal .ep-card { max-width: 440px; margin: 0; box-shadow: 0 24px 60px -20px rgba(0,0,0,.5); }

@media print {
  header.bar, footer, .crumbs, .ep-result .cta, .ep-toggle, .beta-banner, [data-feedback], #epsFeedback { display: none !important; }
  body { background: #fff; }
  .ep-card { border: 0; padding: 0; }
  .ep-review > li { break-inside: avoid; }
}
.ep-shape2 { fill: rgba(255,92,168,.22); stroke: var(--c-pink); stroke-dasharray: 6 4; }

/* ---- Topic practice ---- */
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.tp-card { display: flex; flex-direction: column; gap: 6px; background: var(--paper); border: 2px solid var(--line); border-radius: 18px; padding: 16px; text-decoration: none; color: var(--ink); }
.tp-card:hover { border-color: var(--c-11); }
.tp-ic { display: inline-grid; place-items: center; min-width: 54px; height: 40px; padding: 0 8px; align-self: flex-start; border-radius: 12px; background: var(--c-11-soft); font: 700 1rem var(--display); color: var(--ink); }
.tp-card b { font-family: var(--display); font-size: 1.15rem; }
.tp-meta { color: var(--muted); font-size: .85rem; }
.tp-card ul { margin: 2px 0 4px; padding-left: 18px; color: var(--muted); font-size: .88rem; columns: 2; column-gap: 18px; }
.tp-card li { break-inside: avoid; }
.tp-card em { font-style: normal; font-weight: 600; color: var(--blue); margin-top: auto; }
.tp-best { display: flex; gap: 6px; flex-wrap: wrap; }
.tp-lv { font: 600 .75rem var(--body); border-radius: 999px; padding: 2px 8px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.tp-lv.ok { background: var(--good-soft); color: var(--good); border-color: transparent; }
.tp-lv.mid { background: var(--yellow-soft); color: var(--ink); border-color: transparent; }
.tp-lv.no { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.tp-head { margin-bottom: 18px; }
.tp-head h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); margin: 8px 0 8px; }
.tp-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; max-width: 640px; }
.tp-levels a { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.tp-levels a span { font-size: .82rem; color: var(--muted); }
.tp-levels a.on { border-color: var(--c-11); background: var(--c-11-soft); }
.tp-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tp-score { font-weight: 600; color: var(--c-11); }
.tp-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 470px), 1fr)); gap: 14px; align-items: start; }
.tp-q { margin: 0; }
.tp-q .ep-qn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--c-11); color: #fff; font-size: 1rem; }
@media (prefers-color-scheme: dark) { .tp-q .ep-qn { color: #10152B; } }
.tp-q .ep-qt { font-size: 1.08rem; }
.tp-q.ok { border-color: var(--good); }
.tp-q.no { border-color: var(--bad); }
.tp-opts { max-width: none; }
.tp-opts .ep-opt { padding: 8px 12px; font-size: 1rem; }
.ep-opt.right { border-color: var(--good); background: var(--good-soft); }
.ep-opt:disabled { cursor: default; }
.tp-act { display: flex; gap: 8px; margin-top: 12px; }
.tp-fb { margin-top: 10px; font-size: .95rem; }
.tp-fb:empty { display: none; }
.tp-fb.ok, .tp-fb.no, .tp-fb.warn { border-radius: 12px; padding: 10px 12px; }
.tp-fb.ok { background: var(--good-soft); }
.tp-fb.no { background: var(--bad-soft); }
.tp-fb.warn { background: var(--yellow-soft); }
.tp-done { margin-top: 18px; }
.tp-key { display: none; }
@media print {
  .tp-levels, .tp-tools, .tp-act, .tp-fb, .tp-done, .ep-hint, .tp-head .lede { display: none !important; }
  .tp-list { display: block; }
  .tp-q { break-inside: avoid; border: 0; border-bottom: 1px solid #ccc; border-radius: 0; padding: 10px 0; }
  .tp-q input { border: 0; border-bottom: 1.5px solid #333; border-radius: 0; background: none; }
  .ep-opt { border: 1px solid #999; }
  .tp-key { display: block; break-before: page; }
  .tp-key li { margin-bottom: 6px; font-size: .9rem; }
}

/* ---- Games ---- */
.gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.gm-card { display: flex; flex-direction: column; gap: 6px; background: var(--paper); border: 2px solid var(--line); border-top: 8px solid var(--c); border-radius: 18px; padding: 16px; text-decoration: none; color: var(--ink); }
.gm-card:hover { border-color: var(--c); }
.gm-card b { font-family: var(--display); font-size: 1.3rem; }
.gm-card > span:not(.gm-skill):not(.gm-best) { color: var(--muted); font-size: .92rem; }
.gm-card em { font-style: normal; font-weight: 600; color: var(--blue); margin-top: auto; }
.gm-skill { display: inline-block; align-self: flex-start; font: 600 .78rem var(--body); text-transform: uppercase; letter-spacing: .04em; color: var(--c, var(--muted)); }
.gm-best { font-weight: 600; color: var(--good); font-size: .9rem; }
.gm-play { border-top: 8px solid var(--c); min-height: 420px; }
.gm-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.gm-top h1 { margin: 2px 0 0; font-size: clamp(1.8rem, 4vw, 2.4rem); }
.gm-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.gm-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.gm-stats span { background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 12px; font-size: .95rem; }
.gm-stats b { font-family: var(--display); font-size: 1.15rem; }
.gm-q { font: 600 clamp(1.4rem, 4vw, 2rem) var(--display); margin: 18px 0; }
.gm-help { color: var(--muted); }
.gm-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.gm-in { font: 600 1.3rem var(--body); width: 8em; max-width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); text-align: center; }
.gm-in:focus { outline: none; border-color: var(--c, var(--c-11)); box-shadow: 0 0 0 3px var(--c-11-soft); }
.gm-in.bad { border-color: var(--bad); background: var(--bad-soft); }
.gm-fb { min-height: 1.6em; font-weight: 500; }
.gm-fb.ok { color: var(--good); } .gm-fb.no { color: var(--bad); } .gm-fb.warn { color: var(--warn); }
.gm-eq { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 700 clamp(1.6rem, 5vw, 2.4rem) var(--display); margin: 20px 0 8px; }
.gm-sign { font: 700 1.6rem var(--display); width: 54px; height: 54px; border-radius: 14px; border: 2.5px dashed var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.gm-sign.set { border-style: solid; border-color: var(--c); background: var(--paper); }
.gm-clues { list-style: none; padding: 0; display: grid; gap: 8px; font: 600 1.3rem var(--display); }
.gm-clues li { background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 14px; max-width: 320px; }
.gm-letters { display: flex; gap: 14px; flex-wrap: wrap; margin: 16px 0; }
.gm-letters label { display: flex; align-items: center; gap: 8px; font: 700 1.4rem var(--display); }
.gm-letters .gm-in { width: 4em; }
.gm-hist { list-style: none; padding: 0; display: grid; gap: 6px; margin: 14px 0; }
.gm-hist li { display: flex; gap: 18px; align-items: center; background: var(--bg); border-radius: 12px; padding: 6px 14px; max-width: 340px; }
.gm-guess { font: 700 1.4rem var(--display); letter-spacing: .1em; }
.pin { font-size: 1.3rem; margin-right: 2px; }
.pin.hit { color: var(--good); } .pin.near { color: var(--warn); } .pin.none { font-size: .9rem; color: var(--muted); }
.gm-dig { width: 2.6em; font-size: 1.6rem; }
.gm-angle { max-width: 100%; }
.gm-cn .cta { margin-top: 10px; }
.gm-pyr { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 16px 0; }
.gm-prow { display: flex; gap: 4px; }
.gm-brick { display: inline-grid; place-items: center; width: 70px; height: 46px; border: 2px solid var(--ink); border-radius: 8px; font: 700 1.2rem var(--display); background: var(--paper); padding: 0; }
input.gm-brick { background: var(--c-11-soft); border-color: var(--c-11); }
.gm-over { text-align: center; padding: 20px 0; }
.gm-over .cta { justify-content: center; }
.gm-big { font: 700 4rem var(--display); color: var(--c); margin: 0; }
.gm-big small { font-size: 1.6rem; color: var(--muted); }
@media (max-width: 520px) { .gm-brick { width: 56px; height: 42px; font-size: 1rem; } .gm-sign { width: 46px; height: 46px; } }

/* ---- 11+ section layout (shared by every 11+ page) ---- */
.ep-subnav { display: flex; gap: 4px 6px; flex-wrap: wrap; margin: 4px 0 6px; padding: 4px; background: var(--paper); border: 2px solid var(--line); border-radius: 16px; }
.ep-subnav::-webkit-scrollbar { display: none; }
.ep-subnav a { flex: none; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .92rem; padding: 8px 12px; border-radius: 11px; white-space: nowrap; }
.ep-subnav a:hover { background: var(--bg); }
.ep-subnav a[aria-current="page"] { background: var(--c-11); color: #fff; }
@media (prefers-color-scheme: dark) { .ep-subnav a[aria-current="page"] { color: #10152B; } }
.ep-subnav small { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; background: var(--yellow-soft); color: var(--ink); border-radius: 999px; padding: 1px 6px; }
.ep-subnav a[aria-current="page"] small { background: rgba(255,255,255,.3); color: inherit; }
.ep-hero { padding-block: 22px 26px; max-width: 52em; }
.ep-hero h1 { font-size: clamp(2.1rem, 4.8vw, 3.2rem); margin: 10px 0 12px; }
.ep-hero .lede { margin-bottom: 20px; }
.ep-sec { margin: 0 0 36px; }
.ep-sec > h2 { margin-bottom: 6px; }
.ep-intro { color: var(--muted); margin: 0 0 16px; max-width: 46em; }
.ep-ages.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ep-age .ep-soon { margin-bottom: 10px; }
.ep-notice { background: var(--yellow-soft); border: 2px solid var(--yellow); border-radius: 16px; padding: 14px 18px; margin-bottom: 30px; max-width: 52em; }
.ep-cols { columns: 3; column-gap: 24px; padding-left: 20px; }
.ep-cols li { break-inside: avoid; margin-bottom: 4px; }
.ep-switch { font-weight: 500; }
@media (max-width: 860px) { .ep-ages.three { grid-template-columns: 1fr; } .ep-cols { columns: 2; } }
@media (max-width: 520px) { .ep-cols { columns: 1; } }

/* ---- English, verbal and non-verbal reasoning tests ---- */
.ep-ins { background: var(--c-11-soft); border-radius: 14px; padding: 10px 14px; margin: 8px 0 12px; max-width: 46em; }
.ep-ins p { margin: 0; font-weight: 500; }
.ep-ins .ep-eg { margin-top: 6px; font-weight: 400; color: var(--muted); }
.ep-ins .ep-eg b { color: var(--ink); }
.ep-rins { font-size: .9rem; color: var(--muted); margin: 8px 0 0; }
/* Reading passage beside the questions */
.ep-withp { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.ep-passage { border: 2px solid var(--line); border-radius: 16px; background: var(--bg); position: sticky; top: 86px; }
.ep-passage summary { cursor: pointer; padding: 10px 14px; font: 700 1.1rem var(--display); display: flex; flex-direction: column; }
.ep-passage summary small { font: 400 .8rem var(--body); color: var(--muted); }
.ep-ptext { max-height: min(62vh, 640px); overflow-y: auto; padding: 4px 14px 14px 6px; border-top: 1.5px solid var(--line); }
.ep-pl { display: grid; grid-template-columns: 2em minmax(0, 1fr); gap: 6px; margin: 0; line-height: 1.6; font-size: .93rem; }
.ep-pl.ep-gap { height: .6em; }
.ep-ln { font-size: .75rem; color: var(--muted); text-align: right; padding-top: .25em; font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) {
  .ep-withp { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ep-passage { position: static; }
  .ep-ptext { max-height: 46vh; }
  .ep-pl { font-size: .86rem; }
}
/* Sentence in parts (spelling and punctuation) */
.ep-segs { display: flex; flex-wrap: wrap; gap: 6px 4px; font-size: 1.12rem; line-height: 1.4; max-width: 46em; }
.ep-seg { display: inline-flex; flex-direction: column; align-items: stretch; }
.ep-segt { padding: 2px 4px; border-bottom: 3px solid var(--c-11); }
.ep-seg b { text-align: center; font: 700 .85rem var(--display); color: var(--muted); margin-top: 2px; }
/* Word grid */
.ep-wgrid { display: inline-grid; grid-template-columns: repeat(var(--n), 46px); border: 2px solid var(--ink); }
.ep-wgrid span { width: 46px; height: 46px; border: 1px solid var(--ink); display: grid; place-items: center; font: 700 1.3rem var(--display); background: var(--paper); }
.ep-wgrid span.blk { background: var(--ink); }
/* Alphabet strip */
.ep-abc { display: flex; flex-wrap: wrap; gap: 2px; max-width: 46em; }
.ep-abc span { display: inline-flex; flex-direction: column; align-items: center; width: 26px; border-radius: 6px; background: var(--bg); padding: 2px 0; }
.ep-abc b { font: 700 1rem var(--display); }
.ep-abc small { font-size: .62rem; color: var(--muted); }
.ep-pairs { display: flex; flex-wrap: wrap; gap: 8px 18px; font: 600 1.2rem var(--body); letter-spacing: .04em; }
/* Non-verbal reasoning pictures: drawn black on white, like a printed paper, in light and dark mode */
.ep-nvr svg, .ep-pic svg, .ep-rpics svg { background: #fff; border-radius: 10px; display: block; max-width: 100%; height: auto; }
.ep-nvr svg { border: 1.5px solid var(--line); }
.ep-opts.ep-pics { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 640px; gap: 10px; }
.ep-opt.ep-pic { flex-direction: column; gap: 6px; padding: 8px; align-items: center; }
.ep-opt.ep-pic svg { width: 100%; }
.ep-rpics { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.ep-rpics span { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 86px; border: 2px solid var(--line); border-radius: 12px; padding: 4px; }
.ep-rpics span.right { border-color: var(--good); background: var(--good-soft); }
.ep-rpics span.wrong { border-color: var(--bad); background: var(--bad-soft); }
@media (max-width: 520px) {
  .ep-opts.ep-pics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ep-wgrid { grid-template-columns: repeat(var(--n), 38px); }
  .ep-wgrid span { width: 38px; height: 38px; }
}
/* Subject colours for the test cards on the age pages */
.ep-test.s-english::before, .ep-test.s-english .num { background: #FF7A59; }
.ep-test.s-vr::before, .ep-test.s-vr .num { background: #2FBF71; }
.ep-test.s-nvr::before, .ep-test.s-nvr .num { background: #FF5CA8; }
.ep-test.s-english:hover { border-color: #FF7A59; }
.ep-test.s-vr:hover { border-color: #2FBF71; }
.ep-test.s-nvr:hover { border-color: #FF5CA8; }
.ep-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.ep-tabs a { text-decoration: none; color: var(--ink); border: 2px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .95rem; }
.ep-tabs a:hover { border-color: var(--c-11); }
@media print { .ep-passage { position: static; } .ep-ptext { max-height: none; overflow: visible; } }

/* Past attempts and the My 11+ results page */
.ep-past h2 { margin-top: 0; }
.ep-pastlist { list-style: none; padding: 0; margin: 0; }
.ep-pastlist li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; border-top: 1.5px solid var(--line); padding: 10px 0; }
.ep-pastlist li:first-child { border-top: 0; }
.ep-pastlist li > span:first-child { min-width: 11em; }
.ep-pastlist .btn { margin-left: auto; }
.ep-pastnote { background: var(--c-11-soft); border-radius: 12px; padding: 10px 14px; margin: 10px 0; }
.ep-hfilters { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; padding: 14px 20px; }
.ep-hfilters label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ep-hfilters select { font: inherit; font-weight: 400; padding: 6px 10px; border: 2px solid var(--line); border-radius: 10px; background: var(--paper); }
.ep-hstats { margin: 0 0 18px; }
.ep-hist { width: 100%; }
.ep-hist td, .ep-hist th { white-space: nowrap; }
.ep-hist tbody th a { color: inherit; }
.ep-hist tbody th { white-space: normal; min-width: 200px; }
.ep-hist .btn { white-space: nowrap; }
@media (max-width: 640px) {
  .ep-hist thead { display: none; }
  .ep-hist, .ep-hist tbody { display: block; }
  .ep-hist tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 0; border-top: 1.5px solid var(--line); }
  .ep-hist td, .ep-hist th, .ep-hist tbody th { border: 0; padding: 0; text-align: left; white-space: normal; background: none; }
  .ep-hist tbody th { order: -1; flex-basis: 100%; }
  .ep-hist td:first-child { flex-basis: 100%; color: var(--muted); font-size: .9rem; }
  .ep-hist td[data-l]::after { content: ' ' attr(data-l); }
  .ep-hist td:last-child { flex-basis: 100%; }
  .ep-pastlist li > span:first-child { min-width: 0; }
}

/* 11+ games for every subject */
.gm-ages { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.gm-sec { margin: 0 0 30px; }
.gm-sec h2 { margin-bottom: 4px; }
.gm-sec .ep-muted { margin: 0 0 12px; }
.gm-sr .gm-ins { color: var(--muted); font-size: .92rem; margin: 6px 0; }
.gm-srq { font: 600 1.25rem var(--display); margin: 10px 0 14px; white-space: pre-wrap; }
.gm-opts { margin: 10px 0; }
.gm-in.gm-wide { width: 12em; }

/* ---------- Practice by topic (/11-plus/practice/ and the age pages) ---------- */
.pt-ages { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.pt-subj { background: var(--paper); border: 2px solid var(--line); border-left: 6px solid var(--c); border-radius: 18px; padding: 14px 16px; margin: 0 0 14px; scroll-margin-top: 90px; }
.pt-subj h3 { margin: 0 0 10px; font-size: 1.15rem; }
.pt-subj h3 small { display: block; font-size: .85rem; font-weight: 500; color: var(--muted); margin-top: 2px; }
.pt-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-list a { text-decoration: none; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 12px; padding: 7px 12px; font-weight: 500; font-size: .95rem; }
.pt-list a:hover { border-color: var(--c); }

/* ---------- Free 11+ online tests (/11-plus/online-tests/) ---------- */
.ot-age { margin: 0 0 22px; scroll-margin-top: 90px; }
.ot-age h3 { margin: 0 0 10px; font-size: 1.2rem; }
.ot-age h3 a { color: var(--ink); }
.ot-age h3 span { font-size: .85rem; font-weight: 500; color: var(--muted); margin-left: 6px; }
.ot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.ot-cell { background: var(--paper); border: 2px solid var(--line); border-top: 6px solid var(--c); border-radius: 16px; padding: 12px 14px; }
.ot-cell h4 { margin: 0 0 8px; font-size: 1rem; }
.ot-cell h4 small { display: block; font-weight: 500; font-size: .8rem; color: var(--muted); }
.ot-tests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ot-tests a { text-align: center; text-decoration: none; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 10px; padding: 6px 4px; font-weight: 500; font-size: .92rem; }
.ot-tests a:hover { border-color: var(--c); }
.ot-try { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.ot-q { background: var(--paper); border: 2px solid var(--line); border-radius: 16px; padding: 14px; }
.ot-q p { margin: 6px 0 10px; }
.ot-s { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ot-o { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ot-o button { font: inherit; padding: 8px; border-radius: 10px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.ot-o button.ok { border-color: #2FBF71; background: #E6F8EE; color: #10152B; }
.ot-o button.no { border-color: #E5484D; background: #FDECEC; color: #10152B; }
.ot-ex { font-size: .92rem; color: var(--muted); margin: 10px 0 0 !important; }
.ep-rom { font-family: Georgia, "Times New Roman", serif; font-size: 13px; font-weight: 700; }

@media (prefers-color-scheme: dark) { .gm-skill { filter: brightness(1.45); } }
.gm-cup{margin:6px auto;padding:10px 14px;border-radius:14px;background:color-mix(in srgb,#3DB2FF 12%,var(--paper));border:2px solid color-mix(in srgb,#3DB2FF 35%,var(--line));max-width:520px}
