/* walkthroughs.css: every walkthrough animation (the .stage/.cv canvases played by js/*-walk.js, js/walkthroughs.js,
   js/walkthroughs.js and js/walkthroughs.js). Each part below was its own file; each is scoped to its own canvas classes. */

/* ==========================================================================
   qg-walkthrough (was css/qg-walkthrough.css)
   ========================================================================== */
/* Question Generator walkthrough: a mock-up "video" of the four steps with auto-cycling tabs underneath (used on the home page and qg-playground.html) */
/* each .qgv-scene stands in for a clip; swap its contents for a <video> when one exists */

.qgv {
    max-width: 1060px;
    margin: 0 auto;
}

/* the two buttons under the tabs */
.qgv-ctas {
    justify-content: center;
    margin-top: 64px;
}

/* single pill button with an arrow that nudges right on hover */
.qgv-cta {
    gap: 10px;
    padding: 0 30px;
    border-radius: 99px;
}

.qgv-cta span {
    transition: transform .15s ease;
}

.qgv-cta:hover span {
    transform: translateX(3px);
}

/* "your" in the heading: a hand-drawn yellow brush stroke underneath that draws itself in (.drawn is added when the heading scrolls into view) */
.qgv-your {
    position: relative;
    display: inline-block;
    font-style: normal;
    z-index: 0;
}

.qgv-your svg {
    position: absolute;
    left: -6%;
    bottom: -.12em;
    z-index: -1;
    width: 112%;
    height: .42em;
    overflow: visible;
}

.qgv-your path {
    fill: none;
    stroke: #f1c04b;
    stroke-width: 9;
    stroke-linecap: round;
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    transition: stroke-dashoffset .7s cubic-bezier(.65, 0, .35, 1) .15s;
}

.qgv-your.drawn path {
    stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: reduce) {
    .qgv-your path { stroke-dashoffset: 0; transition: none; }
    /* every step's animation ends on its finished frame (they all fill forwards), so jump straight there */
    .qgv-scene.on *, .qgv-scene.on *::before, .qgv-scene.on *::after, .qgv-line i {
        animation-duration: 1ms !important;
        animation-delay: 0s !important;
    }
}

/* Primary / Secondary / A Level switch above the frame */
.qgv-levelsw {
    display: flex;
    width: max-content;
    margin: 0 auto 18px;
    padding: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 99px;
    background: #eef1f8;
}

.qgv-levelsw button {
    padding: 8px 18px;
    border: 0;
    border-radius: 99px;
    background: none;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.qgv-levelsw button:hover {
    color: #111827;
}

.qgv-levelsw button.on {
    background: #fff;
    color: #111827;
    box-shadow: 0 2px 8px -4px rgba(17, 24, 39, .3);
}

.qgv-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #eef1f8;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.qgv-scene {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity .45s ease;
    pointer-events: none;
}

.qgv-scene.on {
    opacity: 1;
}

.qgv-win {
    position: relative;
    width: 76%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 30px 60px -36px rgba(17, 24, 39, .45);
    padding: 26px 30px 30px;
}

.qgv-win-title {
    margin: 0 0 16px;
    font-size: 19px;
    font-weight: 800;
    color: #111827;
}

.qgv-win-sub {
    margin: -10px 0 16px;
    font-size: 14px;
    color: #6b7280;
}

.qgv-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.qgv-pill {
    position: relative;
    padding: 9px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    color: #374151;
    box-shadow: 0 2px 6px -2px rgba(17, 24, 39, .12);
}

.qgv-pill.sel {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

/* the mouse pointer */
.qgv-cursor {
    position: absolute;
    left: 55%;
    top: 55%;
    z-index: 4;
    width: 26px;
    height: 26px;
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3));
}

/* scene 1 (5s): grid of example cards; pass over 4 Questions to Project (grows briefly), then click Worksheet (stays selected) */
.qgv-types {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 196px);
    justify-content: center;
    gap: 14px 16px;
}

.qgv-tcard {
    position: relative;
    padding: 8px 8px 9px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 0 0 1px #eef0f3, 0 6px 16px -8px rgba(17, 24, 39, .22);
    text-align: center;
}

.qgv-tcard .im {
    position: relative;
    display: block;
    height: 92px;
    border-radius: 9px;
    background: #f5f6fb;
    overflow: hidden;
}

.qgv-tcard img {
    position: absolute;
    inset: 7px;
    width: calc(100% - 14px);
    height: calc(100% - 14px);
    object-fit: contain;
}

.qgv-tcard b {
    display: block;
    margin-top: 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1f2937;
}

.qgv-scene.on .qgv-th { animation: qgvCardHover 5s ease forwards; }
.qgv-scene.on .qgv-th b { animation: qgvLabelHover 5s linear forwards; }
.qgv-scene.on .qgv-ws { animation: qgvCardPick 5s ease forwards; }
.qgv-scene.on .qgv-ws b { animation: qgvLabelPick 5s linear forwards; }
.qgv-types .qgv-s1-cursor {
    z-index: 5;
}

.qgv-scene.on .qgv-s1-cursor { animation: qgvCursorHover 5s ease forwards; }
/* scene 2: choose a level, straight on the light grey frame with no window */

.qgv-thead {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qgv-thead.qgv-thead-c {
    justify-content: center;
    margin: 0 0 22px;
}

/* small grey label above the pills */
.qgv-thead.qgv-thead-c b {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #6b7280;
}

.qgv-levels {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.qgv-lrow {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.qgv-lv {
    position: relative;
    padding: 15px 32px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 0 0 1px #eef0f3, 0 6px 16px -8px rgba(17, 24, 39, .22);
    font-size: 19px;
    color: #1f2937;
    white-space: nowrap;
}

.qgv-scene.on .qgv-lv-target {
    animation: qgvLevelOn 6s linear forwards;
}

.qgv-scene.on .qgv-s2-cursor-a {
    animation: qgvCursorIn 2.2s ease forwards;
}

.qgv-scene[data-scene="1"].on .qgv-lv-target {
    animation-duration: 2.2s;
}
/* scene 3 (7.5s): on the grey, no card. Five question groups; the first opens for two ticks, then the second opens for the third */
/* pinned to the top, so opening Place Value grows into the space below instead of re-centring */
.qgv-scene[data-scene="2"] {
    place-items: start center;
    padding-top: 48px;
}

.qgv-s3 {
    width: min(980px, 90%);
}

.qgv-tgrid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 18px;
    align-items: start;
}

.qgv-strands,
.qgv-tpills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}

.qgv-strands span {
    padding: 5px 10px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.qgv-strands span.on {
    background: #2b3240;
    border-color: #2b3240;
    color: #fff;
}

.qgv-tpills span {
    padding: 4px 11px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    color: #374151;
}

.qgv-tpills span.on {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

/* the question groups; --acc-max / --acc-pad are the open body's height cap and padding (smaller screens change them) */
.qgv-acclist {
    --acc-max: 140px;
    --acc-pad: 6px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

/* held open while the page measures the cursor's click points (see aimCreate) */
.qgv-m1 .qgv-acc-open .qgv-acc-b,
.qgv-m2 .qgv-acc-open2 .qgv-acc-b {
    max-height: var(--acc-max);
    padding-top: var(--acc-pad);
    padding-bottom: var(--acc-pad);
}

.qgv-acc {
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 6px -4px rgba(17, 24, 39, .15);
}

.qgv-acc-h {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px;
    font-size: 14.5px;
    font-weight: 700;
    color: #111827;
}

.qgv-acc-h em {
    margin-left: auto;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    color: #646b7a;
}

.qgv-acc-h .tog {
    position: relative;
    width: 14px;
    text-align: center;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    color: #4b5563;
}

.qgv-acc-h .tog span {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.qgv-acc-h .minus {
    opacity: 0;
}

.qgv-gcount {
    position: relative;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: #60a5fa;
    opacity: 0;
}

.qgv-gcount i {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-style: normal;
    font-size: 12px;
    color: #fff;
    opacity: 0;
}

.qgv-acc-b {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(4, 26px);
    grid-auto-flow: column;
    column-gap: 6px;
    row-gap: 2px;
    max-height: 0;
    padding: 0 10px;
    border-top: 1px solid transparent;
    overflow: hidden;
}

.qgv-tr {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 13px;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qgv-box {
    position: relative;
    flex: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
}

.qgv-box::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
}

/* the first group opens and gets two ticks; clicking the second group closes the first and opens it for the third tick */
.qgv-scene.on .qgv-acc-open .qgv-acc-b { animation: qgvAccOpen1 7.5s ease forwards; }
.qgv-scene.on .qgv-acc-open .plus { animation: qgvPlusOut1 7.5s linear forwards; }
.qgv-scene.on .qgv-acc-open .minus { animation: qgvMinusIn1 7.5s linear forwards; }
.qgv-scene.on .qgv-acc-open2 .qgv-acc-b { animation: qgvAccOpen2 7.5s ease forwards; }
.qgv-scene.on .qgv-acc-open2 .plus { animation: qgvPlusOut2 7.5s linear forwards; }
.qgv-scene.on .qgv-acc-open2 .minus { animation: qgvMinusIn2 7.5s linear forwards; }
.qgv-scene.on .qgv-tr.t1 { animation: qgvRow1 7.5s linear forwards; }
.qgv-scene.on .qgv-tr.t2 { animation: qgvRow2 7.5s linear forwards; }
.qgv-scene.on .qgv-tr.t3 { animation: qgvRow3 7.5s linear forwards; }
.qgv-scene.on .qgv-tr.t1 .qgv-box { animation: qgvTick1 7.5s linear forwards; }
.qgv-scene.on .qgv-tr.t2 .qgv-box { animation: qgvTick2 7.5s linear forwards; }
.qgv-scene.on .qgv-tr.t3 .qgv-box { animation: qgvTick3 7.5s linear forwards; }
.qgv-scene.on .qgv-tr.t1 .qgv-box::after { animation: qgvTickMark1 7.5s linear forwards; }
.qgv-scene.on .qgv-tr.t2 .qgv-box::after { animation: qgvTickMark2 7.5s linear forwards; }
.qgv-scene.on .qgv-tr.t3 .qgv-box::after { animation: qgvTickMark3 7.5s linear forwards; }
.qgv-scene.on .qgv-acc-open .qgv-gcount { animation: qgvTickMark1 7.5s linear forwards; }
.qgv-scene.on .qgv-acc-open .qgv-gcount .n1 { animation: qgvShow1 7.5s linear forwards; }
.qgv-scene.on .qgv-acc-open .qgv-gcount .n2 { animation: qgvShow2Stay 7.5s linear forwards; }
.qgv-scene.on .qgv-acc-open2 .qgv-gcount { animation: qgvTickMark3 7.5s linear forwards; }
.qgv-scene.on .qgv-acc-open2 .qgv-gcount .n1 { animation: qgvShow3 7.5s linear forwards; }

.qgv-s3-cursor {
    left: 0;
    top: 0;
}

.qgv-scene.on .qgv-s3-cursor {
    animation: qgvCursorS3 7.5s ease forwards;
}

/* right-hand list, a white panel on the grey */
.qgv-cart {
    padding: 12px 10px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 0 0 1px #eef0f3, 0 10px 24px -16px rgba(17, 24, 39, .3);
}

.qgv-cprog {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
}

.qgv-cprog div {
    flex: 1;
    height: 5px;
    border-radius: 99px;
    background: #e5e7eb;
    overflow: hidden;
}

.qgv-cprog div::before {
    content: "";
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: #4caf50;
}

.qgv-scene.on .qgv-cprog div::before {
    animation: qgvFill20 7.5s linear forwards;
}

.qgv-cnt {
    position: relative;
    width: 92px;
    height: 16px;
    font-size: 12px;
    color: #6b7280;
}

.qgv-cnt i {
    position: absolute;
    right: 0;
    top: 0;
    font-style: normal;
    white-space: nowrap;
    opacity: 0;
}

.qgv-cnt .c0 {
    opacity: 1;
}

.qgv-scene.on .qgv-cnt .c0 { animation: qgvShow0 7.5s linear forwards; }
.qgv-scene.on .qgv-cnt .c1 { animation: qgvShow1 7.5s linear forwards; }
.qgv-scene.on .qgv-cnt .c2 { animation: qgvShow2 7.5s linear forwards; }
.qgv-scene.on .qgv-cnt .c3 { animation: qgvShow3 7.5s linear forwards; }

.qgv-citem {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    padding: 7px 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    opacity: 0;
}

.qgv-citem em {
    font-style: normal;
    color: #646b7a;
    letter-spacing: -2px;
}

.qgv-mini {
    flex: none;
    padding: 1px 5px;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    font-weight: 700;
    color: #111827;
}

.qgv-citem b {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #111827;
}

.qgv-citem s {
    text-decoration: none;
    color: #ef4444;
    font-weight: 700;
}

.qgv-scene.on .qgv-citem.i1 { animation: qgvItemIn1 7.5s ease forwards; }
.qgv-scene.on .qgv-citem.i2 { animation: qgvItemIn2 7.5s ease forwards; }
.qgv-scene.on .qgv-citem.i3 { animation: qgvItemIn3 7.5s ease forwards; }

.qgv-cclear {
    margin: 10px 0 0;
    text-align: center;
    font-size: 12px;
    color: #6b7280;
}

/* Create resource under the list, clicked once the third topic is in (cursor travels over from the topic list) */
.qgv-create {
    display: block;
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: #3b82f6;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 6px 14px -8px rgba(17, 24, 39, .35);
}

.qgv-scene.on .qgv-create { animation: qgvCreatePress 7.5s linear forwards; }
/* scene 4 (7s): generated worksheet; New Questions loads fresh sets twice, then Show Answers reveals them */
.qgv-scene[data-scene="3"] {
    place-items: start center;
    padding-top: 26px;
}

.qgv-gen {
    width: 100%;
}

/* New Questions top right, Show Answers just to its left */
.qgv-tools {
    position: relative;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    width: min(680px, 66%);
    margin: 0 auto 10px;
}

.qgv-tbtn {
    padding: 7px 13px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    box-shadow: 0 2px 6px -4px rgba(17, 24, 39, .2);
}

.qgv-tbtn svg {
    width: 13px;
    height: 13px;
    margin: -2px 5px 0 0;
    vertical-align: middle;
}

.qgv-tbtn.dark {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.qgv-tools .qgv-s4-cursor {
    z-index: 5;
}

/* A4 landscape worksheet, styled like the generator's printed sheets */
.qgv-paper {
    display: flex;
    flex-direction: column;
    width: min(680px, 66%);
    aspect-ratio: 297 / 210;
    margin: 0 auto;
    padding: 12px 16px 6px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 0 0 1px #eef0f3, 0 22px 40px -24px rgba(17, 24, 39, .45);
}

.qgv-paper-h {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 5px;
}

.qgv-paper-h img {
    width: 18px;
    height: 18px;
}

.qgv-paper-h em {
    margin-left: auto;
    margin-right: 22%;
    font-style: normal;
    font-size: 12px;
    color: #374151;
}

.qgv-qwrap {
    position: relative;
    flex: 1;
}

.qgv-qset {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid #a3a3a3;
    border-radius: 8px;
    background: #a3a3a3;
    overflow: hidden;
    opacity: 0;
}

.qgv-qset.a {
    opacity: 1;
}

.qgv-q {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 5px 7px 6px;
    background: #fff;
    font-size: 12px;
    line-height: 1.35;
    color: #111827;
}

/* hanging indent: the number sits in the left gutter so wrapped lines start to its right */
.qgv-q p {
    position: relative;
    margin: 0 0 3px;
    padding-left: 24px;
}

.qgv-q p > i {
    position: absolute;
    left: 0;
    top: -2px;
    font-style: normal;
    font-size: 15px;
    color: #111827;
}

/* shape diagrams (area, angles) drawn by the level switch */
.qgv-dg {
    display: block;
    width: 100%;
    max-width: 128px;
    margin-top: 4px;
    font-size: 9px;
    fill: #374151;
}

/* integral limits stacked next to the sign */
.qgv-lim {
    display: inline-flex;
    flex-direction: column;
    margin: 0 2px 0 1px;
    font-size: .72em;
    line-height: 1;
    vertical-align: middle;
}

.qgv-ans {
    margin-top: auto;
    align-self: flex-end;
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
    opacity: 0;
}

.qgv-paper-f {
    position: relative;
    height: 12px;
    margin-top: 4px;
    font-size: 7.5px;
    color: #646b7a;
}

.qgv-paper-f span:first-child {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.qgv-paper-f span:last-child {
    position: absolute;
    right: 4px;
}
/* 1.5s intro: the worksheet arrives blank with loading bars and the first questions fade in (carrying on from step 3), then the 7s clip runs after a 1.5s delay */
.qgv-scene.on .qgv-paper { animation: qgvPaperIn .5s ease both; }
.qgv-scene.on .qgv-qset.a { animation: qgvSetA 7s linear 1.5s both; }
.qgv-scene.on .qgv-qset.b { animation: qgvSetB 7s linear 1.5s both; }
.qgv-scene.on .qgv-qset.c { animation: qgvSetC 7s linear 1.5s both; }
.qgv-scene.on .qgv-qset.c .qgv-ans { animation: qgvAnsIn 7s ease 1.5s both; }
/* question swap: each New Questions click (23% and 43% of the 7s clip) crossfades to the next set showing pale loading bars, then its questions fade in together */
.qgv-qset .qgv-q::after {
    content: "";
    position: absolute;
    top: 9px;
    left: 31px;
    width: 55%;
    height: 7px;
    border-radius: 4px;
    background: #f3f4f6;
    box-shadow: 0 13px 0 -1px #f3f4f6;
    pointer-events: none;
}
.qgv-scene.on .qgv-qset.a .qgv-q > p { animation: qgvCellIn .45s ease 1s both; }
.qgv-scene.on .qgv-qset.a .qgv-q::after { animation: qgvSkelOut .45s ease 1s forwards; }
.qgv-scene.on .qgv-qset.b .qgv-q > p { animation: qgvCellIn .45s ease 3.6s both; }
.qgv-scene.on .qgv-qset.b .qgv-q::after { animation: qgvSkelOut .45s ease 3.6s forwards; }
.qgv-scene.on .qgv-qset.c .qgv-q > p { animation: qgvCellIn .45s ease 5s both; }
.qgv-scene.on .qgv-qset.c .qgv-q::after { animation: qgvSkelOut .45s ease 5s forwards; }
.qgv-scene.on .qgv-newq { animation: qgvNewPress 7s linear 1.5s both; }
.qgv-scene.on .qgv-showans { animation: qgvAnsBtn 7s linear 1.5s both; }
/* after the answers show: cursor goes to Print (6.9s) and clicks; the walkthrough then loops back to step 1 */
.qgv-scene.on .qgv-s4-cursor { animation: qgvCursorGen 7s ease 1.5s both, qgvCursorPrint .8s ease 6.9s forwards; }
.qgv-scene.on .qgv-print { animation: qgvBtnPress .3s linear 7.5s; }
/* tabs underneath with progress lines */
.qgv-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 28px;
}

.qgv-tab {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.qgv-line {
    display: block;
    height: 5px;
    border-radius: 99px;
    background: #eceef3;
    overflow: hidden;
    margin-bottom: 16px;
}

.qgv-line i {
    display: block;
    height: 100%;
    width: 0;
    background: #8a91a1;
}

.qgv-tab.on .qgv-line i {
    animation: qgvProgress 6s linear forwards;
}

.qgv-tab.done .qgv-line i {
    width: 100%;
}

/* hovered or focused: the step's own animation plays out, but the progress line (and the move to the next step) waits */
.qgv.paused .qgv-tab.on .qgv-line i {
    animation-play-state: paused;
}

/* another walkthrough on the page is playing (js/walkthroughs.js): everything here stops where it is until it's this one's turn */
.qgv.away *,
.qgv.away *::before,
.qgv.away *::after {
    animation-play-state: paused !important;
}

.qgv-tab:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 6px;
    border-radius: 6px;
}

/* step title: every step's text stays full strength; the filling line shows which one is playing */
.qgv-tab b {
    display: block;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

/* description lines up with the title, full width */
.qgv-tab > span:not(.qgv-line) {
    display: block;
    font-size: 14.5px;
    line-height: 1.5;
    color: #4b5563;
    text-wrap: pretty;
}

/* keyframes (all run over the 6 second clip) */
@keyframes qgvProgress { from { width: 0; } to { width: 100%; } }
@keyframes qgvCursorIn {
    0% { opacity: 0; transform: translate(-220px, 140px); }
    10% { opacity: 1; }
    34% { transform: translate(0, 0); }
    37% { transform: scale(.82); }
    41%, 100% { opacity: 1; transform: scale(1); }
}

@keyframes qgvCursorHover {
    0% { opacity: 0; transform: translate(calc(var(--hx, 0px) - 160px), calc(var(--hy, 0px) + 130px)); }
    8% { opacity: 1; }
    25%, 34% { transform: translate(var(--hx, 0px), var(--hy, 0px)); }
    54% { transform: translate(0, 0); }
    58% { transform: translate(0, 0) scale(.82); }
    62%, 100% { opacity: 1; transform: translate(0, 0); }
}
@keyframes qgvCardHover {
    0%, 22% { transform: none; z-index: 1; box-shadow: 0 0 0 1px #eef0f3, 0 6px 16px -8px rgba(17, 24, 39, .22); }
    26%, 35% { transform: translateY(-4px) scale(1.07); z-index: 2; box-shadow: 0 0 0 2px #93c5fd, 0 18px 30px -14px rgba(37, 99, 235, .45); }
    42%, 100% { transform: none; z-index: 1; box-shadow: 0 0 0 1px #eef0f3, 0 6px 16px -8px rgba(17, 24, 39, .22); }
}
@keyframes qgvLabelHover { 0%, 23% { color: #1f2937; } 26%, 36% { color: #2563eb; } 40%, 100% { color: #1f2937; } }
@keyframes qgvCardPick {
    0%, 51% { transform: none; z-index: 1; background: #fff; box-shadow: 0 0 0 1px #eef0f3, 0 6px 16px -8px rgba(17, 24, 39, .22); }
    54%, 57% { transform: translateY(-4px) scale(1.07); z-index: 2; background: #fff; box-shadow: 0 0 0 2px #93c5fd, 0 18px 30px -14px rgba(37, 99, 235, .45); }
    61%, 100% { transform: translateY(-2px) scale(1.04); z-index: 2; background: #4f80ef; box-shadow: 0 0 0 1px #4f80ef, 0 16px 30px -14px rgba(79, 128, 239, .55); }
}
@keyframes qgvLabelPick { 0%, 57% { color: #1f2937; } 61%, 100% { color: #fff; } }@keyframes qgvPaperIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes qgvSetA { 0%, 23% { opacity: 1; } 27%, 100% { opacity: 0; } }
@keyframes qgvSetB { 0%, 23% { opacity: 0; } 27%, 43% { opacity: 1; } 47%, 100% { opacity: 0; } }
@keyframes qgvSetC { 0%, 43% { opacity: 0; } 47%, 100% { opacity: 1; } }
@keyframes qgvCellIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes qgvSkelOut { to { opacity: 0; } }
@keyframes qgvAnsIn { 0%, 60% { opacity: 0; transform: translateY(3px); } 64%, 100% { opacity: 1; transform: none; } }
@keyframes qgvNewPress {
    0%, 21% { transform: none; }
    23% { transform: scale(.95); }
    25%, 41% { transform: none; }
    43% { transform: scale(.95); }
    45%, 100% { transform: none; }
}
@keyframes qgvAnsBtn {
    0%, 58% { transform: none; background: #fff; border-color: #e5e7eb; color: #374151; }
    60% { transform: scale(.95); background: #fff; border-color: #e5e7eb; color: #374151; }
    62%, 100% { transform: none; background: #3b82f6; border-color: #3b82f6; color: #fff; }
}
@keyframes qgvCursorGen {
    0% { opacity: 0; transform: translate(-140px, 160px); }
    6% { opacity: 1; }
    20% { transform: translate(0, 0); }
    23% { transform: translate(0, 0) scale(.82); }
    26%, 40% { transform: translate(0, 0); }
    43% { transform: translate(0, 0) scale(.82); }
    46% { transform: translate(0, 0); }
    57% { transform: translate(var(--ax, 0px), var(--ay, 0px)); }
    60% { transform: translate(var(--ax, 0px), var(--ay, 0px)) scale(.82); }
    63%, 100% { opacity: 1; transform: translate(var(--ax, 0px), var(--ay, 0px)); }
}@keyframes qgvLevelOn {
    0%, 37% { background: #fff; color: #1f2937; box-shadow: 0 0 0 1px #eef0f3, 0 6px 16px -8px rgba(17, 24, 39, .22); }
    40%, 100% { background: #4f80ef; color: #fff; box-shadow: 0 0 0 1px #4f80ef, 0 10px 24px -8px rgba(79, 128, 239, .55); }
}
@keyframes qgvCursorS3 {
    0% { opacity: 0; transform: translate(-120px, 200px); }
    8% { opacity: 1; }
    /* every click point is measured by the page (aimCreate); the fallbacks are the desktop layout */
    15% { transform: translate(var(--h1x, 140px), var(--h1y, 12px)); }
    17% { transform: translate(var(--h1x, 140px), var(--h1y, 12px)) scale(.82); }
    19% { transform: translate(var(--h1x, 140px), var(--h1y, 12px)); }
    /* first group: its two ticked rows */
    27% { transform: translate(var(--t1x, 22px), var(--t1y, 107px)); }
    29% { transform: translate(var(--t1x, 22px), var(--t1y, 107px)) scale(.82); }
    31% { transform: translate(var(--t1x, 22px), var(--t1y, 107px)); }
    37% { transform: translate(var(--t2x, 22px), var(--t2y, 79px)); }
    39% { transform: translate(var(--t2x, 22px), var(--t2y, 79px)) scale(.82); }
    41% { transform: translate(var(--t2x, 22px), var(--t2y, 79px)); }
    /* second group header (first group fully open above it) */
    48% { transform: translate(var(--h2x, 140px), var(--h2y, 178px)); }
    50% { transform: translate(var(--h2x, 140px), var(--h2y, 178px)) scale(.82); }
    52% { transform: translate(var(--h2x, 140px), var(--h2y, 178px)); }
    /* its ticked row, once the first group has closed */
    62% { transform: translate(var(--t3x, 22px), var(--t3y, 123px)); }
    64% { transform: translate(var(--t3x, 22px), var(--t3y, 123px)) scale(.82); }
    66% { transform: translate(var(--t3x, 22px), var(--t3y, 123px)); }
    76% { transform: translate(var(--bx, var(--t3x, 22px)), var(--by, var(--t3y, 123px))); }
    78% { transform: translate(var(--bx, var(--t3x, 22px)), var(--by, var(--t3y, 123px))) scale(.82); }
    80%, 100% { opacity: 1; transform: translate(var(--bx, var(--t3x, 22px)), var(--by, var(--t3y, 123px))); }
}
@keyframes qgvCursorPrint {
    0% { transform: translate(var(--ax, 0px), var(--ay, 0px)); }
    75% { transform: translate(var(--px, 0px), var(--py, 0px)); }
    88% { transform: translate(var(--px, 0px), var(--py, 0px)) scale(.82); }
    100% { opacity: 1; transform: translate(var(--px, 0px), var(--py, 0px)); }
}
@keyframes qgvBtnPress { 50% { transform: scale(.95); } }
@keyframes qgvCreatePress {
    0%, 77% { transform: none; filter: none; }
    78.5% { transform: scale(.95); filter: brightness(.94); }
    81%, 100% { transform: none; filter: none; }
}
/* scene 3 clicks: first group 17%, ticks 29% and 39%, second group 50%, tick 64%, Create resource 78% */
@keyframes qgvAccOpen1 {
    0%, 17% { max-height: 0; padding-top: 0; padding-bottom: 0; border-top-color: transparent; }
    23%, 50% { max-height: var(--acc-max); padding-top: var(--acc-pad); padding-bottom: var(--acc-pad); border-top-color: #f1f2f4; }
    56%, 100% { max-height: 0; padding-top: 0; padding-bottom: 0; border-top-color: transparent; }
}
@keyframes qgvAccOpen2 {
    0%, 50% { max-height: 0; padding-top: 0; padding-bottom: 0; border-top-color: transparent; }
    56%, 100% { max-height: var(--acc-max); padding-top: var(--acc-pad); padding-bottom: var(--acc-pad); border-top-color: #f1f2f4; }
}
@keyframes qgvPlusOut1 { 0%, 17% { opacity: 1; } 18%, 50% { opacity: 0; } 51%, 100% { opacity: 1; } }
@keyframes qgvMinusIn1 { 0%, 17% { opacity: 0; } 18%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
@keyframes qgvPlusOut2 { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
@keyframes qgvMinusIn2 { 0%, 50% { opacity: 0; } 51%, 100% { opacity: 1; } }
@keyframes qgvTick1 { 0%, 29% { background: #fff; border-color: #cbd5e1; } 30.5%, 100% { background: #3b82f6; border-color: #3b82f6; } }
@keyframes qgvTick2 { 0%, 39% { background: #fff; border-color: #cbd5e1; } 40.5%, 100% { background: #3b82f6; border-color: #3b82f6; } }
@keyframes qgvTick3 { 0%, 64% { background: #fff; border-color: #cbd5e1; } 65.5%, 100% { background: #3b82f6; border-color: #3b82f6; } }
@keyframes qgvTickMark1 { 0%, 29% { opacity: 0; } 30.5%, 100% { opacity: 1; } }
@keyframes qgvTickMark2 { 0%, 39% { opacity: 0; } 40.5%, 100% { opacity: 1; } }
@keyframes qgvTickMark3 { 0%, 64% { opacity: 0; } 65.5%, 100% { opacity: 1; } }
@keyframes qgvRow1 { 0%, 29% { background: transparent; } 30.5%, 100% { background: #eff6ff; } }
@keyframes qgvRow2 { 0%, 39% { background: transparent; } 40.5%, 100% { background: #eff6ff; } }
@keyframes qgvRow3 { 0%, 64% { background: transparent; } 65.5%, 100% { background: #eff6ff; } }
@keyframes qgvShow0 { 0%, 29% { opacity: 1; } 30.5%, 100% { opacity: 0; } }
@keyframes qgvShow1 { 0%, 29% { opacity: 0; } 30.5%, 39% { opacity: 1; } 40.5%, 100% { opacity: 0; } }
@keyframes qgvShow2 { 0%, 39% { opacity: 0; } 40.5%, 64% { opacity: 1; } 65.5%, 100% { opacity: 0; } }
@keyframes qgvShow2Stay { 0%, 39% { opacity: 0; } 40.5%, 100% { opacity: 1; } }
@keyframes qgvShow3 { 0%, 64% { opacity: 0; } 65.5%, 100% { opacity: 1; } }
@keyframes qgvFill20 { 0%, 29% { width: 0; } 30.5%, 39% { width: 8.3%; } 40.5%, 64% { width: 16.7%; } 65.5%, 100% { width: 25%; } }
@keyframes qgvItemIn1 { 0%, 30% { opacity: 0; transform: translateY(-4px); } 34%, 100% { opacity: 1; transform: none; } }
@keyframes qgvItemIn2 { 0%, 40% { opacity: 0; transform: translateY(-4px); } 44%, 100% { opacity: 1; transform: none; } }
@keyframes qgvItemIn3 { 0%, 65% { opacity: 0; transform: translateY(-4px); } 69%, 100% { opacity: 1; transform: none; } }
@media (max-width: 900px) {
    .qgv-frame {
        aspect-ratio: 4 / 3;
    }

    .qgv-win {
        width: 90%;
        padding: 18px 18px 22px;
    }

    .qgv-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }


    .qgv-tgrid {
        grid-template-columns: minmax(0, 1fr);
    }

    /* step 1: the card grid fills the frame rather than the screen */
    .qgv-scene[data-scene="0"] > div {
        width: 100%;
        padding: 0 4%;
        box-sizing: border-box;
    }

    .qgv-types {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .qgv-tcard .im {
        height: 56px;
    }

    .qgv-tcard b {
        font-size: 12px;
    }

    .qgv-lrow {
        flex-wrap: wrap;
        gap: 10px;
    }

    .qgv-levels {
        gap: 10px;
    }

    .qgv-lv {
        padding: 10px 18px;
        font-size: 15px;
        border-radius: 16px;
    }

    /* step 3: no room for the right column, so the list becomes a bar along the bottom (progress + Create resource) over the topics */
    .qgv-cartcol {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 3;
        display: flex;
        gap: 8px;
        padding: 10px 4% 14px;
        background: #eef1f8;
    }

    .qgv-cart {
        flex: 1;
        display: flex;
        align-items: center;
        padding: 8px 12px;
    }

    .qgv-cprog {
        flex: 1;
        margin: 0;
    }

    .qgv-citem,
    .qgv-cclear {
        display: none;
    }

    .qgv-create {
        display: flex;
        align-items: center;
        margin-top: 0;
        padding: 0 16px;
        white-space: nowrap;
    }
}

@media (max-width: 600px) {
    .qgv-frame {
        aspect-ratio: 2 / 3;
        border-radius: 18px;
    }

    .qgv-levelsw button {
        padding: 7px 14px;
        font-size: 13px;
    }

    .qgv-thead.qgv-thead-c {
        margin-bottom: 14px;
    }

    .qgv-thead.qgv-thead-c b {
        font-size: 12px;
        text-align: center;
    }

    /* step 1 */
    .qgv-tcard {
        padding: 6px 6px 7px;
        border-radius: 11px;
    }

    .qgv-tcard .im {
        height: 52px;
        border-radius: 7px;
    }

    .qgv-tcard b {
        margin-top: 5px;
        font-size: 12px;
        line-height: 1.25;
    }

    /* step 2 */
    .qgv-lv {
        padding: 9px 14px;
        font-size: 13.5px;
        border-radius: 14px;
    }

    /* step 3: one column of six topics per group, the topic pills on a single line that fades off the edge, strands hidden */
    .qgv-scene[data-scene="2"] {
        padding-top: 18px;
    }

    .qgv-s3 {
        width: 92%;
    }

    .qgv-strands {
        display: none;
    }

    .qgv-tpills {
        flex-wrap: nowrap;
        overflow: hidden;
        -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
        mask-image: linear-gradient(90deg, #000 82%, transparent);
    }

    .qgv-tpills span {
        flex: none;
        padding: 3px 10px;
        font-size: 12px;
    }

    .qgv-acclist {
        --acc-max: 170px;
        --acc-pad: 4px;
        gap: 6px;
    }

    .qgv-acc-h {
        height: 32px;
        padding: 0 12px;
        font-size: 13px;
    }

    .qgv-acc-h em {
        display: none;
    }

    .qgv-acc-h .tog {
        margin-left: auto;
    }

    .qgv-acc-b {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        grid-auto-rows: 24px;
        grid-auto-flow: row;
        padding: 0 8px;
    }

    .qgv-tr {
        font-size: 12.5px;
    }

    .qgv-tr:nth-child(n+7) {
        display: none;
    }

    .qgv-cartcol {
        padding: 8px 4% 12px;
    }

    .qgv-cart {
        padding: 7px 10px;
    }

    .qgv-cnt {
        width: 86px;
        font-size: 12px;
    }

    .qgv-create {
        padding: 0 12px;
        font-size: 12px;
    }

    /* step 4: portrait sheet with six questions in two columns, so the text stays readable */
    .qgv-scene[data-scene="3"] {
        padding-top: 14px;
    }

    .qgv-paper,
    .qgv-tools {
        width: 88%;
    }

    .qgv-paper {
        aspect-ratio: 210 / 297;
        padding: 10px 12px 6px;
    }

    .qgv-tools {
        gap: 6px;
        margin-bottom: 8px;
    }

    .qgv-tbtn {
        padding: 6px 9px;
        font-size: 12px;
        border-radius: 8px;
    }

    .qgv-tbtn svg {
        width: 11px;
        height: 11px;
        margin-right: 4px;
    }

    .qgv-qset {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qgv-q:nth-child(n+7) {
        display: none;
    }

    .qgv-q {
        padding: 6px 8px 7px;
        font-size: 12px;
    }

    .qgv-q p {
        padding-left: 18px;
    }

    .qgv-q p > i {
        font-size: 13px;
    }

    .qgv-qset .qgv-q::after {
        left: 26px;
    }

    .qgv-ans {
        font-size: 12px;
    }

    /* steps under the video: stacked in one column with their descriptions, so each can be read; the current one is dark with its line filling */
    .qgv-tabs {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 22px;
    }

    .qgv-line {
        margin-bottom: 10px;
    }

    .qgv-tab b {
        margin-bottom: 2px;
        font-size: 16px;
    }

    .qgv-tab > span:not(.qgv-line) {
        font-size: 14px;
    }
}

/* a topic list that has more than fits ends with a "…" row, without a tick box */
.qgv-more .qgv-box{visibility:hidden}
.qgv-more{color:#8a91a3}

/* ==========================================================================
   qc-walk (was css/qc-walk.css)
   ========================================================================== */
/* The Quick Cover hero walkthrough (script: js/walkthroughs.js), used on quickcover.php and quickcover-secondary.php.
   A tour of one pack on a fixed 600x400 canvas scaled to fit. Each printed sheet (A4 landscape, 400x283, drawn and filled
   by the page) comes in large with a grey note and one thin arrow underneath explaining it, and a blue outline on the
   part that matters; then it moves back into a fan, where the sheets are named. Holds, fades, starts again. The sheets'
   own content is styled on each page. Reduced motion: the finished, named fan. */
/* the hero heading's second half in grey ("Cover lessons. Anyone can teach."), as on the Quick Print pages */
body.skills .lh h1 .g{color:var(--grey)}
/* the bare .stage only on pages with a Quick Cover tour (:where keeps the old, low specificity) */
:where(body:has(.cv.qc)) .stage{position:relative;width:100%;aspect-ratio:600/400}
.cv.qc{position:absolute;left:0;top:0;width:600px;height:400px;transform:scale(var(--s,1));transform-origin:0 0;font:12px/1.4 "Roboto",system-ui,sans-serif;color:#1f2330}
/* a sheet: A4 landscape, placed and turned about its centre by the script */
.qc-sheet{position:absolute;left:0;top:0;width:400px;height:283px;transform-origin:200px 141.5px;border-radius:4px;background:#fff;box-shadow:0 1px 2px rgba(20,26,46,.12),0 18px 32px -16px rgba(20,26,46,.38);opacity:0;transition:transform .8s cubic-bezier(.3,.7,.2,1),opacity .45s}
.qc-foot{position:absolute;left:0;right:0;bottom:5px;text-align:center;font-size:6.5px;color:#777}
/* the blue outline on the part being talked about: placed over it by the script, and moved from part to part */
.qc-box{position:absolute;z-index:2;border:2.5px solid #3d5afe;border-radius:8px;opacity:0;transform:scale(1.04);transition:opacity .35s,transform .35s,left .45s cubic-bezier(.4,0,.2,1),top .45s cubic-bezier(.4,0,.2,1),width .45s cubic-bezier(.4,0,.2,1),height .45s cubic-bezier(.4,0,.2,1);pointer-events:none}
.qc-box.on{opacity:1;transform:none}
/* grey notes, each with one thin arrow drawn in to the part it explains */
.qc-n{position:absolute;z-index:10;font:600 17px/1.3 "Roboto",system-ui,sans-serif;color:#6b7284;opacity:0;transform:translateY(3px);transition:opacity .3s,transform .3s}
.qc-n.on{opacity:1;transform:none}
.qc-ink{position:absolute;inset:0;z-index:10;width:600px;height:400px;pointer-events:none;overflow:visible}
/* an arrow draws in when it appears; when it goes it fades, and only rewinds once it's out of sight (no drawing backwards) */
.qc-ink path{fill:none;stroke:#9aa1b1;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1;opacity:0;transition:opacity .2s,stroke-dashoffset 0s linear .3s}
.qc-ink path.on{stroke-dashoffset:0;opacity:1;transition:opacity .1s,stroke-dashoffset .45s ease-out}
/* the end of a loop: everything fades; while it resets, nothing animates */
.cv.qc.out>*{opacity:0!important;transition:opacity .5s}
.cv.qc.snap *{transition:none!important}
@media (prefers-reduced-motion:reduce){.cv.qc *{transition:none!important}}

/* ==================== Primary pack: Area and Perimeter 1 (was css/qc-ap1.css; js/walkthroughs.js), quickcover.php and mathsbox-primary.php ==================== */
/* The Area and Perimeter (1) Quick Cover pack drawn for the tour (js/walkthroughs.js with js/walkthroughs.js and css/qc-walk.css),
   used on quickcover.php and mathsbox-primary.php. Its notes use the shared walkthrough note style (css/qc-walk.css). */
/* rectangles, with their side labels outside them and any writing inside */
.pr{position:relative;display:grid;place-items:center;flex:none;border:1px solid #222;font-family:Arial,Helvetica,sans-serif;text-align:center;line-height:1.1}
.pr i{position:absolute;font-style:normal;white-space:nowrap}
.pr .t{bottom:100%;left:0;right:0;padding-bottom:1px}
.pr .l{right:100%;top:50%;transform:translateY(-50%);padding-right:2px}
.pr .b{top:100%;left:0;right:0;padding-top:1px}
/* this tour's arrows a little heavier (the Secondary tour keeps the thinner ones above) */
.cv.qc:has(.ph) .qc-ink path{stroke:#7d8496;stroke-width:2.2}
/* 1 help and hints: a worked example for each task, in a clean sans (shown larger than the other sheets) */
.ph{padding:11px 16px;font:500 8.6px/1.35 "Roboto",system-ui,sans-serif;color:#1f2330}
.ph-g{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:0 22px}
.ph-t{font-size:15px;font-weight:800;line-height:1;letter-spacing:-.02em;margin-bottom:7px}
.ph-r{margin:2px 0 8px;font:800 12px/1 "Roboto",system-ui,sans-serif;letter-spacing:-.01em}
.ph-k{margin-bottom:8px}
.ph-k h4{margin:0 0 2px;font:800 8.5px/1.2 "Roboto",system-ui,sans-serif;letter-spacing:.06em;color:#3d5afe}
.ph-k p{margin:0}
.ph-k b{font-weight:800}
.ph-row{display:flex;align-items:center;gap:22px;margin-top:8px}
.ph-row p{font-weight:600}
.ph .pr{font:600 7px/1.1 "Roboto",system-ui,sans-serif}
.ph .pr i{font-size:7px}
/* 2 and 3 the question pages: two bordered halves, a task in each, 15 rectangles in a 3 by 5 grid */
.pq{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:8px 9px 15px}
.pq-h{position:relative;display:flex;flex-direction:column;padding:4px 6px 2px;border:1px solid #222}
.pq-k{font:900 12px/1.05 "Roboto",system-ui,sans-serif;letter-spacing:-.01em}
.pq-k.r{text-align:right}
.pq-x{margin:1px 0 2px;font-size:6px;font-family:Arial,Helvetica,sans-serif}
.pq-g{flex:1;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(5,1fr)}
.pq-c{position:relative;display:grid;place-items:center;font-family:Arial,Helvetica,sans-serif}
.pq-c>b{position:absolute;left:0;top:0;font-size:5.5px;font-weight:400}
.pq-c>em{position:absolute;left:6px;top:0;font-size:5px;font-style:normal;font-weight:700}
.pq .pr{font-size:3.6px}
.pq .pr i{font-size:4.6px}
/* 4 the answers: four tasks side by side, answers in red as on the real sheet */
.pa{padding:12px 14px 10px}
.pa-t{font:900 15px/1 "Roboto",system-ui,sans-serif;letter-spacing:-.01em}
.pa-s{margin:3px 0 2px;font:italic 7px Arial,Helvetica,sans-serif;color:#e0201b}
.pa-g{display:grid;grid-template-columns:repeat(4,1fr);border:1.2px solid #222}
.pa-c+.pa-c{border-left:1.2px solid #222}
.pa-c h4{margin:0;padding:2px 5px;border-bottom:1.2px solid #222;font:900 12px/1.2 "Roboto",system-ui,sans-serif}
.pa-c ol{margin:0;padding:1px 5px 2px;list-style:none;counter-reset:q}
.pa-c li{counter-increment:q;font:7.5px/13px Arial,Helvetica,sans-serif;color:#e0201b;white-space:nowrap}
.pa-c li::before{content:counter(q) ".";display:inline-block;width:17px;font-weight:700;font-style:italic;color:#1f2330}

/* ==================== Secondary pack: Solving Equations 3 (was css/qc-se3.css; js/walkthroughs.js), quickcover-secondary.php and mathsbox-secondary.php ==================== */
/* The Secondary Quick Cover pack (Solving Equations 3) drawn for the tour (js/walkthroughs.js + js/walkthroughs.js), on quickcover-secondary.php
   and mathsbox-secondary.php. Moved here from quickcover-secondary.php. */
/* ---------- the walkthrough: a tour of one pack (Solving Equations 3, as fr/images/qc3.svg), played by js/walkthroughs.js with
   css/qc-walk.css (shared with quickcover.php). The three printed sheets (A4 landscape) are drawn here and filled from the
   real pack by the script at the bottom. ---------- */
/* 1 the hints sheet: a worked example for each task, in the handwriting-style print of the real one */
.qh{padding:13px 18px;font-family:"Patrick Hand",cursive}
.qh-t{font-size:22px;line-height:1}
.qh-s{margin:3px 0 9px;font-size:12px;color:#333}
.qh-g{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:10px 22px}
.qh-k{position:relative}
.qh-k h4{margin:0 0 3px;font:800 12px/1.2 "Roboto",system-ui,sans-serif;letter-spacing:.03em}
.qh-k p{display:flex;justify-content:space-between;margin:0;font-size:13.5px;line-height:1.28}
.qh-k p small{font-size:12px;color:#6b6b6b}
.qh-k p:last-child span{padding:0 4px;border:1px solid #222;border-radius:3px}
/* 2 the questions sheet and 3 the answer sheet: four tasks side by side, ten shown in each */
.qq{padding:12px 14px 10px}
.qq-t{font-size:14px;font-weight:800;letter-spacing:-.01em}
.qq-g{position:relative;display:grid;grid-template-columns:repeat(4,1fr);margin-top:6px;border:1.2px solid #222}
.qq-c+.qq-c{border-left:1.2px solid #222}
.qq-c h4{margin:0;padding:3px 6px;border-bottom:1.2px solid #222;font-size:12px;font-weight:800;letter-spacing:.02em}
.qq-c ol{margin:0;padding:3px 6px 4px;list-style:none;counter-reset:q}
.qq-c li{counter-increment:q;font-size:7.8px;line-height:19.5px;white-space:nowrap}
.qq-c li::before{content:counter(q) ".";display:inline-block;width:15px;font-weight:700;font-style:italic}

/* ==========================================================================
   tarsia-walk (was css/tarsia-walk.css)
   ========================================================================== */
/* The Tarsia hero walkthrough (script: js/walkthroughs.js), used on alevel-tarsias.php and puzzleschallenges-secondary.php.
   A fixed 600x480 canvas scaled to fit. 16 paper triangles like the real ones (images/tarsia-hero.png: a question or answer
   along each inside edge, tops of the letters towards the middle, outside edges blank) are taken from a jumbled pile on the
   left and fitted into the big triangle. Cards are drawn as 130px triangles and shown at 112px; all built by the script. */
/* the bare .stage and .cv only on pages with a Tarsia tour (:where keeps the old, low specificity) */
:where(body:has(.cv.q-ts)) .stage{position:relative;width:100%;aspect-ratio:600/480}
:where(body:has(.cv.q-ts)) .cv{position:absolute;left:0;top:0;width:600px;height:480px;transform:scale(var(--s,1));transform-origin:0 0;overflow:visible;background:none;font:14px/1.4 "Roboto",system-ui,sans-serif;color:var(--ink)}
.ts-ttl{position:absolute;right:18px;top:20px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#646b7a}
/* a card: an up-pointing triangle in its own frame, turned about its centre (65, 75.05); down cards are turned 180°.
   Paper: a thin printed line at the cut edge, a low shadow on the table, a higher one while it's held */
.ts-card{position:absolute;left:0;top:0;width:130px;height:112.58px;transform-origin:65px 75.05px;opacity:0;will-change:transform;filter:drop-shadow(0 .5px .6px rgba(20,26,46,.22)) drop-shadow(0 2px 3px rgba(20,26,46,.1));transition:filter .25s}
.ts-card.lift{filter:drop-shadow(0 1px 1px rgba(20,26,46,.15)) drop-shadow(0 12px 12px rgba(20,26,46,.22))}
.ts-card.set{filter:drop-shadow(0 .5px .5px rgba(20,26,46,.18))}
.ts-card svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.ts-card polygon{fill:#fff;stroke:#4a4f5c;stroke-width:.6;stroke-linejoin:miter}
/* edge labels: 84x18, centred 13px inside each edge's midpoint, turned so the tops of the letters face the middle */
.ts-e{position:absolute;width:84px;height:18px;display:grid;place-items:center;font-size:12px;line-height:1;white-space:nowrap;color:#1f2330}
.ts-e.b{left:23px;top:90.58px}
.ts-e.l{left:1.76px;top:53.79px;transform:rotate(120deg)}
.ts-e.r{left:44.24px;top:53.79px;transform:rotate(-120deg)}
/* plain-text cards (no MathJax): the page font, with numbers that line up */
.q-ts.txt .ts-e{font-size:13px;font-weight:500;font-variant-numeric:tabular-nums;letter-spacing:-.01em}
/* until MathJax has typeset the cards, hide their text (raw TeX looks broken); the script adds .mj */
.q-ts:not(.mj) .ts-e{color:transparent}

/* ==========================================================================
   qg-make-walk (was css/qg-make-walk.css)
   ========================================================================== */
/* The Primary "Your own resources" walkthrough (script: js/walkthroughs.js), in the Question Generator feature on mathsbox-primary.php.
   A fixed 720x440 canvas scaled to fit, shown bare (no coloured panel). Step by step, with a cursor:
   1. a list of area and perimeter structures, each with a checkbox, fading into "900+ question structures to choose
      from"; the cursor quickly ticks three (green tick)
   2. the worksheet as the generator prints it (logo, Name, 12 questions with diagrams in a 4 x 3 grid, footer);
      New Questions reloads it, then Show Answers adds the answers
   3. the format pill changes to 4 Questions to Project and the dark projector slide comes in; New Questions, then
      Show Answers
   About 17 seconds a loop. */
.qm-stage{position:relative;width:100%;aspect-ratio:720/440}
.cv.qm-cv{position:absolute;left:0;top:0;width:720px;height:440px;transform:scale(var(--s,1));transform-origin:0 0;font-family:"Roboto",system-ui,sans-serif;color:#1f2330;transition:opacity .35s}
.cv.qm-cv.fade{opacity:0}
.qm-sc{position:absolute;inset:0;opacity:0;visibility:hidden;transition:opacity .45s,visibility 0s .45s}
.qm-sc.on{opacity:1;visibility:visible;transition:opacity .45s}
.qm-cv .press{transform:scale(.94)!important}

/* step 1: the structure cards one under another, fading out at the bottom into "900+ question structures to choose from" */
.qm-cards{position:absolute;left:130px;width:460px;top:0;display:flex;flex-direction:column;gap:6px;-webkit-mask-image:linear-gradient(#000 75%,transparent);mask-image:linear-gradient(#000 75%,transparent)}
.qm-card{position:relative;display:flex;align-items:center;gap:14px;height:38px;box-sizing:border-box;padding:0 16px;border:1.5px solid #e3e6ee;border-radius:11px;background:#fff;transition:border-color .15s,background .15s}
.qm-more{position:absolute;left:130px;width:460px;top:404px;margin:0;text-align:center;font-size:16px;font-weight:700;color:#4a5268}
.qm-more b{font-weight:800;color:#3d5afe}
.qm-card b{font-size:16.5px;font-weight:700;letter-spacing:-.01em;color:#141a2e;white-space:nowrap}
.qm-box{flex:none;display:grid;place-items:center;width:20px;height:20px;box-sizing:border-box;border-radius:5px;border:1.5px solid #c4c9d4;background:#fff;transition:background .15s,border-color .15s}
.qm-box svg{width:12px;height:12px;fill:none;stroke:#fff;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:round;opacity:0;transform:scale(.4);transition:opacity .15s,transform .25s cubic-bezier(.3,1.5,.5,1)}
.qm-card.on{border-color:#22c55e;background:#f0fdf4}
.qm-card.on .qm-box{background:#22c55e;border-color:#22c55e}
.qm-card.on .qm-box svg{opacity:1;transform:none}

/* the format pill over steps 2 and 3 */
.qm-fmt{position:absolute;left:79px;top:0;display:grid;height:32px;font-size:16px;font-weight:800;letter-spacing:-.02em;color:#141a2e;opacity:0;transition:opacity .35s}
.qm-fmt i{grid-area:1/1;align-self:center;font-style:normal;white-space:nowrap;transition:opacity .3s}
.qm-fmt i+i{opacity:0}
.qm-cv.ws .qm-fmt{opacity:1}
.qm-cv.proj .qm-fmt i:first-child{opacity:0}
.qm-cv.proj .qm-fmt i+i{opacity:1}

/* Show / Hide Answers: both labels stacked, the button keeps the wider one's width */
.qm-ans,.qm-pans{display:inline-grid!important}
.qm-ans b,.qm-pans b{grid-area:1/1;align-self:center;font-weight:inherit;transition:opacity .2s}
.qm-ans b+b,.qm-pans b+b{opacity:0}
.qm-ans.act b:first-child,.qm-pans.act b:first-child{opacity:0}
.qm-ans.act b+b,.qm-pans.act b+b{opacity:1}

/* step 2: the worksheet (as css/qg-walkthrough.css .qgv-paper, the generator's printed A4 landscape sheet) */
.qm-tools{position:absolute;right:77px;top:0;display:flex;gap:8px}
.qm-tools>span{display:inline-flex;align-items:center;gap:5px;height:32px;box-sizing:border-box;padding:0 13px;border:1px solid #e5e7eb;border-radius:9px;background:#fff;font-size:12.5px;font-weight:600;color:#374151;box-shadow:0 2px 6px -4px rgba(17,24,39,.2);transition:transform .15s,background .2s,border-color .2s,color .2s}
.qm-tools svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round}
.qm-tools .dark{background:#111827;border-color:#111827;color:#fff}
.qm-tools .qm-ans{align-content:center}
.qm-tools .qm-ans.act{background:#eff6ff;border-color:#2563eb;color:#2563eb}
.qm-paper{position:absolute;left:77px;top:44px;width:566px;height:396px;box-sizing:border-box;display:flex;flex-direction:column;padding:12px 16px 6px;border-radius:14px;background:#fff;box-shadow:0 0 0 1px #eef0f3,0 22px 40px -24px rgba(17,24,39,.45)}
.qm-paper-h{display:flex;align-items:center;margin:0 0 6px}
.qm-paper-h img{width:20px;height:20px}
.qm-paper-h em{margin:0 22% 0 auto;font-style:normal;font-size:12px;color:#374151}
.qm-grid{flex:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:1px;border:1px solid #a3a3a3;border-radius:8px;background:#a3a3a3;overflow:hidden}
.qm-grid>div{position:relative;display:flex;flex-direction:column;min-height:0;overflow:hidden;padding:5px 7px 5px;background:#fff;font-size:12px;line-height:1.35;color:#111827}
/* an empty box: two grey bars, until its question comes in */
.qm-grid>div::after{content:"";position:absolute;left:30px;top:10px;width:55%;height:7px;border-radius:4px;background:#f0f1f4;box-shadow:0 14px 0 -1px #f0f1f4;transition:opacity .2s}
.qm-grid p{position:relative;margin:0;padding-left:22px;opacity:0;transition:opacity .2s}
.qm-grid p>i{position:absolute;left:0;top:-3px;font-style:normal;font-size:15px}
.qm-grid>div.in::after{opacity:0}
.qm-grid>div.in p{opacity:1}
/* A Level questions are long (cubics, integrals): smaller text so each fits its box */
.qm-cv[data-level="alevel"] .qm-grid>div{font-size:10px;line-height:1.3}
.qm-cv[data-level="alevel"] .qm-grid p>i{font-size:13px;top:-2px}
.qm-cv[data-level="alevel"] .qm-grid p{padding-left:19px}
.qm-paper-f{position:relative;height:13px;margin-top:4px;font-size:8px;color:#646b7a}
.qm-paper-f span:first-child{position:absolute;left:50%;transform:translateX(-50%)}
.qm-paper-f span:last-child{position:absolute;right:4px}
/* the shape diagrams (drawn to scale by the script) and the answers */
.qm-dg{display:block;width:100%;max-width:118px;margin-top:3px;font-size:12px;fill:#374151}
.qm-dg .sh{fill:none;stroke:#111827;stroke-width:1.2}
.qm-a{margin-top:auto;align-self:flex-end;font-size:12px;font-weight:700;color:#2563eb;opacity:0;transform:translateY(3px);transition:opacity .25s,transform .25s}
.qm-cv .show .qm-a{opacity:1;transform:none}

/* step 3: 4 Questions to Project (as images/4questions.svg: dark slide, white logo, four white cards with blue numbers) */
.qm-slide{position:absolute;left:77px;top:44px;width:566px;height:396px;box-sizing:border-box;display:flex;flex-direction:column;padding:14px 18px 18px;border-radius:20px;background:#26262d;box-shadow:0 26px 44px -24px rgba(17,24,39,.65)}
.qm-st{display:flex;align-items:center;gap:7px;height:32px;font-size:17px;font-weight:800;letter-spacing:-.01em;color:#fff}
.qm-st img{width:24px;height:24px}
.qm-st>span{display:inline-flex;align-items:center;height:30px;box-sizing:border-box;padding:0 13px;border-radius:8px;font-size:12px;font-weight:700;transition:transform .15s,background .2s}
.qm-st .qm-pans{margin-left:auto;align-content:center;background:rgba(255,255,255,.12);color:#fff}
.qm-st .qm-pans.act{background:#fff;color:#1d7fe4}
.qm-st .qm-pnew{background:#1d7fe4;color:#fff}
.qm-pgrid{flex:1;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:14px;margin-top:14px}
/* the cards are always there; on New Questions only their contents fade out and back (.ld) */
.qm-pgrid>div{position:relative;display:flex;flex-direction:column;padding:12px 14px 10px 54px;border-radius:12px;background:#fff;box-shadow:0 6px 16px -10px rgba(0,0,0,.6)}
.qm-pgrid p{transition:opacity .2s}
.qm-pgrid.ld p,.qm-pgrid.ld .qm-a{opacity:0;transition-duration:.15s}
.qm-pgrid>div>i{position:absolute;left:12px;top:12px;display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:#6aa2e4;font-style:normal;font-size:16px;font-weight:800;color:#fff}
.qm-pgrid p{margin:4px 0 0;font-size:14px;font-weight:600;line-height:1.3;color:#111827}
.qm-pgrid .qm-dg{max-width:130px;margin-top:6px;font-size:12px}
.qm-pgrid .qm-a{position:absolute;right:14px;bottom:10px;padding:3px 9px;border-radius:7px;background:#eff6ff;font-size:14px;color:#1d7fe4}

/* the cursor: moved by the script with a transform */
.qm-cur{position:absolute;left:0;top:0;z-index:5;width:26px;height:26px;opacity:0;pointer-events:none;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3));transition:transform .6s cubic-bezier(.45,.05,.3,1),opacity .25s}
.qm-cur.on{opacity:1}
.qm-cur.click{animation:qmClick .25s ease}
@keyframes qmClick{50%{scale:.82}}
@media (prefers-reduced-motion:reduce){.cv.qm-cv,.cv.qm-cv *{transition:none!important;animation:none!important}}

/* ==========================================================================
   rbt-walk (was css/rbt-walk.css: the Resources by topic hero walkthrough, from css/resources-by-topic.css)
   ========================================================================== */
/* ---------- hero walkthrough (Primary): a small copy of the members' topic browser, played by js/walkthroughs.js.
   A fixed 600x420 canvas scaled to fit: strand tabs, search and type filter along the top; the topics down the side; one
   topic's section with a chip per resource type on each row. The cursor clicks a chip and that resource opens over the
   rows; then it picks another topic from the side and opens another. ---------- */
body.rbt .lh-split .hl-wrap{display:grid;grid-template-columns:10fr 13fr;gap:44px;align-items:center}
body.rbt .lh-split .lh-text{max-width:none}
@media (max-width:900px){body.rbt .lh-split .hl-wrap{grid-template-columns:1fr;gap:32px}body.rbt .lh.lh-split{padding-bottom:48px}}
.rw-stage{position:relative;width:100%;aspect-ratio:600/420}
.cv.rw{position:absolute;left:0;top:0;width:600px;height:420px;transform:scale(var(--s,1));transform-origin:0 0;overflow:hidden;border-radius:calc(16px / var(--s,1));background:#fff;box-shadow:0 1px 2px rgba(20,26,46,.08),0 0 0 1px rgba(20,26,46,.08),0 24px 48px -24px rgba(20,26,46,.4);font:11px/1.3 "Roboto",system-ui,sans-serif;color:#1f2330}
/* the top bar */
.rw-top{position:absolute;left:14px;right:14px;top:12px;display:flex;align-items:center;gap:5px;padding-bottom:11px;border-bottom:1px solid #e3e5ea}
.rw-tab{padding:6px 10px;border:1px solid #dcdfe6;border-radius:7px;background:#f4f5f7;font-weight:700;font-size:12px;color:#2b3040}
.rw-tab.on{border-color:#3d5afe;background:#3d5afe;color:#fff}
.rw-search{display:flex;align-items:center;gap:5px;margin-left:auto;width:122px;padding:6px 8px;border:1px solid #dcdfe6;border-radius:7px;color:#8a90a0;font-size:12px;white-space:nowrap}
.rw-sel{white-space:nowrap}
.rw-search svg{width:11px;height:11px;fill:none;stroke:#6b7284;stroke-width:2.4;stroke-linecap:round}
.rw-sel{width:108px;padding:6px 8px;border:1px solid #dcdfe6;border-radius:7px;font-weight:700;font-size:12px;color:#2b3040}
.rw-sel::after{content:"";float:right;margin-top:3px;width:5px;height:5px;border-right:1.5px solid #555;border-bottom:1.5px solid #555;transform:rotate(45deg)}
/* the topic list down the side, and the topic itself */
.rw-body{position:absolute;left:14px;right:14px;top:58px;bottom:0}
.rw-side{position:absolute;left:0;top:0;width:118px;margin:0;padding:0;list-style:none}
.rw-side li{padding:6px 8px;border-bottom:1px solid #eceef2;border-left:2px solid transparent;font-size:12px;color:#3b4152;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:background .25s,color .25s,border-color .25s}
.rw-side li.on{border-left-color:#3d5afe;background:#eef2ff;color:#3d5afe;font-weight:700}
.rw-main{position:absolute;left:132px;right:0;top:0;bottom:0}
.rw-pane{position:absolute;inset:0;opacity:0;transform:translateY(6px);transition:opacity .35s,transform .35s;pointer-events:none}
.rw-pane.on{opacity:1;transform:none}
.rw-h{display:flex;align-items:baseline;justify-content:space-between;margin:2px 0 9px}
.rw-h b{font-size:20px;font-weight:800;letter-spacing:-.02em}
.rw-h span{font-size:12px;font-weight:600;color:#5b6275}
.rw-sec{margin-bottom:3px;padding:6px 9px;border-radius:7px;background:#eef0f4;font-weight:700;font-size:12px}
.rw-row{display:flex;align-items:center;height:31px;padding-left:9px}
.rw-n{flex:1;min-width:0;padding-right:4px;font-size:9.6px;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rw-chips{display:grid;grid-template-columns:repeat(10,23px);gap:2.5px;flex:none}
.rw-chips i,.rw-chips b{display:grid;place-items:center;height:21px}
.rw-chips i::before{content:"";width:3px;height:3px;border-radius:50%;background:#cfd3db}
.rw-chips b{border:1px solid #dfe3ea;border-radius:6px;background:#f2f5fa;font-size:7.2px;font-weight:800;color:#3b4152;transition:background .15s,color .15s,border-color .15s,transform .15s}
.rw-chips b.hit{border-color:#3d5afe;background:#3d5afe;color:#fff;transform:scale(1.08)}
/* the resource that opens: the rows dim and the sheet comes up over them, with its name underneath */
.rw-sheet{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;margin:0;background:rgba(244,246,250,.82);opacity:0;transition:opacity .3s;pointer-events:none}
.rw-sheet img{width:400px;height:auto;max-height:310px;object-fit:contain;filter:drop-shadow(0 18px 26px rgba(20,26,46,.28));transform:scale(.86) translateY(14px);transition:transform .45s cubic-bezier(.3,1.3,.5,1)}
.rw-sheet figcaption{padding:6px 14px;border-radius:999px;background:#fff;box-shadow:0 6px 16px -8px rgba(20,26,46,.45);font-size:12px;color:#3b4152}
.rw-sheet figcaption b{color:#3d5afe;margin-right:4px}
.rw-sheet.on{opacity:1}
.rw-sheet.on img{transform:none}
/* the cursor */
/* when the walkthrough's cursor rests on a chip, it goes blue and a dark tooltip above it gives the resource type's full name
   (js/walkthroughs.js); not interactive */
.rw-chips b.over{border-color:#3d5afe;color:#3d5afe}
/* the tooltip: a white card with the resource type's preview on a soft grey panel (the same panel whether the image
   is a light sheet or a dark projector slide), then its name */
.rw-tip{position:absolute;z-index:8;display:flex;flex-direction:column;align-items:center;gap:6px;padding:6px 6px 7px;border:1px solid #e3e6ee;border-radius:11px;background:#fff;font-size:12px;font-weight:800;color:#141a2e;white-space:nowrap;pointer-events:none;opacity:0;transform:translate(-50%,calc(-100% - 8px));transition:opacity .15s;box-shadow:0 14px 28px -14px rgba(20,26,46,.45)}
/* the image fills the panel's inner box and is fitted and centred inside it (object-fit), whatever its shape */
.rw-tip-im{display:block;width:132px;height:86px;box-sizing:border-box;padding:8px;border-radius:7px;background:#eef0f4}
.rw-tip-im img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;filter:drop-shadow(0 2px 4px rgba(20,26,46,.18))}
.rw-tip.np .rw-tip-im{display:none}
.rw-tip-n{padding:0 4px}
/* the arrow: a white triangle with the card's border colour behind it */
.rw-tip::before,.rw-tip::after{content:"";position:absolute;left:calc(50% + var(--ax,0px));top:100%;border:6px solid transparent}
.rw-tip::before{margin-left:-6px;border-top-color:#e3e6ee}
.rw-tip::after{margin:-1px 0 0 -6px;border-top-color:#fff}
/* flipped under the chip when there isn't room above */
.rw-tip.below{transform:translate(-50%,8px)}
.rw-tip.below::before,.rw-tip.below::after{top:auto;bottom:100%;border-top-color:transparent}
.rw-tip.below::before{border-bottom-color:#e3e6ee}
.rw-tip.below::after{margin:0 0 -1px -6px;border-bottom-color:#fff}
.rw-tip.on{opacity:1}
.rw-cur{position:absolute;left:0;top:0;z-index:9;width:20px;height:20px;transform:translate(560px,390px);transition:transform .5s cubic-bezier(.45,0,.2,1);filter:drop-shadow(0 2px 3px rgba(0,0,0,.35))}
.rw-cur svg{width:100%;height:100%;transition:transform .12s;transform-origin:4px 2px}
.rw-cur.down svg{transform:scale(.8)}
.cv.rw.snap *{transition:none!important}

/* ==========================================================================
   pk-walk (was css/pk-walk.css)
   ========================================================================== */
/* The Primary skills checks walkthrough (script: js/walkthroughs.js), used on skillschecks.php and mathsbox-primary.php.
   Its grey notes share one style with the other walkthroughs: Roboto 600, 17px, #6b7284. */
/* ---------- the walkthrough: a fixed 600x500 canvas scaled to fit (script at the bottom). In turn: the half term's ten
   skills on a white card (one column, a green tick on each; all ten are there from the start),
   then the "10 Questions to Project" button appears at the bottom and is pressed; the 10 questions to project, one per
   skill, in the Endless Questions frame (dark frame, tools down the right, a New questions button top right), which is
   pressed for a fresh set; a swipe brings in the original Week 1 set (purple frame, Week tab); the window shrinks to one
   side and the printed worksheet comes in (drawn in HTML like the real sheet, on the same ten skills). Grey handwritten
   notes with curly arrows say what each part is ---------- */
.pk-stage{position:relative;width:100%;aspect-ratio:600/500}
.cv.pk{position:absolute;left:0;top:0;width:600px;height:500px;transform:scale(var(--s,1));transform-origin:0 0;font-family:"Roboto",system-ui,sans-serif;color:#1f2330;transition:opacity .4s}
.cv.pk.fade{opacity:0}
/* 1. the half term's skills: a white card, one column with a green tick on each, then the button */
.pk-card{position:absolute;left:0;top:34px;width:352px;box-sizing:border-box;padding:16px 18px 18px;border-radius:16px;background:#fff;box-shadow:0 0 0 1px rgba(20,26,46,.06),0 24px 44px -22px rgba(20,26,46,.45);transition:opacity .4s,transform .4s}
.cv.pk.proj .pk-card{opacity:0;transform:scale(.97)}
body.skills .pk-card h6{margin:0 0 8px;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#8a91a1}
.pk-skills{margin:0;padding:0;list-style:none}
.pk-skills li{display:flex;align-items:center;gap:10px;height:27px;border-bottom:1px solid #f0f1f4;font-size:13px;font-weight:600;color:#1f2330;white-space:nowrap;opacity:0;transform:translateX(-8px);transition:opacity .2s,transform .2s}
.pk-skills li:last-child{border-bottom:0}
.pk-skills li.on{opacity:1;transform:none}
.pk-tk{flex:none;display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#16a34a}
.pk-tk svg{width:11px;height:11px;fill:none;stroke:#fff;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round}
.pk-go{display:flex;margin-top:14px;opacity:0;transform:translateY(8px);transition:opacity .3s,transform .3s}
.cv.pk.ready .pk-go{opacity:1;transform:none}
.pk-btn{padding:10px 18px;border-radius:9px;background:#1d7fe4;font-size:13px;font-weight:800;color:#fff;transition:transform .12s,filter .2s}
.pk-btn.down,.pk-new.down{transform:scale(.9);filter:brightness(.9)}
/* the window for the projected slides (y 48 to 440) */
.pk-view{position:absolute;left:0;top:48px;width:600px;height:392px;border-radius:16px;overflow:hidden;transform-origin:0 0;opacity:0;box-shadow:0 0 0 1px rgba(20,26,46,.08),0 24px 44px -24px rgba(20,26,46,.45);transition:transform .8s cubic-bezier(.3,.7,.2,1),opacity .45s}
.cv.pk.proj .pk-view{opacity:1}
.cv.pk.print .pk-view{transform:translate(0,-30px) scale(.46)}
/* 2. the 10 questions to project, in the Endless Questions frame; .fresh swaps set a for set b */
.pk-end{position:absolute;inset:0;background:#2b2e45;transition:transform .7s cubic-bezier(.45,0,.2,1)}
.cv.pk.swipe .pk-end{transform:translateX(-100%)}
.pk-logo{position:absolute;left:14px;top:9px;display:flex;align-items:center;gap:7px;font-size:17px;letter-spacing:.02em;color:#fff}
.pk-logo img{width:20px;height:20px}
.pk-new{position:absolute;right:52px;top:8px;display:flex;align-items:center;gap:6px;padding:5px 12px;border-radius:7px;background:#1d7fe4;font-size:12px;font-weight:800;color:#fff;transition:transform .12s,filter .2s}
.pk-new svg{width:13px;height:13px;fill:none;stroke:#fff;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.pk-panel{position:absolute;left:24px;right:46px;top:42px;bottom:16px;border-radius:3px;background:#fff;overflow:hidden}
.pk-set{position:absolute;inset:0;padding:6px 0;transition:opacity .35s}
.pk-set.b,.cv.pk.fresh .pk-set.a{opacity:0}
.cv.pk.fresh .pk-set.b{opacity:1}
.pk-q{display:flex;align-items:center;gap:14px;height:32.2px;padding:0 20px;font-size:13px;line-height:1.2;color:#1f2330;white-space:nowrap}
.pk-q b{flex:none;width:16px;text-align:right;font-weight:500;color:#141a2e}
/* the clock for question 1: large, on the right of the slide beside the first questions */
.pk-q svg{position:absolute;right:26px;top:8px;width:84px;height:84px}
.pk-tools{position:absolute;right:0;top:46px;width:46px;display:grid;justify-items:center;gap:15px}
.pk-tool{display:block;width:20px;height:20px;transition:transform .12s,filter .2s}
.pk-tool svg{display:block;width:20px;height:20px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
/* 3. a swipe brings in the ready-made Week 1 set */
.pk-wk{position:absolute;inset:0;background:#5b5fc4;transform:translateX(100%);transition:transform .7s cubic-bezier(.45,0,.2,1)}
.cv.pk.swipe .pk-wk{transform:none}
.pk-tab{position:absolute;left:14px;top:8px;z-index:2;padding:2px 12px;border:2px solid #fff;border-radius:3px;background:#5b5fc4;font-size:16px;font-weight:600;color:#fff}
.pk-wk-in{position:absolute;left:18px;right:18px;top:30px;bottom:16px;padding:10px 0;background:#fff;box-shadow:inset 0 0 0 2px #2f3270,inset 0 0 0 6px #fff,inset 0 0 0 7.5px #2f3270}
.pk-wk .pk-q{height:32.4px;padding:0 26px;font-size:13.5px}
.pk-wk .pk-q svg{right:30px;top:12px}
/* 4. the printed worksheet, drawn in HTML in the style of the real sheet (images/primaryskillschecka4.png) so its
   questions are on the same ten skills as the projected ones: "Name:" and the sheet number along the top, a 4 x 5 grid
   of questions in black lines (two on each skill, each with a bold "Question n"), then SKILLS CHECK, the Score box and
   the web address along the bottom */
.pk-ws{position:absolute;left:150px;top:136px;width:440px;height:306px;box-sizing:border-box;padding:9px 14px 0;border-radius:10px;background:#fff;box-shadow:0 1px 2px rgba(20,26,46,.12),0 22px 36px -16px rgba(20,26,46,.42);font-family:Calibri,Carlito,"Segoe UI",Arial,sans-serif;color:#111;opacity:0;transform:translateY(24px) rotate(1.5deg);transition:opacity .45s,transform .8s cubic-bezier(.2,.8,.3,1)}
.cv.pk.print .pk-ws{opacity:1;transform:rotate(1.5deg)}
.pk-ws-h{display:flex;justify-content:space-between;align-items:flex-end;padding:0 1px 2px}
.pk-ws-h b{font-size:17px;line-height:1}
.pk-ws-h span{font-size:12px;font-weight:700}
.pk-ws-g{display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(5,44px);border:1px solid #111}
.pk-ws-g>div{position:relative;min-width:0;padding:2px 3px 0;border-right:1px solid #111;border-bottom:1px solid #111;font-size:7.6px;line-height:1.25;overflow:hidden}
.pk-ws-g>div:nth-child(4n){border-right:0}
.pk-ws-g>div:nth-child(n+17){border-bottom:0}
.pk-ws-g small{display:block;margin-bottom:1px;font-size:6.4px;font-weight:700}
/* a question with a clock keeps its text to the left, clear of the clock */
.pk-ws-g>div.ck{padding-right:30px}
.pk-ws-g svg{position:absolute;right:3px;bottom:3px;width:25px;height:25px}
.pk-ws-f{display:flex;align-items:center;height:42px;padding:0 2px}
.pk-ws-f b{font:900 21px/1 "Roboto",Arial,sans-serif;letter-spacing:.03em;color:#fff;-webkit-text-stroke:1.1px #111;text-shadow:1.5px 1.5px 0 #111}
.pk-ws-f span{margin-left:auto;font-size:14px}
.pk-ws-f i{width:32px;height:20px;margin:0 0 0 6px;box-sizing:border-box;border:1px solid #111}
.pk-ws-f em{margin-left:34px;font-style:normal;font-size:6.5px}
/* the cursor, and the grey handwritten notes with curly arrows (as on the A Level skills checks page) */
.pk-cur{position:absolute;left:0;top:0;z-index:20;width:22px;height:22px;transform:translate(560px,470px);transition:transform .6s cubic-bezier(.45,0,.2,1),opacity .3s;filter:drop-shadow(0 2px 3px rgba(0,0,0,.4))}
.pk-cur svg{width:100%;height:100%;transition:transform .12s;transform-origin:4px 2px}
.pk-cur.down svg{transform:scale(.8)}
.cv.pk.print .pk-cur{opacity:0}
.pk-n{position:absolute;z-index:10;margin:0;font:600 17px/1.3 "Roboto",system-ui,sans-serif;color:#6b7284;opacity:0;transform:translateY(3px);transition:opacity .3s,transform .3s}
.pk-n.on{opacity:1;transform:none}
.pk-ink{position:absolute;inset:0;z-index:10;width:600px;height:500px;pointer-events:none;overflow:visible}
.pk-ink path{fill:none;stroke:#8d94a5;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1;opacity:0;transition:opacity .2s,stroke-dashoffset 0s linear .3s}
.pk-ink path.on{stroke-dashoffset:0;opacity:1;transition:opacity .1s,stroke-dashoffset .5s ease-out}
@media (prefers-reduced-motion:reduce){.cv.pk,.cv.pk *{transition:none!important}}

/* ==========================================================================
   ps-walk (was css/ps-walk.css)
   ========================================================================== */
/* The SATs walkthrough (script: js/walkthroughs.js), used on satsresources.php and mathsbox-primary.php. Its grey notes share one style with the other walkthroughs: Roboto 600, 17px, #6b7284. */
/* ---------- the walkthrough: a fixed 600x500 canvas scaled to fit (script at the bottom). Three scenes, no clicking:
   1. the three Set A practice paper covers fan out (as pdfs/reasoning1cover.pdf: logo, a grey box with KEY STAGE 2,
      Mathematics and the paper, then the name boxes);
   2. the covers lift away and six arithmetic topic sheets deal in, drawn like the real ones (images/satsrevisionaritmetic.svg:
      MathsBox, the topic, Name, then 12 questions in a 4 x 3 grid);
   3. those lift away and three A4 reasoning booklet pages deal in, drawn like the real ones (images/satsreasoning.webp:
      MathsBox, "Mathematics — Reasoning" and the topic, then numbered questions with a grey prompt bar and an answer box).
   Grey handwritten notes say what each part is ---------- */
.ps-stage{position:relative;width:100%;aspect-ratio:600/500}
.cv.ps{position:absolute;left:0;top:0;width:600px;height:500px;transform:scale(var(--s,1));transform-origin:0 0;font-family:"Roboto",system-ui,sans-serif;color:#1f2330;transition:opacity .4s}
.cv.ps.fade{opacity:0}
/* 1. the covers: built at full A4 page size (300x424) and shrunk into a fan */
.ps-cover{position:absolute;left:150px;top:44px;width:300px;height:424px;opacity:0;transform:translate(var(--x),calc(var(--y) + 26px)) scale(.72) rotate(var(--r));transition:transform .7s cubic-bezier(.3,.7,.2,1),opacity .4s}
.ps-cover.c1{--x:-172px;--y:14px;--r:-7deg;z-index:1}
.ps-cover.c2{--x:0px;--y:0px;--r:0deg;z-index:3;transition-delay:.08s}
.ps-cover.c3{--x:172px;--y:14px;--r:7deg;z-index:2;transition-delay:.16s}
.cv.ps.fan .ps-cover{opacity:1;transform:translate(var(--x),var(--y)) scale(.72) rotate(var(--r))}
.cv.ps.away .ps-cover{opacity:0;transform:translate(var(--x),calc(var(--y) - 40px)) scale(.6) rotate(var(--r))}
.ps-face{position:absolute;inset:0;box-sizing:border-box;padding:18px 20px;border-radius:8px;background:#fff;box-shadow:0 1px 2px rgba(20,26,46,.12),0 24px 40px -18px rgba(20,26,46,.45)}
.ps-logo{display:flex;align-items:center;gap:7px;padding-bottom:10px;border-bottom:1px solid #ddd;font-size:15px;font-weight:800;color:#111}
.ps-logo img{width:22px;height:22px}
.ps-set{position:absolute;right:20px;top:20px;padding:3px 9px;border-radius:999px;background:#141a2e;font-size:12px;font-weight:800;color:#fff}
.ps-box{margin:16px 4px 0;padding:18px 0 20px;border:1px solid #e3e3e3;border-radius:8px;background:#f6f6f6;text-align:center}
.ps-box small{display:block;font-size:7.5px;font-weight:700;letter-spacing:.14em;color:#444}
.ps-box b{display:block;margin:6px 0 4px;font-size:31px;font-weight:800;letter-spacing:-.018em;color:#111}
.ps-box em{display:block;font-style:normal;font-size:15px;font-weight:800;color:#111}
.ps-hint{margin:16px 0 8px;text-align:center;font-size:7.5px;color:#555}
.ps-form{margin:0 8px;padding:10px 14px 2px;border:1px solid #e3e3e3;border-radius:8px;background:#f7f7f7}
.ps-form span{display:block;font-size:7.5px;font-weight:700;color:#333}
.ps-form i{display:block;height:22px;margin:4px 0 9px;border:1px solid #333;border-radius:4px;background:#fff}
.ps-url{position:absolute;left:0;right:0;bottom:12px;text-align:center;font-size:7px;color:#666}
/* 2 and 3. the sheets deal in, three across; .gone lifts a set away */
.ps-grid{position:absolute;left:10px;width:580px;display:grid;grid-template-columns:repeat(3,1fr);gap:12px;transition:opacity .45s,transform .6s cubic-bezier(.45,0,.2,1)}
.ps-grid.ar{top:104px}
.ps-grid.re{top:92px}
.ps-grid.gone{opacity:0;transform:translateY(-36px) scale(.96)}
.ps-sh{position:relative;box-sizing:border-box;border-radius:6px;background:#fff;box-shadow:0 1px 2px rgba(20,26,46,.12),0 14px 24px -14px rgba(20,26,46,.45);color:#111;overflow:hidden;opacity:0;transform:translateY(18px) scale(.92);transition:opacity .35s,transform .45s cubic-bezier(.3,1.3,.5,1)}
.ps-sh.on{opacity:1;transform:none}
/* an arithmetic sheet (837 x 620 as the real one): header, a 4 x 3 grid of 12 questions, footer */
.ps-ar{height:137px;padding:6px 8px 0}
.ps-ah{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;height:15px}
.ps-mb{display:flex;align-items:center;gap:2px;font-size:6.4px;color:#111}
.ps-mb img{width:8px;height:8px}
.ps-mb b{font-weight:800;margin-right:-3px}
.ps-ah>b{padding:0 4px;font-size:7.2px;font-weight:500;color:#111;white-space:nowrap}
.ps-ah>span{justify-self:end;font-size:4.4px;font-weight:700}
.ps-ah>span i{display:inline-block;width:22px;margin-left:3px;border-bottom:.5px solid #333}
.ps-ag{display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(3,1fr);height:103px;margin-top:4px;border:.6px solid #9a9a9a;border-radius:4px;overflow:hidden}
.ps-ag span{min-width:0;padding:2px 3px;border-right:.6px solid #9a9a9a;border-bottom:.6px solid #9a9a9a;font-size:5.2px;white-space:nowrap;overflow:hidden}
.ps-ag span:nth-child(4n){border-right:0}
.ps-ag span:nth-child(n+9){border-bottom:0}
.ps-ag span b{font-weight:800}
.ps-ag .fr{display:inline-flex;flex-direction:column;align-items:center;vertical-align:middle;margin:0 1px;font-style:normal;font-size:4.4px;line-height:1.1}
.ps-ag .fr sup,.ps-ag .fr sub{position:static;vertical-align:baseline;font-size:inherit}
.ps-ag .fr sup{padding:0 1px;border-bottom:.4px solid currentColor}
.ps-ft{display:flex;justify-content:center;position:relative;height:9px;align-items:center;font-size:3.6px;color:#333}
.ps-ft em{position:absolute;right:0;font-style:normal}
/* a reasoning sheet (about square, as the real one): header, two numbered questions, footer */
.ps-re{aspect-ratio:210/297;padding:9px 10px 0} /* A4 portrait */
.ps-rh{display:flex;justify-content:space-between;align-items:center;padding-bottom:5px;border-bottom:.6px solid #ddd}
.ps-rh .ps-mb{font-size:9px}
.ps-rh .ps-mb img{width:11px;height:11px}
.ps-rh p{margin:0;text-align:right;font-size:5.4px;font-weight:700;line-height:1.35}
.ps-rh p small{display:block;font-size:4.6px;font-weight:400;color:#555}
.ps-rq{display:grid;grid-template-columns:11px 1fr;gap:6px;padding:6px 0 7px}
.ps-rq+.ps-rq{border-top:.6px solid #e2e2e2}
.ps-rq>span{display:grid;place-items:center;width:10px;height:10px;box-sizing:border-box;border:.6px solid #333;border-radius:2px;font-size:5.4px;font-weight:700}
.ps-rq p{margin:0;font-size:5px;line-height:1.45}
.ps-rq p b{font-weight:800}
.ps-rq svg{display:block;width:60px;height:30px;margin:3px auto 1px}
.ps-rb{margin-top:4px;padding:2px 4px;border-radius:2px;background:#eceef2;font-size:4.9px}
.ps-rb b{font-weight:800}
.ps-ra{height:19px;margin-top:3px;border:.5px dashed #c9ccd3;border-radius:2px}
.ps-re .ps-ft{position:absolute;left:10px;right:10px;bottom:3px;justify-content:flex-start}
/* the grey handwritten notes with curly arrows (as on the skills checks pages) */
.ps-n2{position:absolute;z-index:10;margin:0;font:600 17px/1.3 "Roboto",system-ui,sans-serif;color:#6b7284;opacity:0;transform:translateY(3px);transition:opacity .3s,transform .3s}
.ps-n2.on{opacity:1;transform:none}
.ps-ink{position:absolute;inset:0;z-index:10;width:600px;height:500px;pointer-events:none;overflow:visible}
.ps-ink path{fill:none;stroke:#8d94a5;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1;opacity:0;transition:opacity .2s,stroke-dashoffset 0s linear .3s}
.ps-ink path.on{stroke-dashoffset:0;opacity:1;transition:opacity .1s,stroke-dashoffset .5s ease-out}
@media (prefers-reduced-motion:reduce){.cv.ps,.cv.ps *{transition:none!important;animation:none!important}}

/* ==========================================================================
   ml-walk (was css/ml-walk.css)
   ========================================================================== */
/* The Mathsloops walkthrough (js/walkthroughs.js): used in the hero of mathsloops.php and on mathsbox-secondary.php. Its stage is sized by
   each page (a 600x440 canvas: aspect-ratio 600/440). Moved here from mathsloops.php. */
/* ---------- the walkthrough: the free Set 103 (Percentages of quantities, fr/mloops/103.pdf), on a fixed 600x440 canvas
   scaled to fit. Its 16 cards, drawn like the printed ones (answer at the top with an arrow in, the question, the two check
   numbers, Set 103, ??? with an arrow out), start in a jumbled pile in the middle. One at a time: the last card down has its
   question lit, the card in the pile with that answer at its top lights up, and it moves into the next place on a ring, the
   shape of the set's answer sheet (6 across, 4 down, clockwise from the top left). Nothing is written on the cards. The last
   card's answer is at the top of card 1, so the ring closes: "Back to card 1". Then the cards go back into the pile. ---------- */
.cv.ml{position:absolute;left:0;top:0;width:600px;height:440px;transform:scale(var(--s,1));transform-origin:0 0;font-family:Arial,Helvetica,sans-serif;color:#111}
.ml-card{position:absolute;left:0;top:0;width:88px;height:104px;box-sizing:border-box;border:1.4px solid #222;border-radius:11px;background:#fff;box-shadow:0 1px 2px rgba(20,26,46,.15),0 4px 8px -4px rgba(20,26,46,.25);transition:box-shadow .25s,border-color .3s;will-change:transform}
.ml-card.lift{box-shadow:0 2px 3px rgba(20,26,46,.12),0 16px 24px -10px rgba(20,26,46,.45)}
.ml-card svg{position:absolute;width:12px;height:7px;overflow:visible}
.ml-card svg path{fill:#fff;stroke:#222;stroke-width:.8;stroke-linejoin:round}
.ml-card .in{left:3px;top:8px}
.ml-card .out{right:2px;bottom:9px}
.ml-top{position:absolute;left:16px;top:4px;height:15px;padding:0 5px;box-sizing:border-box;border:1px solid #222;border-radius:8px;font-size:8.5px;line-height:13px;transition:background .3s,border-color .3s,color .3s}
.ml-no{position:absolute;right:7px;top:5px;font-size:6px;font-style:italic}
.ml-q{position:absolute;left:4px;right:4px;top:23px;height:56px;box-sizing:border-box;border:.8px solid #333;border-radius:7px;transition:background .3s,border-color .3s}
.ml-q b{position:absolute;left:6px;top:8px;font-weight:400;font-size:9px}
.ml-q span{position:absolute;left:12px;top:21px;font-size:12px;white-space:nowrap}
.ml-q i{position:absolute;bottom:3px;width:9px;height:9px;box-sizing:border-box;display:grid;place-items:center;border:.7px solid #333;border-radius:50%;font-size:4.5px;font-style:normal}
.ml-q i.l{left:3px}.ml-q i.r{right:3px}
.ml-set{position:absolute;left:6px;bottom:6px;font-size:5.5px;font-style:italic}
.ml-ans{position:absolute;right:15px;bottom:5px;width:30px;height:15px;box-sizing:border-box;border:1px solid #222;border-radius:8px;font-size:8.5px;line-height:13px;text-align:center}
/* the question being answered (blue), and the answer it leads to at the top of the next card (blue) */
.ml-card.ask .ml-q{background:#eef1ff;border-color:#3d5afe}
.ml-card.hit .ml-top{background:#eef1ff;border-color:#3d5afe;color:#2a44d8}
/* the loop closed: the cards dim and the set's answer sheet (portrait, drawn like page 3 of the PDF) slides in on top.
   Students write each card's number in the next shape round the sheet, in loop order (square, circle, square, …); the
   squares add up to 66 and the circles to 70, the numbers printed on every card, so the loop checks itself */
.cv.ml.sheet .ml-card{opacity:.22;transition:opacity .4s,box-shadow .25s,border-color .3s}
.ml-sh{position:absolute;left:150px;top:8px;z-index:80;width:300px;height:424px;background:#fff;border-radius:4px;box-shadow:0 1px 2px rgba(20,26,46,.12),0 20px 36px -16px rgba(20,26,46,.42);opacity:0;transform:translateY(30px);transition:opacity .4s,transform .55s cubic-bezier(.2,.8,.3,1)}
.cv.ml.sheet .ml-sh{opacity:1;transform:none}
.ml-sh svg{position:absolute;inset:0;width:300px;height:424px}
.ml-sh svg path{fill:none;stroke:#222;stroke-width:1.1}
.ml-sh .t{position:absolute;left:0;right:0;text-align:center;line-height:1}
.ml-sh .nm{position:absolute;right:22px;top:12px;font-size:8px}
.ml-sh .ml-tp{position:absolute;left:28px;top:30px;font-size:7px} /* not .tp: that is the topics section in lab.css */
.ml-sh .shp{position:absolute;width:40px;height:40px;margin:-20px 0 0 -20px;box-sizing:border-box;border:1.2px solid #222;background:#fff}
.ml-sh .shp.ci{border-radius:50%}
.ml-sh .tot{position:absolute;left:96px;top:220px;width:108px;height:74px;box-sizing:border-box;border:2px double #222;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:22px 1fr}
.ml-sh .tot b{grid-column:1/3;display:grid;place-items:center;border-bottom:1.5px solid #222;font-size:15px;font-weight:400}
.ml-sh .tot span{position:relative;display:grid;place-items:center}
.ml-sh .tot span+span{border-left:1.5px solid #222}
/* what the student writes, in blue pen */
.ml-pen{font-family:"Patrick Hand",cursive;color:#1f3fbf;opacity:0;transform:scale(.6) rotate(-6deg);transition:opacity .2s,transform .25s cubic-bezier(.3,1.5,.5,1)}
.ml-pen.on{opacity:1;transform:rotate(-3deg)}
.ml-sh .shp .ml-pen{position:absolute;inset:0;display:grid;place-items:center;font-size:21px}
.ml-sh .tot .ml-pen{font-size:26px}
.ml-ok{position:absolute;right:4px;top:4px;font:800 13px/1 "Roboto",system-ui,sans-serif;color:#13a05a;opacity:0;transform:scale(.4);transition:opacity .2s,transform .3s cubic-bezier(.3,1.6,.5,1)}
.cv.ml.done .ml-ok{opacity:1;transform:none}

/* the grey note beside the sheet */
.ml-note{position:absolute;left:462px;top:146px;z-index:85;width:134px;margin:0;padding:10px 12px;box-sizing:border-box;border-radius:10px;background:#fff;box-shadow:0 1px 2px rgba(20,26,46,.08),0 10px 22px -12px rgba(20,26,46,.35);font:600 12px/1.4 "Roboto",system-ui,sans-serif;color:#6b7284;opacity:0;transition:opacity .4s}
.cv.ml.done .ml-note{opacity:1}
@media (prefers-reduced-motion:reduce){.cv.ml *{transition:none!important}}

/* ==========================================================================
   am-walk (was css/am-walk.css)
   ========================================================================== */
/* The Assessment Maker walkthrough (js/walkthroughs.js), moved from index.php's clip 4 so other pages can use it (mathsbox-alevel.php).
   A fixed 600 x 440 canvas (.cv.s4) scaled to its .s4-stage by the script; it plays while its .fx section is on screen
   (.fx.play), and pauses when it scrolls away (.fx.paused). The base rules are scoped to .s4 so they don't touch other clips. */
.s4-stage{position:relative;width:100%;aspect-ratio:600/440;border-radius:14px;box-shadow:0 0 0 7px #1d2232,0 26px 44px -26px rgba(17,24,39,.55)}
.cv.s4{position:absolute;left:0;top:0;width:600px;height:440px;transform:scale(var(--s,1));transform-origin:0 0;border-radius:calc(14px / var(--s,1));overflow:hidden;background:#fff;font:14px/1.4 "Roboto",system-ui,sans-serif;color:var(--ink)}
.s4 .cur{position:absolute;left:0;top:0;width:22px;height:22px;z-index:20;filter:drop-shadow(0 2px 3px rgba(0,0,0,.25));transition:scale .1s;transform-origin:4px 2px;translate:300px 400px}
.cv.s4 .fr{display:inline-flex;flex-direction:column;vertical-align:middle;margin:0 .12em;font-size:.82em;line-height:1.08;text-align:center}
.cv.s4 .fr>span:first-child{padding:0 .18em;border-bottom:1px solid currentColor}
.cv.s4 sup{font-size:.65em;line-height:0}
/* the media column: no panel, the frame sits straight on the page */
.fx-media.am{position:relative}
.s4-a,.s4-b{position:absolute;inset:0;transition:opacity .35s,transform .35s}
.s4-b{opacity:0;transform:scale(.98)}
.s4-a.off{opacity:0;transform:scale(.97)}
.s4-b.on{opacity:1;transform:none}
/* scene A: ten topics as roomy cards with checkboxes (eight ticked) in two columns on a soft grey panel, with the count and
   Create assessment along the bottom */
.s4-a{display:flex;flex-direction:column;padding:26px 38px 32px;background:#f6f7f9;font-family:"Roboto",system-ui,sans-serif}
.s4-ah{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:16px}
.s4-ah small{display:block;font-size:12px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:#8a91a1}
.s4-ah b{display:block;margin-top:5px;font-size:25px;font-weight:800;letter-spacing:-.025em;line-height:1.1;color:var(--ink)}
.s4-lvl{padding:6px 13px;border-radius:999px;background:#fff;box-shadow:0 0 0 1px #e3e6ec;font-size:12px;font-weight:700;color:var(--ink)}
.s4-picks{display:grid;grid-template-columns:1fr 1fr;gap:9px 14px}
.s4-pk{display:flex;align-items:center;gap:12px;height:40px;padding:0 15px;border-radius:12px;background:#fff;box-shadow:0 0 0 1px #e8eaf0,0 8px 16px -14px rgba(20,26,46,.4);font-size:13.5px;font-weight:600;color:#6b7284;transition:color .2s}
.s4-pk.on{color:var(--ink)}
.s4-pk span{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.s4-pk i{flex:none;display:grid;place-items:center;width:19px;height:19px;border-radius:5px;border:1.5px solid #c4c9d4;background:#fff;transition:background .15s,border-color .15s}
.s4-pk.on i{background:#22c55e;border-color:#22c55e}
.s4-pk i{transition:background .15s,border-color .15s,transform .25s cubic-bezier(.3,1.6,.5,1)}
.s4-pk.press i{transform:scale(.8)}
.s4-pk svg{width:12px;height:12px;fill:none;stroke:#fff;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:round;opacity:0}
.s4-pk.on svg{opacity:1}
.s4-af{display:flex;align-items:center;justify-content:space-between;margin-top:auto}
.s4-cnt{font-size:14px;color:#6b7284}
.s4-cnt b{font-weight:800;color:var(--ink)}
.s4-make{display:inline-flex;align-items:center;gap:8px;height:46px;padding:0 24px;border-radius:13px;background:#3d5afe;color:#fff;font-size:14.5px;font-weight:800;box-shadow:0 12px 22px -14px rgba(59,130,246,.9);transition:transform .12s}
.s4-make.press{transform:scale(.96)}/* scene B: nav bar */
.s4-nav{position:absolute;left:0;right:0;top:0;height:34px;display:flex;align-items:center;gap:5px;padding:0 6px;border-bottom:1px solid #e5e7eb;background:#fff;font-size:8px;color:#141a2e}
.s4-logo{display:flex;align-items:center;gap:3px;margin-right:auto;font-size:12px}
.s4-logo img{width:15px;height:15px}
.s4-logo b{font-weight:800}
.s4-in{position:relative;display:flex;align-items:center;height:22px;padding:0 7px;border:1px solid #d9dde4;border-radius:5px;font-weight:600;background:#fff}
.s4-title{width:82px}
.s4-sub{width:92px}
.s4-in u{text-decoration:none;white-space:nowrap;border-radius:2px}
.s4-in u.sel{background:#bfd4ff}
.s4-in em{position:absolute;left:7px;font-style:normal;color:#9aa1b1;font-weight:500}
.s4-sub.has em{display:none}
.s4-caret{width:1px;height:11px;margin-left:1px;background:#141a2e;opacity:0}
.s4-in.typing .s4-caret{opacity:1;animation:s4blink 1s steps(1) infinite}
@keyframes s4blink{50%{opacity:0}}
.s4-seg{display:flex;padding:2px;border-radius:6px;background:#f1f3f6}
.s4-seg b,.s4-seg span{padding:4px 6px;border-radius:5px;font-weight:600;color:#6b7280}
.s4-seg b{background:#fff;color:#141a2e;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.s4-chk{display:flex;align-items:center;gap:4px;font-weight:600}
.s4-chk i{display:grid;place-items:center;width:11px;height:11px;border-radius:3px;background:#141a2e}
.s4-chk svg{width:9px;height:9px;fill:none;stroke:#fff;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:round}
.s4-btn{padding:6px 8px;border-radius:5px;font-weight:700;color:#fff;white-space:nowrap}
.s4-btn.dark{background:#141a2e}
.s4-btn.blue{background:#3d5afe}
/* pages down the left */
.s4-pages{position:absolute;left:0;top:34px;bottom:0;width:64px;padding:8px 0 0;border-right:1px solid #e5e7eb;background:#fafbfc}
.s4-ph{display:flex;justify-content:space-between;align-items:center;padding:0 7px 6px;font-size:6.5px;color:#6b7280;letter-spacing:.06em}
.s4-ph i{font-style:normal;padding:1px 4px;border-radius:999px;background:#eceef2;color:#141a2e;font-weight:700}
.s4-th{display:flex;flex-direction:column;align-items:center;gap:3px;margin-bottom:8px}
.s4-th>span{position:relative;display:block;width:42px;height:59px;padding:5px 4px;border-radius:3px;border:1px solid #e1e4ea;background:#fff;transition:border-color .2s,box-shadow .2s}
.s4-th>span i{display:block;width:12px;height:2px;margin-bottom:4px;background:#141a2e}
.s4-th>span u{display:block;height:8px;margin-bottom:5px;border-bottom:1px solid #e5e7eb}
.s4-th .cov b{display:block;width:18px;height:3px;margin:16px 0 3px;background:#141a2e}
.s4-th .cov s{display:block;height:8px;border:1px solid #c9ced8;border-radius:2px}
.s4-th em{font-style:normal;font-size:6.5px;font-weight:700;color:#6b7280;padding:1px 5px;border-radius:999px;transition:background .2s,color .2s}
.s4-th.on>span{border-color:#3d5afe;box-shadow:0 0 0 1px #3d5afe}
.s4-th.on em{background:#3d5afe;color:#fff}
/* the preview: grey, with A4 portrait pages stacked; the stack slides up to scroll */
.s4-view{position:absolute;left:64px;right:150px;top:34px;bottom:0;overflow:hidden;background:#c3c9d3}
.s4-stack{position:absolute;left:68px;top:12px;width:250px;transition:transform .9s cubic-bezier(.45,.05,.3,1)}
.s4-page{position:relative;height:354px;margin-bottom:14px;padding:16px 18px;background:#fff;box-shadow:0 2px 6px rgba(17,24,39,.18)}
.s4-pl{display:flex;align-items:center;gap:3px;padding-bottom:7px;border-bottom:1px solid #e5e7eb;font-size:7.5px}
.s4-pl img{width:11px;height:11px}
.s4-pl b{font-weight:800}
.s4-cv{margin-top:120px}
.s4 .s4-cv h6{margin:0;font-family:"Roboto",system-ui,sans-serif;font-size:17px;font-weight:700;letter-spacing:-.01em;color:#141a2e;min-height:21px}
.s4-cv p{margin:3px 0 0;font-size:7.5px;font-weight:700;color:#475569;min-height:10px}
.s4-cv small{display:block;margin-top:8px;font-size:5px;font-weight:700;letter-spacing:.1em;color:#64748b}
.s4-box{display:grid;grid-template-columns:2fr 1fr;margin-top:18px;border:.5px solid #4b5563;border-radius:5px;overflow:hidden;font-size:5.5px;font-weight:700;color:#141a2e}
.s4-box span{padding:9px 7px}
.s4-box span:first-child{grid-column:1/3;border-bottom:.5px solid #4b5563}
.s4-box span:last-child{display:flex;justify-content:space-between;border-left:.5px solid #4b5563}
.s4-box b{font-size:7px}
.s4-hd{display:flex;align-items:center;gap:4px;padding-bottom:6px;margin-bottom:6px;border-bottom:1px solid #e5e7eb}
.s4-hd img{width:11px;height:11px}
.s4-hd b{font-size:8px;font-weight:800;color:#141a2e}
.s4-hd em{margin-left:auto;font-style:normal;font-size:5px;font-weight:700;color:#64748b}
.s4-q{position:relative;margin:0 -6px 6px;padding:6px 34px 4px 20px;border-radius:6px;border:1px solid transparent;transition:border-color .2s,background .2s}
.s4-q.sel{border-color:#3d5afe;background:#eff5ff;box-shadow:0 0 0 .5px #3d5afe}
.s4-q p{margin:0;font-size:7px;line-height:1.35;color:#141a2e}
.s4-q p i{position:absolute;left:7px;top:6px;font-style:normal;font-weight:800}
.s4-q p span{transition:opacity .2s}
.s4-q p span.swap{opacity:0}
.s4-q s{position:absolute;right:6px;top:6px;width:16px;padding-top:17px;text-decoration:none;font-size:4px;color:#6b7280;text-align:center}
.s4-q s::before{content:"";position:absolute;left:0;top:0;width:14px;height:14px;border:1px solid #9aa1b1;border-radius:2px;background:#fff}
.s4-lines u{display:block;height:9px;border-bottom:.75px solid #e2e8f0;animation:s4line .25s ease-out}
@keyframes s4line{from{height:0;opacity:0}}
.s4-pf{position:absolute;left:18px;right:18px;bottom:9px;display:flex;justify-content:space-between;font-size:4.5px;color:#94a3b8}
.s4-zoom{position:absolute;right:8px;bottom:8px;display:flex;align-items:center;gap:6px;padding:3px 3px 3px 8px;border-radius:999px;background:#fff;font-size:7px;font-weight:700;color:#141a2e;box-shadow:0 1px 3px rgba(0,0,0,.15)}
.s4-zoom em{padding:3px 6px;border-radius:999px;background:#141a2e;color:#fff;font-style:normal}
/* the Questions sidebar */
.s4-side{position:absolute;right:0;top:34px;bottom:0;width:150px;padding:8px 7px;border-left:1px solid #e5e7eb;background:#fff;font-size:7.5px;color:#141a2e}
.s4-sh{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:7px}
.s4-sh b{display:block;font-size:9px;font-weight:700}
.s4-sh small{font-size:6px;color:#6b7280}
.s4-sh span{padding:4px 6px;border-radius:5px;border:1px solid #c9dafc;background:#eef4ff;color:#3d5afe;font-weight:700;font-size:7px}
.s4-card{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:0 5px;margin-bottom:4px;padding:6px 7px;border-radius:7px;border:1px solid #e5e7eb;background:#fff;transition:border-color .2s,box-shadow .2s} /* no row gap, so the closed card 2 is the same height as the rest */
.s4-card em{font-style:normal;letter-spacing:-2px;color:#9aa1b1;font-size:7px}
.s4-card>i{display:grid;place-items:center;width:15px;height:15px;border-radius:4px;background:#f1f3f6;font-style:normal;font-weight:700;font-size:7px;transition:background .2s,color .2s}
.s4-card>b{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:700}
.s4-card>s{width:5px;height:5px;margin-right:2px;border:solid #6b7280;border-width:0 1px 1px 0;transform:rotate(45deg) translate(-1px,-1px);transition:transform .2s}
.s4-card.open{border-color:#3d5afe;box-shadow:0 0 0 1px #3d5afe}
.s4-card.open>i{background:#3d5afe;color:#fff}
.s4-card.open>s{transform:rotate(-135deg) translate(-1px,-1px)}
.s4-more{width:100%;max-height:0;overflow:hidden;transition:max-height .35s ease}
.s4-card.open .s4-more{max-height:90px;margin-top:5px}
.s4-more{transition:max-height .35s ease,margin-top .35s ease}
.s4-opt{display:flex;align-items:center;justify-content:space-between;padding:5px 0;border-top:1px solid #f0f1f4;font-weight:500}
.s4-opt span{display:flex;align-items:center;border:1px solid #e5e7eb;border-radius:4px}
.s4-opt i,.s4-opt u{width:13px;text-align:center;font-style:normal;text-decoration:none;font-weight:700;line-height:13px}
.s4-opt u{width:15px;border:solid #e5e7eb;border-width:0 1px}
.s4-opt i.off{color:#c4c9d4}
.s4-acts{display:flex;justify-content:space-between;align-items:center;padding-top:5px;border-top:1px solid #f0f1f4}
.s4-newq{padding:3px 6px;border:1px solid #d9dde4;border-radius:5px;font-weight:600;transition:transform .12s}
.s4-newq.press{transform:scale(.94)}
.s4-rm{color:#ef4444;font-weight:700}

/* ==========================================================================
   th-walk (was css/th-walk.css)
   ========================================================================== */
/* The treasure hunt walkthrough (js/walkthroughs.js): on alevel-treasurehunts.php (hero, maths typeset by MathJax) and mathsbox-gcse.php (plain
   text: add .mj to .q-th so the text shows straight away). Each page sizes its .stage (a 600x480 canvas: aspect-ratio 600/480).
   Moved here from alevel-treasurehunts.php. */
/* ---------- the walkthrough: a bird's-eye view of the room, on a fixed 600x440 canvas scaled to fit (script at the bottom).
   Six cards like the real ones (fr/images/th4.svg: answer box at the top, question below, letter bottom right) dotted round
   the room. A little person walks from card to card leaving a dotted trail: at each card its question lights up blue, and
   where they arrive the matching answer lights up green. The last answer is on card A, so the trail closes into a loop and
   turns green. No other text. Order: A D B F C E A ---------- */
/* no frame or floor: the cards sit straight on the page */
.cv.q-th{position:absolute;left:0;top:0;width:600px;height:480px;transform:scale(var(--s,1));transform-origin:0 0;overflow:visible;background:none;font:14px/1.4 "Roboto",system-ui,sans-serif;color:var(--ink)}
.th-card{position:absolute;width:150px;height:112px;padding:5px 7px 0;border-radius:9px;background:#fff;box-shadow:0 1px 2px rgba(20,26,46,.08),0 10px 20px -12px rgba(20,26,46,.4);transform:rotate(var(--r,0deg));z-index:2}
.th-card small{display:block;margin-bottom:3px;font-size:6px;line-height:1;text-align:center;color:#555}
.th-top,.th-q{display:grid;place-items:center;border:1px solid #222;border-radius:5px;transition:background .35s,border-color .35s,box-shadow .35s}
.th-top{height:21px;font-size:12px}
.th-q{height:56px;margin-top:4px;align-content:center;gap:3px;font-size:12.5px}
.th-q span{display:block;line-height:1.1}
.th-l{position:absolute;right:7px;bottom:5px;width:20px;height:16px;display:grid;place-items:center;border:1px solid #222;border-radius:4px;font-size:12px;font-weight:600}
.th-card.p0{left:28px;top:34px;--r:-4deg}.th-card.p1{left:236px;top:18px;--r:3deg}.th-card.p2{left:424px;top:50px;--r:-2deg}
.th-card.p3{left:412px;top:282px;--r:4deg}.th-card.p4{left:216px;top:302px;--r:-3deg}.th-card.p5{left:34px;top:268px;--r:2deg}
/* question being worked on: blue; the answer it leads to: green */
.th-q.ask{border-color:var(--blue);background:#eef1ff;box-shadow:0 0 0 2px rgba(61,90,254,.18)}
.th-top.hit{border-color:var(--blue);background:#eef1ff;box-shadow:0 0 0 2px rgba(61,90,254,.18)}
/* the dotted trail and the walker, over the floor and under the cards */
.th-floor{position:absolute;inset:0;width:600px;height:480px;z-index:1;pointer-events:none;overflow:visible}
.th-dots circle{fill:var(--blue);opacity:.6;transition:fill .5s,opacity .5s}
.q-th.closed .th-dots circle{fill:#13a05a;opacity:.9}
.th-dots.fade circle{opacity:0}
.th-walker{z-index:3}
/* the letter chain under the cards: each card's letter is added as it's reached, A → D → B …, back to A */
.th-chain{position:absolute;left:0;right:0;top:436px;height:32px;display:flex;justify-content:center;align-items:center;gap:6px}
.th-chain b{width:30px;height:30px;display:grid;place-items:center;border-radius:8px;background:#fff;border:1.5px solid var(--ink);font-size:15px;font-weight:800;color:var(--ink);animation:chainIn .35s cubic-bezier(.3,1.4,.5,1) both;transition:background .4s,border-color .4s,color .4s}
.th-chain i{font-style:normal;font-size:14px;font-weight:700;color:#868d9b;animation:chainIn .35s both}
@keyframes chainIn{from{opacity:0;transform:scale(.5)}}
.q-th.closed .th-chain b{background:#13a05a;border-color:#13a05a;color:#fff}
/* until MathJax has typeset the cards, hide their text (raw TeX looks broken) */
.q-th:not(.mj) :is(.th-top,.th-q){color:transparent}

/* ==========================================================================
   q3-walk (was css/q3-walk.css)
   ========================================================================== */
/* The 3 questions walkthrough (js/walkthroughs.js): on alevel3questions.php (hero) and mathsbox-alevel.php. Markup: a .stage.q3-stage holding
   .cv.q3.q-3q with three .q3-card (question, worked solution steps, answer), the A/B/C .q3-tab, the url and the .q3-cur cursor;
   see alevel3questions.php. The maths is typeset by MathJax: it stays hidden until .mj is on .q-3q (the script adds it).
   Everything is scoped to .q3-stage / .q-3q so it can share a page with other walkthroughs (generic .stage/.cv rules lose).
   Moved here from alevel3questions.php. */
/* ---------- the walkthrough: the differentiation set (fr/images/4q2.svg) rebuilt on a fixed 600x440 canvas, scaled to fit.
   Black slide, three question cards with a folded corner, an A/B/C arrow tab beside each. The cursor clicks a tab: that card
   grows to fill the slide and the worked solution comes in step by step; it clicks again, the card shrinks back with its answer
   on it, then on to the next. Cards at y 14, 156, 298 (448x128); tabs centred on each card ---------- */
.stage.q3-stage{position:relative;width:100%;aspect-ratio:600/440;overflow:visible;background:none;border-radius:18px;box-shadow:0 0 0 1px rgba(20,26,46,.1),0 30px 50px -28px rgba(17,24,39,.6)}
/* a deep navy slide with a soft glow top left, rather than flat black */
.cv.q-3q{position:absolute;left:0;top:0;width:600px;height:440px;transform:scale(var(--s,1));transform-origin:0 0;border-radius:calc(18px / var(--s,1));overflow:hidden;background:radial-gradient(90% 80% at 0% 0%,#26304f 0%,#141a2e 55%,#0e1220 100%);font:14px/1.4 "Roboto",system-ui,sans-serif;color:var(--ink)}
.q-3q .q3-card{--k:#4cbb47;position:absolute;left:18px;width:444px;height:126px;border-radius:12px;background:#fff;overflow:hidden;box-shadow:inset 5px 0 0 var(--k),0 12px 26px -12px rgba(0,0,0,.7);transition:top .55s cubic-bezier(.45,0,.2,1),height .55s cubic-bezier(.45,0,.2,1),opacity .4s,transform .4s}
/* the folded corner, as on the real slides */
.q-3q .q3-card::after{content:"";position:absolute;right:0;bottom:0;width:22px;height:22px;border-top-left-radius:4px;background:linear-gradient(to top left,#10141f 50%,#dfe2e8 50%)}
.q-3q .q3-a{top:16px}.q-3q .q3-b{top:157px;--k:#f2d500}.q-3q .q3-c{top:298px;--k:#ec3b3b}
.q-3q .q3-card.pre{opacity:0;transform:translateX(-14px)}
.q-3q .q3-card.open{top:16px;height:408px;z-index:3}
.q-3q.focus .q3-card:not(.open){opacity:.15}
.q-3q .q3-head{height:126px;padding:14px 22px 0 24px}
.q-3q .q3-head p{margin:0;font-size:12px;font-weight:700;letter-spacing:.02em;color:#6b7284}
.q-3q .q3-math{display:grid;place-items:center;height:88px;font-size:22px;color:#141a2e}
/* until MathJax has typeset the maths, hide it (the raw TeX looks broken) and fade it in once it's ready */
.q-3q:not(.mj) .q3-math,.q-3q:not(.mj) .q3-ans{opacity:0!important}
.q-3q .q3-math{transition:opacity .4s}
/* the answer left on a card once its solution has been shown */
.q-3q .q3-ans{position:absolute;right:26px;bottom:12px;padding:2px 10px;border-radius:999px;background:#eef0f4;color:#141a2e;font-size:12.5px;font-weight:700;opacity:0;transform:scale(.6);transition:opacity .3s,transform .35s cubic-bezier(.3,1.4,.5,1)}
.q-3q .q3-card.done .q3-ans{opacity:1;transform:none}
.q-3q .q3-card.open .q3-ans{opacity:0;transition:none}
/* the worked solution, under the question; it only shows once the card has grown */
.q-3q .q3-sol{position:absolute;left:18px;right:18px;top:128px;padding-top:12px;border-top:1px dashed #d5d9e2}
.q-3q .q3-sol small{display:block;margin-bottom:4px;font-size:12px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:#8a91a1}
.q-3q .q3-st{display:flex;align-items:center;gap:12px;min-height:66px;font-size:18px;opacity:0;transform:translateY(8px);transition:opacity .35s,transform .35s}
.q-3q .q3-st i{flex:none;width:104px;font-style:normal;font-size:12px;font-weight:700;color:#8a91a1}
.q-3q .q3-st.on{opacity:1;transform:none}
.q-3q .q3-st.fin{margin:6px -10px 0;padding:0 10px}
/* A/B/C arrow tabs: the same shape and colours as the real slides, flatter, with a white letter */
.q-3q .q3-tab{position:absolute;left:478px;width:100px;height:60px;display:grid;place-items:center;padding-right:24px;clip-path:polygon(0 8%,2% 0,72% 0,100% 50%,72% 100%,2% 100%,0 92%);font:800 30px/1 "Roboto",system-ui,sans-serif;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform .12s,filter .2s}
.q-3q .q3-tab.a{top:49px;background:linear-gradient(160deg,#6fd266,#3fa83a)}
.q-3q .q3-tab.b{top:190px;background:linear-gradient(160deg,#ffe866,#f0c800);color:#141a2e;text-shadow:none}
.q-3q .q3-tab.c{top:331px;background:linear-gradient(160deg,#ff6b6b,#d92b2b)}
.q-3q .q3-tab.down{transform:scale(.92);filter:brightness(.92)}
.q-3q .q3-url{position:absolute;right:22px;bottom:4px;font-size:9.5px;font-weight:700;letter-spacing:.02em;color:rgba(255,255,255,.55)}
.q-3q .q3-cur{position:absolute;left:0;top:0;z-index:20;width:22px;height:22px;transform:translate(560px,410px);transition:transform .7s cubic-bezier(.45,0,.2,1);filter:drop-shadow(0 2px 3px rgba(0,0,0,.4))}
.q-3q .q3-cur svg{width:100%;height:100%;transition:transform .12s;transform-origin:4px 2px}
.q-3q .q3-cur.down svg{transform:scale(.8)}

/* ==========================================================================
   sc-walk (was css/sc-walk.css)
   ========================================================================== */
/* The A Level skills check walkthrough (js/walkthroughs.js): on alevel-skillschecks.php (hero) and mathsbox-alevel.php. Markup: a
   .stage.sc-stage holding .cv.sc-cv (600x500 canvas: aspect-ratio 600/500); see those pages. Everything is scoped to
   .stage.sc-stage / .cv.sc-cv so it can share a page with other walkthroughs (e.g. the bare .stage and .cv rules in
   css/tarsia-walk.css): the size, overflow, background and font here win on specificity. Plain text, no MathJax.
   Moved here from alevel-skillschecks.php. */
/* ---------- the walkthrough: Week 1 of the free AS Core 1, half term 2 pack (fr/skills/as/a2a4.pdf, solutions from a2a.pdf),
   on a fixed 600x500 canvas scaled to fit. The projected slide: five question cards with the coloured
   1 to 5 arrows on the right. The cursor clicks a number: that card grows to fill the slide and its worked solution comes in
   a line at a time; a second click shrinks it back with its answer on it (question 1). Then the slide shrinks to one
   side and the same week's A4 sheet comes in; then a checklist of the half term's five skills. Grey notes with curly arrows
   explain each part. Reduced motion: the slide with its answers, beside the checklist. ---------- */
.stage.sc-stage{position:relative;width:100%;aspect-ratio:600/500}
.cv.sc-cv{position:absolute;left:0;top:0;width:600px;height:500px;transform:scale(var(--s,1));transform-origin:0 0;overflow:visible;background:none;font-family:"Roboto",system-ui,sans-serif;font-size:17px;line-height:1.55;color:#1f2330}
/* the slide */
.cv.sc-cv .sk-slide{position:absolute;left:0;top:56px;width:600px;height:384px;border-radius:16px;background:radial-gradient(80% 70% at 0% 0%,#26304f 0%,#141a2e 55%,#0e1220 100%);box-shadow:0 24px 44px -22px rgba(20,26,46,.6);transform-origin:0 0;transition:transform .8s cubic-bezier(.3,.7,.2,1)}
.cv.sc-cv.print .sk-slide{transform:translate(0,60px) scale(.48)}
.cv.sc-cv .sk-title{position:absolute;left:20px;top:15px;font-size:12px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#aeb4c5}
.cv.sc-cv .sk-week{position:absolute;right:20px;top:10px;padding:5px 13px;border-radius:999px;background:rgba(255,255,255,.1);font-size:12.5px;font-weight:800;color:#fff}
/* question cards, coloured edge on the left as the real slides' number colours */
.cv.sc-cv .sk-card{--k:#43a047;position:absolute;left:16px;width:470px;height:60px;box-sizing:border-box;padding:8px 14px 0 18px;border-radius:11px;background:#fff;overflow:hidden;box-shadow:inset 5px 0 0 var(--k),0 10px 22px -12px rgba(0,0,0,.7);font-family:Calibri,Carlito,"Segoe UI",Arial,sans-serif;font-size:13.5px;line-height:1.3;transition:top .55s cubic-bezier(.45,0,.2,1),height .55s cubic-bezier(.45,0,.2,1),opacity .4s}
.cv.sc-cv .sk-card.open{top:44px!important;height:326px;z-index:3}
.cv.sc-cv.focus .sk-card:not(.open){opacity:.12}
.cv.sc-cv .sk-ans{position:absolute;right:10px;bottom:6px;padding:2px 10px;border-radius:999px;background:#e5f6ec;font:700 12px/1.4 "Roboto",system-ui,sans-serif;color:#13794a;white-space:nowrap;opacity:0;transform:scale(.6);transition:opacity .3s,transform .35s cubic-bezier(.3,1.4,.5,1)}
.cv.sc-cv .sk-card.done .sk-ans{opacity:1;transform:none}
.cv.sc-cv .sk-card.open .sk-ans{opacity:0;transition:none}
/* the worked solution, under the question once the card has grown */
.cv.sc-cv .sk-sol{position:absolute;left:18px;right:18px;top:62px;padding-top:10px;border-top:1px dashed #d5d9e2}
.cv.sc-cv .sk-sol small{display:block;margin-bottom:6px;font:800 12px/1 "Roboto",system-ui,sans-serif;letter-spacing:.09em;text-transform:uppercase;color:#8a91a1}
.cv.sc-cv .sk-st{display:flex;align-items:center;min-height:38px;font-family:"Cambria Math",Cambria,"Times New Roman",serif;font-size:18px;opacity:0;transition:opacity .35s}
.cv.sc-cv .sk-st.on{opacity:1;transform:none}
.cv.sc-cv .sk-st.fin{font-weight:700}
/* the numbered arrows on the right */
.cv.sc-cv .sk-tab{position:absolute;left:498px;width:86px;height:46px;display:grid;place-items:center;padding-right:20px;box-sizing:border-box;clip-path:polygon(0 6%,2% 0,72% 0,100% 50%,72% 100%,2% 100%,0 94%);font:800 24px/1 "Roboto",system-ui,sans-serif;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform .12s,filter .2s,opacity .4s}
.cv.sc-cv .sk-tab.down{transform:scale(.9);filter:brightness(.9)}
.cv.sc-cv.focus .sk-tab:not(.cur){opacity:.25}
.cv.sc-cv .sk-cur{position:absolute;left:0;top:0;z-index:20;width:22px;height:22px;transform:translate(560px,470px);transition:transform .6s cubic-bezier(.45,0,.2,1),opacity .3s;filter:drop-shadow(0 2px 3px rgba(0,0,0,.4))}
.cv.sc-cv .sk-cur svg{width:100%;height:100%;transition:transform .12s;transform-origin:4px 2px}
.cv.sc-cv .sk-cur.down svg{transform:scale(.8)}
.cv.sc-cv.print .sk-cur{opacity:0}
/* grey notes, each with one thin curly arrow drawn in to what it explains */
.cv.sc-cv .sk-n{position:absolute;z-index:10;margin:0;font:600 17px/1.3 "Roboto",system-ui,sans-serif;color:#6b7284;opacity:0;transform:translateY(3px);transition:opacity .3s,transform .3s}
.cv.sc-cv .sk-n.on{opacity:1;transform:none}
.cv.sc-cv .sk-ink{position:absolute;inset:0;z-index:10;width:600px;height:500px;pointer-events:none;overflow:visible}
.cv.sc-cv .sk-ink path{fill:none;stroke:#9aa1b1;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1;opacity:0;transition:opacity .2s,stroke-dashoffset 0s linear .3s}
.cv.sc-cv .sk-ink path.on{stroke-dashoffset:0;opacity:1;transition:opacity .1s,stroke-dashoffset .5s ease-out}
/* the printed A4 sheet: the same Week 1 questions */
.cv.sc-cv .sk-a4{position:absolute;left:340px;top:30px;width:250px;height:354px;box-sizing:border-box;padding:12px 12px 0;background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(20,26,46,.12),0 22px 36px -16px rgba(20,26,46,.42);opacity:0;transform-origin:100% 0;transform:rotate(2deg) scale(.7);transition:opacity .45s,transform .8s cubic-bezier(.2,.8,.3,1)}
.cv.sc-cv.print .sk-a4{opacity:1;transform:rotate(2deg) scale(1.2)} /* zooms up to fill the right side */
.cv.sc-cv.list .sk-a4{opacity:0;transform:translateX(40px) rotate(4deg) scale(1.2)}
.cv.sc-cv .sk-a4 h4{margin:0 0 6px;font:500 17px/1 "Roboto",system-ui,sans-serif;letter-spacing:.04em}
.cv.sc-cv .sk-pq{position:relative;height:56px;margin-bottom:4px;padding-left:17px}
.cv.sc-cv .sk-pq b{position:absolute;left:-19px;top:22px;width:56px;transform:rotate(-90deg);font:400 6.5px/1 "Roboto",system-ui,sans-serif;letter-spacing:.06em;text-align:center}
.cv.sc-cv .sk-pq div{height:100%;box-sizing:border-box;padding:4px 5px;border:1px solid #222;border-radius:7px;font-family:Calibri,Carlito,Arial,sans-serif;font-size:6.3px;line-height:1.3}
.cv.sc-cv .sk-a4 .wk{position:absolute;right:12px;bottom:12px;font:700 12px/1 "Roboto",system-ui,sans-serif;letter-spacing:.04em}
.cv.sc-cv .sk-a4 .site{position:absolute;left:0;right:0;bottom:4px;text-align:center;font-size:4.5px;color:#555}
/* the checklist of this half term's five skills */
.cv.sc-cv .sk-list{position:absolute;left:236px;top:40px;z-index:12;width:364px;box-sizing:border-box;padding:24px 26px 22px;border-radius:16px;background:#fff;box-shadow:0 1px 2px rgba(20,26,46,.1),0 22px 40px -18px rgba(20,26,46,.45);opacity:0;transform:translateY(20px);transition:opacity .45s,transform .6s cubic-bezier(.2,.8,.3,1)}
.cv.sc-cv.list .sk-list{opacity:1;transform:none}
.cv.sc-cv .sk-list small{display:block;font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#8a91a1}
.cv.sc-cv .sk-list h5{margin:6px 0 16px;font-size:23px;font-weight:800;letter-spacing:-.01em;color:#141a2e}
.cv.sc-cv .sk-list ul{margin:0;padding:0;list-style:none;display:grid;gap:13px}
.cv.sc-cv .sk-list li{display:flex;gap:12px;align-items:flex-start;font-size:16px;font-weight:600;line-height:1.35;color:#1f2330;opacity:0;transform:translateX(-6px);transition:opacity .3s,transform .3s}
.cv.sc-cv .sk-list li.on{opacity:1;transform:none}
.cv.sc-cv .sk-list li i{flex:none;width:24px;height:24px;margin-top:-2px;border-radius:50%;display:grid;place-items:center;background:var(--k);color:#fff;font-style:normal;font-size:14px;font-weight:800}
.cv.sc-cv .sk-list p{margin:18px 0 0;padding-top:14px;border-top:1px solid #eceef3;font-size:15px;font-weight:700;color:#3d5afe}
@media (prefers-reduced-motion:reduce){.cv.sc-cv *{transition:none!important}}

/* ==========================================================================
   qp-hero (was css/qp-hero.css)
   ========================================================================== */
/* The Quick Print hero sheet (script: js/walkthroughs.js), used on quickprint.php and quickprint-secondary.php.
   As the shared .lh hero in css/lab.css (text on the left, a tilted A4 sheet running off the right and fading out), but the
   sheet is drawn in HTML like the real ones (images/add3quickprint.png) so it can change: twelve column additions, each a grid
   with a carry column, two numbers and an empty answer row. Above it, tilted with the sheet: New questions (makes a new set
   straight away; until someone clicks it, it presses itself every few seconds while the hero is on screen) and Try it free.
   The sheet is laid out at 620x877 and scaled to its width by the script. */
.qpb{pointer-events:none}
/* lab.css's .lh-bleed clips at its left edge, and the sheet's 2deg tilt swings its bottom-left corner towards it, so the
   shadow was cut off: start the clip 50px further left and move the sheet and buttons 50px right, so they stay put */
@media (min-width:901px){
 .lh-bleed.qpb{left:calc(56% - 50px)}
 .qpb .qp-tools{left:102px!important}
 .qpb .qp-a4{left:90px!important}
}
/* the heading's second half in grey, like the site's section headings ("New questions. Every click.") */
body.skills .lh h1 .g{color:var(--grey)}
/* a taller hero than lab.css's .lh (120px 0 72px), so more of the sheet shows before it fades */
@media (min-width:901px){.lh:has(> .qpb){padding:150px 0 150px}}
/* the buttons sit just above the sheet's top edge, tilted with it (same 2deg turn about the same corner) */
.qpb .qp-tools{position:absolute;top:44px;left:52px;z-index:2;display:flex;gap:8px;pointer-events:auto;transform:rotate(2deg);transform-origin:top left}
.qp-tb{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 14px;border:0;border-radius:999px;font:700 12.5px/1 "Roboto",system-ui,sans-serif;text-decoration:none;cursor:pointer;transition:transform .12s,background .2s}
.qp-tb svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round;transition:transform .4s}
.qp-tb.new{background:#3d5afe;color:#fff;box-shadow:0 8px 16px -8px rgba(61,90,254,.7)}
.qp-tb.new:hover{background:#2f49e0}
.qp-tb.new.down{transform:scale(.94)}
.qp-tb.new.down svg{transform:rotate(-180deg)}
.qp-tb.free{background:#fff;color:var(--ink);box-shadow:inset 0 0 0 1.5px #d5d9e2}
.qp-tb.free:hover{box-shadow:inset 0 0 0 1.5px var(--ink)}
.qp-tb:focus-visible{outline:3px solid #9fb0ff;outline-offset:2px}
.qpb .qp-a4{position:absolute;top:84px;left:40px;width:min(620px,48vw);aspect-ratio:620/877;overflow:hidden;border-radius:18px;background:#fff;box-shadow:0 22px 44px rgba(20,26,46,.22),0 0 0 1px rgba(20,26,46,.08);transform:rotate(2deg);transform-origin:top left}
.qp-in{position:absolute;left:0;top:0;width:620px;height:877px;transform:scale(var(--s,1));transform-origin:0 0;font-family:Arial,Helvetica,sans-serif;color:#111}
/* the logo: undo lab.css's hero picture rule (body.skills .lh-bleed img), which is meant for a whole-sheet image */
body.skills .lh-bleed .qp-in>img{position:absolute;left:24px;top:22px;width:30px;height:30px;max-width:none;border-radius:0;background:none;box-shadow:none;transform:none}
.qp-name{position:absolute;left:348px;top:22px;font-size:12px}
.qp-name::after{content:"";position:absolute;left:42px;top:15px;width:200px;border-bottom:1px solid #111}
.qp-q{position:absolute;width:200px;height:95px}
.qp-q i{position:absolute;left:0;top:2px;font-style:normal;font-size:12px}
.qp-q em{position:absolute;left:36px;top:36px;font-style:normal;font-size:13px}
/* the grid's columns are set by the script: a carry column, then one per digit of the longer number */
.qp-g{position:absolute;left:48px;top:0;display:grid;grid-auto-columns:29.5px;grid-template-rows:repeat(3,29.5px);border-right:1px solid #9aa0aa;border-bottom:2px solid #111}
.qp-g span{display:grid;place-items:center;border-left:1px solid #9aa0aa;border-top:1px solid #9aa0aa;font-size:18px;line-height:1}
.qp-g span.a{border-top:2px solid #111}
@media (max-width:900px){
 .lh-bleed.qpb{height:340px;margin-left:0}
 .qpb .qp-tools{top:22px;left:calc(8% + 26px)}
 .qpb .qp-a4{top:64px;left:calc(8% + 16px);width:min(520px,84%)}
}
