/* Year 10 Extended — the course pages (/maths/year-10/).
 *
 * The layout, header, menu, section header, objectives box and overlay are the
 * Year 9 science unit page's (science-unit.css, science-unit-steps.css). This
 * file adds only what maths needs: the unit's opening block, the "coming"
 * line, the grid of quiz skills, and the course index. Tokens only. */

.mc-eyebrow-link { color: inherit; text-decoration: none; }
.mc-eyebrow-link:hover { color: var(--paper); text-decoration: underline; }

.mc-draft {
    padding: 4px 12px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--gold);
}

.mc-unit .sci-item-text small { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------- the unit's opening */

.mc-guiding {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 16px;
    margin-top: 28px;
}
.mc-guide {
    --guide: var(--teal);
    padding: 18px 20px;
    border-radius: 16px;
    border-top: 5px solid var(--guide);
    background: color-mix(in srgb, var(--guide) 10%, var(--paper));
}
.mc-guide-conceptual { --guide: var(--gold); }
.mc-guide-debatable { --guide: var(--tangerine); }
.mc-guide-name {
    margin: 0 0 8px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--ink);
}
.mc-guide ul { margin: 0; padding-left: 1.1rem; }
.mc-guide li { margin-bottom: 0.4rem; font-size: 0.98rem; line-height: 1.5; }

.mc-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 18px;
    margin-top: 22px;
}
.mc-fact, .mc-before {
    padding: 22px 26px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
}
.mc-fact h3, .mc-before h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--ink);
}
.mc-fact h3 i { color: var(--teal-deep); }
.mc-before h3 i { color: var(--tangerine); }
.mc-fact p, .mc-before p { margin: 0 0 0.8rem; font-size: 0.98rem; line-height: 1.6; }
.mc-fact ul, .mc-before ul, .mc-plainlist { margin: 0 0 0.6rem; padding-left: 1.2rem; }
.mc-fact li, .mc-before li, .mc-plainlist li { margin-bottom: 0.4rem; font-size: 0.98rem; line-height: 1.55; }
.mc-fact-name { margin-top: 1rem; font-weight: 700; color: var(--ink); }
.mc-fact-name:first-of-type { margin-top: 0; }
.mc-before {
    margin-top: 22px;
    border: 2px solid var(--ink);
    box-shadow: 6px 6px 0 color-mix(in srgb, var(--tangerine) 28%, var(--paper));
    scroll-margin-top: calc(var(--sci-top) + var(--sci-head-h) + var(--sci-strip-h) + 8px);
}

/* ------------------------------------------------------------- a section */

.mc-goals-name {
    margin: 14px 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--strand-ink);
}
.mc-goals-name:first-of-type { margin-top: 0; }
.mc-goals-list li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}
.mc-goals-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 3px;
    background: var(--strand);
}

.mc-pill-soon { opacity: 0.45; cursor: default; }

.mc-soon {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 26px 0 0;
    padding: 12px 16px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--muted);
}

.mc-count { margin-left: 6px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

.mc-group { margin-top: 22px; }
.mc-group:first-of-type { margin-top: 0; }
.mc-group-name {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--ink);
}
.mc-skills {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: 10px;
}
.mc-skill {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 10px 14px;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    color: var(--ink);
    font-size: 0.93rem;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}
.mc-skill:hover {
    border-color: var(--tangerine);
    background: color-mix(in srgb, var(--tangerine) 8%, var(--paper));
    color: var(--ink);
}
.mc-skill-title { flex: 1 1 auto; min-width: 0; }
.mc-skill-badge {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--gold) 30%, var(--paper));
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.mc-skill-tick {
    flex: 0 0 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 2px solid var(--line);
    border-radius: 50%;
    font-size: 0.7rem;
    color: transparent;
}
.mc-skill.is-done { border-color: color-mix(in srgb, var(--teal) 55%, var(--paper)); background: var(--mint); }
.mc-skill.is-done .mc-skill-tick { border-color: var(--teal-deep); background: var(--teal-deep); color: var(--paper); }

/* ------------------------------------------------------- the course index */

.mc-index-main { max-width: 1100px; margin: 0 auto; padding: 36px clamp(18px, 4vw, 44px) 90px; }
.mc-lead { max-width: 62ch; margin: 0 0 14px; font-size: 1.15rem; line-height: 1.6; }
.mc-more a { font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.mc-criteria {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
}
.mc-criteria li {
    padding: 5px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.4;
}
.mc-units { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.mc-unitcard > a {
    display: flex;
    gap: 20px;
    padding: 20px 24px;
    border: 2px solid var(--line);
    border-radius: 20px;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
}
.mc-unitcard > a:hover { border-color: var(--strand); box-shadow: 6px 6px 0 var(--strand-soft); color: var(--ink); }
.mc-unitcard-num {
    flex: 0 0 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--strand-soft);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--strand-ink);
}
/* A unit mark longer than a digit or two: "12.10", "AHL 1". */
.mc-unitcard-num.is-long { font-size: 0.95rem; letter-spacing: -0.01em; }
.mc-unitcard-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 4px; min-width: 0; }
.mc-unitcard-meta {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--strand-ink);
}
.mc-unitcard-title { font-size: 1.4rem; font-weight: 800; line-height: 1.2; }
.mc-unitcard-q { font-size: 1rem; line-height: 1.5; color: var(--muted); }
.mc-unitcard-secs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mc-unitcard-secs span {
    padding: 3px 10px;
    border-radius: 8px;
    background: var(--strand-soft);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.5;
}
.mc-unitcard-prog {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    font-size: 0.82rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.mc-unitcard-prog progress { flex: 0 1 220px; background: var(--line); }
.mc-unitcard-prog progress::-webkit-progress-bar { background: var(--line); }

@media (max-width: 575.98px) {
    .mc-unitcard > a { flex-direction: column; gap: 12px; padding: 18px; }
    .mc-fact, .mc-before { padding: 18px; }
}

/* ------------------------- teachers: add a skill to a quiz in the library */

.mc-skillbox { display: flex; flex-direction: column; gap: 4px; }
.mc-skillbox .mc-skill { flex: 1 1 auto; }
.mc-add,
.mc-addall {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 4px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--teal-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.mc-add:hover, .mc-addall:hover { color: var(--ink); }

/* The overlay when the practice page did not load. */
.mc-overlay-fail { margin: 0; padding: 28px 24px; font-size: 1rem; line-height: 1.6; color: var(--ink); }
.mc-overlay-fail a { color: var(--teal-deep); font-weight: 600; }
.sci-overlay-frame[hidden] { display: none; }

/* ------------------------------------------------ worked examples and videos */

.mc-example-soon {
    margin: 0;
    padding: 4px 12px;
    border: 1px dashed var(--line);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--muted);
}
.mc-video { align-self: flex-start; margin-top: 6px; font-size: 0.9rem; font-weight: 700; color: var(--teal-deep); }

.mc-videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 18px;
}
.mc-vid { min-width: 0; }
.mc-vid-thumb, .mc-vid-frame {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--ink);
}
.mc-vid-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mc-vid-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    color: var(--ink);
}
.mc-vid-play i {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    padding-left: 4px;
    border-radius: 50%;
    background: var(--cyan);
}
.mc-vid-thumb:hover .mc-vid-play i { background: var(--paper); }
/* A video this reader may not play: its title stays, the frame says how. */
.mc-vid-locked { display: grid; place-items: center; text-decoration: none; }
.mc-vid-locked .mc-vid-play i { padding-left: 0; background: var(--paper); }
.mc-vid-ask {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    color: var(--paper);
}
.mc-video-ask { color: var(--muted); }
.mc-unit .mc-vid-title { margin: 10px 0 0; font-size: 1rem; font-weight: 700; line-height: 1.3; color: var(--ink); }
.mc-vid-by { margin: 2px 0 0; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.mc-vid-note { margin: 6px 0 0; font-size: 0.9rem; line-height: 1.5; }

/* ------------------------------ the unit's opening page: question, sections, facts */

.mc-about {
    margin: 26px 0 0;
    padding: 22px 26px;
    border: 2px solid var(--ink);
    border-radius: 22px;
    background: var(--ink);
    color: var(--paper);
}
.mc-about-tag {
    margin: 0 0 6px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--gold);
}
.mc-unit .mc-about-q { margin: 0; font-size: clamp(1.3rem, 2.1vw, 1.8rem); font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; color: var(--paper); }
.mc-about-meta { margin: 6px 0 0; font-size: 0.86rem; color: var(--mint2); }
.mc-about-body { padding-bottom: 12px; }

.mc-seclist { margin-top: 30px; }
.mc-unit .mc-seclist h2 { margin: 0 0 14px; font-size: 1.25rem; font-weight: 800; line-height: 1.25; }
.mc-secrows { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mc-secrow {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 68px;
    padding: 10px 18px 10px 12px;
    border: 2px solid var(--line);
    border-radius: 16px;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
}
.mc-secrow:hover { border-color: var(--strand); background: var(--strand-soft); color: var(--ink); }
.mc-secrow-text { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.mc-secrow-text b { font-size: 1.02rem; font-weight: 700; line-height: 1.3; }
.mc-secrow-text small { margin-top: 2px; font-size: 0.84rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.mc-secrow-go { color: var(--muted); }
.mc-secrow:hover .mc-secrow-go { color: var(--ink); }

/* ----------------------------------------- foot of every page: previous and next */

.mc-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 32px;
}
.mc-pager-link {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 68px;
    padding: 12px 18px;
    border: 2px solid var(--ink);
    border-radius: 16px;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
}
.mc-pager-link:hover { background: var(--mint); color: var(--ink); }
.mc-pager-link span { display: flex; flex-direction: column; min-width: 0; }
.mc-pager-link small { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; line-height: 1.4; text-transform: uppercase; color: var(--muted); }
.mc-pager-link b { font-size: 1rem; font-weight: 700; line-height: 1.3; }
.mc-pager-next { grid-column: 2; justify-content: flex-end; text-align: right; background: var(--ink); color: var(--paper); }
.mc-pager-next small { color: var(--gold); }
.mc-pager-next:hover { background: var(--teal-deep); color: var(--paper); }
.mc-unit .sci-plain.is-on { background: var(--mint); color: var(--ink); }
@media (max-width: 699.98px) {
    .mc-about { padding: 18px; }
    .mc-pager { grid-template-columns: minmax(0, 1fr); }
    .mc-pager-next { grid-column: 1; grid-row: 1; }
}

/* --------------------------------------------- quizzes: one button, then a list */

.mc-quizcard {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    max-width: 720px;
    padding: 20px 24px;
    border: 2px solid var(--sci-peach-line, var(--line));
    border-radius: 18px;
    background: var(--sci-peach, var(--paper));
}
.mc-quizcard-text b { font-size: 1.15rem; }
.mc-quizcard-text p { margin: 2px 0 0; font-size: 0.92rem; color: var(--muted); }
.mc-quizcard .mc-count { margin-left: 0; }
.mc-skillset > summary { list-style: none; cursor: pointer; }
.mc-skillset > summary::-webkit-details-marker { display: none; }
.mc-skillset[open] > .mc-skillpanel { margin-top: 16px; }
.mc-quizcard .mc-skillset[open] { flex-basis: 100%; }
.mc-before .mc-skillset { margin-top: 10px; }

.mc-overlay-skills { max-width: 980px; max-height: min(92vh, 860px); }
.mc-overlay-skillsbody { overflow-y: auto; padding: 20px 22px 26px; background: var(--cream); }
.mc-overlay-skillsfoot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin: 0;
    padding: 10px 14px 10px 22px;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
    font-weight: 600;
}

/* ---------------------------------------------- review pass: quicker practice */

.mc-unitnav { display: flex; gap: 6px; }
.mc-unitnav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid color-mix(in srgb, var(--paper) 35%, transparent);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--mint2);
    text-decoration: none;
}
.mc-unitnav a:hover { background: var(--paper); color: var(--ink); }

/* A section opens with practice beside what it covers. */
.mc-sectop {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 20px;
    align-items: start;
    margin-top: 22px;
}
.mc-sectop .sci-goals { grid-column: 1; grid-row: 1; margin-top: 0; }
.mc-sectop .mc-quizcard { grid-column: 2; grid-row: 1; max-width: none; flex-direction: column; align-items: stretch; scroll-margin-top: calc(var(--sci-bars) + var(--sci-sechead-h) + 12px); }
.mc-sectop .mc-quizcard:only-child, .mc-sectop .sci-goals:only-child { grid-column: 1 / -1; }
.mc-quizcard-text b i { color: var(--tangerine); }
.mc-quizcard .mc-skillset > summary { width: 100%; }
.mc-goals-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 899.98px) {
    .mc-sectop { grid-template-columns: minmax(0, 1fr); }
    .mc-sectop .sci-goals, .mc-sectop .mc-quizcard { grid-column: 1; grid-row: auto; }
}

/* A skill in the list: its name, one example question, how hard it is. */
.mc-skills { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.mc-skill { align-items: flex-start; }
.mc-skill-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 6px; min-width: 0; }
.mc-skill-eg {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    font-size: 0.86rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--muted);
}
.mc-skill-eg:empty { display: none; }
.mc-skill-eg p { display: inline; margin: 0; }
.mc-skill-eg p + p::before { content: " "; }
.mc-skill-eg svg, .mc-skill-eg img, .mc-skill-eg table { display: none; }
.mc-skill-meta { display: flex; align-items: center; gap: 10px; }
.mc-dots { display: inline-flex; gap: 4px; }
.mc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.mc-dot.is-on { background: var(--teal-deep); }

/* Course index: find a skill, and section links on each unit. */
.mc-finder {
    margin: 0 0 26px;
    padding: 18px 20px;
    border: 2px solid var(--ink);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: 6px 6px 0 var(--mint2);
}
.mc-finder label { display: block; margin-bottom: 8px; font-size: 1.1rem; font-weight: 800; }
.mc-finder input { min-height: 48px; font-size: 1rem; }
.mc-finder-count { margin: 8px 0 0; font-size: 0.86rem; color: var(--muted); }
.mc-finder-count:empty { display: none; }
.mc-finder-list { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.mc-finder-list a {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 16px;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    text-decoration: none;
}
.mc-finder-list a:hover { border-color: var(--tangerine); background: color-mix(in srgb, var(--tangerine) 8%, var(--paper)); }
.mc-finder-list span { font-size: 0.84rem; color: var(--muted); }

.mc-unitcard {
    display: flex;
    gap: 20px;
    padding: 20px 24px;
    border: 2px solid var(--line);
    border-radius: 20px;
    background: var(--paper);
}
a.mc-unitcard-title { color: var(--ink); text-decoration: none; }
a.mc-unitcard-title:hover { color: var(--teal-deep); text-decoration: underline; }
.mc-unitcard-secs a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 3px 12px;
    border-radius: 10px;
    background: var(--strand-soft);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
    text-decoration: none;
}
.mc-unitcard-secs a:hover { background: var(--strand); }
@media (max-width: 575.98px) {
    .mc-unitcard { flex-direction: column; gap: 12px; padding: 18px; }
    .mc-unitcard-num { flex-basis: 44px; width: 44px; height: 44px; font-size: 1.2rem; }
    .mc-unitcard-num.is-long { font-size: 0.72rem; }
}

/* A short convention note under a section's objectives. */
.mc-secnote {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin: 16px 0 0;
    padding: 12px 16px;
    border-left: 4px solid var(--tangerine);
    border-radius: 10px;
    background: var(--paper);
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--ink);
}
.mc-secnote i { color: var(--tangerine); }

/* -------------------------------------------------------------- worked examples
   A strip of titles picks one example. It is then either stepped through one
   screen at a time (mc-ex-steps) or answered first and opened a line at a time
   (mc-ex-try). Without the script every example and every line is on the page. */

.mc-ex [hidden] { display: none !important; }
.mc-ex { display: flex; flex-direction: column; gap: 14px; }
.mc-ex-strip {
    display: flex;
    gap: 8px;
    margin-right: calc(var(--sci-pad) * -1);
    padding: 2px var(--sci-pad) 8px 2px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.mc-ex-tab {
    flex: 0 0 auto;
    max-width: 230px;
    min-height: 56px;
    padding: 9px 14px;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    color: var(--ink);
}
.mc-ex-tab span {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.mc-ex-tab:hover { border-color: var(--teal-deep); }
.mc-ex-tab[aria-selected="true"] { border-color: var(--ink); box-shadow: 4px 4px 0 var(--line); }
.mc-ex-tab:focus-visible, .mc-ex-btn:focus-visible, .mc-ex-try input:focus-visible { outline: 3px solid var(--tangerine); outline-offset: 2px; }

.mc-ex-panel {
    border: 2px solid var(--ink);
    border-radius: 20px;
    background: var(--paper);
    overflow: hidden;
}
.mc-ex-name {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--teal-deep);
}
.mc-unit .mc-ex-title { margin: 4px 0 0; font-size: 1.4rem; font-weight: 800; line-height: 1.2; color: var(--ink); }
.mc-ex-q { margin: 0; max-width: 46ch; font-size: 1.1rem; line-height: 1.6; }
.mc-ex-calc {
    margin: 0;
    font-family: var(--font-question);
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink);
    overflow-x: auto;
    overflow-y: hidden;
}
.mc-ex-row .mc-ex-calc { font-size: clamp(1.15rem, 1.8vw, 1.45rem); }
.mc-ex-say { margin: 0; max-width: 48ch; font-size: 1rem; line-height: 1.6; }
.mc-ex-nudge { margin: 0; font-size: 0.9rem; color: var(--muted); }
.mc-ex-wrap { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--mint); font-weight: 600; line-height: 1.5; }
.mc-ex-fig > svg, .mc-ex-thumb > svg, .mc-ex-grid li > svg { display: block; width: 100%; height: auto; }
.mc-ex-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 0.86rem; color: var(--muted); }
.mc-ex-key li { display: inline-flex; align-items: center; gap: 6px; }
.mc-swatch { flex: 0 0 auto; }

.mc-ex-btn {
    min-height: 44px;
    padding: 0 20px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--ink);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--paper);
}
.mc-ex-btn:disabled { opacity: 0.3; }
.mc-ex-btn-ghost { background: transparent; color: var(--ink); }
.mc-ex-btn-go { border-color: var(--tangerine); background: var(--tangerine); color: var(--ink); }

.mc-ex-try { display: flex; flex-direction: column; gap: 8px; }
.mc-ex-tryrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mc-ex-tryrow label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.mc-ex-try input {
    width: 7.5rem;
    min-height: 44px;
    padding: 0 12px;
    border: 2px solid var(--ink);
    border-radius: 10px;
    background: var(--paper);
    font-family: var(--font-question);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
}
.mc-ex-fb { min-height: 1.6em; font-weight: 600; }
.mc-ex-fb p { margin: 0; }
.mc-ex-fb .fa-check { color: var(--teal-deep); }

/* try: the question on the left, the working on the right */
.mc-ex-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.mc-ex-ask, .mc-ex-work { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 24px; }
.mc-ex-work { border-left: 2px solid var(--ink); background: var(--cream); }
.mc-ex-ask .mc-ex-fig { max-width: 400px; }
.mc-ex-workhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.mc-unit .mc-ex-workhead h6 { margin: 0; font-size: 1.1rem; font-weight: 800; color: var(--ink); }
.mc-ex-count { font-size: 0.84rem; color: var(--muted); }
.mc-ex-rows { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.mc-ex-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.mc-ex-row.has-fig { grid-template-columns: minmax(0, 1fr); }
.mc-ex-row:focus { outline: none; }
.mc-ex-rowtext { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mc-ex-thumb { max-width: 340px; }

/* steps: the drawing on the left, one step on the right */
.mc-ex-screen { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center; padding: 26px; }
.mc-ex-screen.has-fig { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.mc-ex-screen:focus { outline: none; }
.mc-ex-screen .mc-ex-fig { justify-self: center; width: 100%; max-width: 380px; }
.mc-ex-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mc-ex.is-ready .mc-ex-screens { display: grid; }
.mc-ex.is-ready .mc-ex-screen { min-height: 300px; }
.mc-ex-screen + .mc-ex-screen { border-top: 1px solid var(--line); }
.mc-ex.is-ready .mc-ex-screen + .mc-ex-screen { border-top: 0; }
.mc-ex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.mc-ex-grid li { display: grid; gap: 8px; align-content: start; text-align: center; }
.mc-ex-grid .mc-ex-calc { font-size: 1.05rem; }
.mc-ex-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 14px 26px;
    border-top: 2px solid var(--ink);
    background: var(--cream);
}
.mc-ex-dots { display: inline-flex; gap: 6px; margin-inline: auto; }
.mc-ex-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.mc-ex-dots i.is-on { background: var(--tangerine); }
.mc-ex-foot { display: flex; justify-content: flex-end; padding: 10px 24px; border-top: 1px solid var(--line); }

@media (max-width: 899.98px) {
    .mc-ex-split, .mc-ex-screen.has-fig { grid-template-columns: minmax(0, 1fr); }
    .mc-ex-work { border-top: 2px solid var(--ink); border-left: 0; }
    .mc-ex-ask, .mc-ex-work, .mc-ex-screen { padding: 18px; }
    .mc-ex-screen .mc-ex-fig { max-width: 280px; }
    .mc-ex.is-ready .mc-ex-screen { min-height: 0; }
    .mc-ex-nav { padding: 12px 18px; }
    .mc-ex-nav { flex-wrap: nowrap; justify-content: space-between; }
    .mc-ex-dots { display: none; }
    .mc-ex-count { margin-inline: auto; }
}
@media print {
    .mc-ex-panel { break-inside: avoid; margin-bottom: 14px; }
}

/* A section's printable worksheets. */
.mc-step-sheet .sci-stepic { background: var(--ink); color: var(--paper); }
.mc-pill-sheet i { color: var(--ink); }
.mc-sheets { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mc-sheet {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 640px;
    padding: 16px 18px;
    border: 2px solid var(--ink);
    border-radius: 16px;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
}
.mc-sheet:hover { box-shadow: 4px 4px 0 var(--line); color: var(--ink); }
.mc-sheet > i:first-child { font-size: 1.5rem; color: var(--tangerine); }
.mc-sheet span { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.mc-sheet small { font-size: 0.86rem; line-height: 1.4; color: var(--muted); }

/* Which kind of rule a worked example is about. */
.mc-ex-rule { margin: 8px 0 0; padding-left: 10px; border-left: 4px solid var(--teal); font-size: 0.9rem; line-height: 1.45; color: var(--muted); }
.mc-ex-rule b { color: var(--ink); }
.mc-ex-rule-term { border-left-color: var(--tangerine); }

/* What a section will hold once it is written: one dashed card for each of
   worked examples, worksheet, videos and exam review, in its own colour. */
.mc-tocome { margin-top: 28px; }
.mc-tocome-h {
    margin: 0 0 12px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.mc-tocome-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mc-tocome-card {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border: 2px dashed var(--strand);
    border-radius: 14px;
    background: var(--strand-soft);
}
.mc-tocome-card i { font-size: 1.2rem; color: var(--strand-ink); }
.mc-tocome-card span { display: flex; flex-direction: column; min-width: 0; }
.mc-tocome-card b { font-size: 1rem; font-weight: 700; color: var(--ink); }
.mc-tocome-card small { font-size: 0.84rem; color: var(--muted); }

/* Key points, the calculator and the graphs to explore on a section page. */
.mc-unit .mc-block-h {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 34px 0 14px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ink);
}
.mc-block-h i { color: var(--tangerine); }
.mc-keys-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 14px; }
.mc-key { padding: 18px 20px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); min-width: 0; }
.mc-key mjx-container { max-width: 100%; overflow-x: auto; overflow-y: hidden; vertical-align: middle; }
.mc-unit .mc-key h4 { margin: 0 0 8px; font-size: 1.02rem; font-weight: 800; color: var(--teal-deep); }
.mc-key ul { display: grid; gap: 8px; margin: 0; padding: 0 0 0 18px; line-height: 1.55; }
.mc-key li { min-width: 0; }
.mc-key li::marker { color: var(--tangerine); }

.mc-gdc-grid { display: grid; gap: 14px; }
.mc-gdc-card {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-left: 6px solid var(--gold);
    border-radius: 14px;
    background: var(--paper);
}
.mc-unit .mc-gdc-card h4 { margin: 0 0 6px; font-size: 1.02rem; font-weight: 800; color: var(--ink); }
.mc-gdc-path { margin: 0 0 8px; font-weight: 700; color: var(--teal-deep); }
.mc-gdc-card ul { margin: 0; padding-left: 18px; line-height: 1.5; color: var(--muted); }
.mc-gdc-shot { display: block; margin: 0; }
.mc-gdc-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; }
.mc-gdc-empty {
    display: grid;
    place-items: center;
    min-height: 120px;
    border: 2px dashed var(--gold);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--muted);
}

/* Where the owner drops a calculator screenshot (mathcourse/_shot_drop.html). */
.mc-gdc-side { display: grid; gap: 10px; min-width: 0; }
.mc-shot-drop { display: grid; gap: 6px; padding: 10px 12px; border: 2px dashed var(--ink); border-radius: 10px; background: color-mix(in srgb, var(--gold) 12%, var(--paper)); font-size: 0.86rem; color: var(--ink); }
.mc-shot-drop.is-over, .mc-shot-many.is-over { border-style: solid; border-color: var(--tangerine); background: color-mix(in srgb, var(--tangerine) 14%, var(--paper)); }
.mc-shot-drop.is-busy { opacity: 0.6; }
.mc-shot-drop:focus-visible { outline: 3px solid var(--tangerine); outline-offset: 2px; }
.mc-shot-code { justify-self: start; padding: 2px 8px; border: 1px solid var(--ink); border-radius: 6px; background: var(--paper); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.84rem; font-weight: 700; color: var(--ink); user-select: all; }
button.mc-shot-code { cursor: copy; }
button.mc-shot-code.is-copied { background: var(--mint2); }
.mc-shot-pick { font-weight: 700; text-decoration: underline; cursor: pointer; color: var(--teal-deep); }
.mc-shot-remove { justify-self: start; padding: 0; border: 0; background: none; font-size: 0.84rem; font-weight: 700; text-decoration: underline; color: var(--muted); }
.mc-shot-say { font-weight: 700; color: var(--teal-deep); }
.mc-shot-say.is-bad { color: var(--tangerine); }
.mc-shot-many { margin: 18px 0 12px; padding: 22px; border: 2px dashed var(--ink); border-radius: 16px; background: var(--mint); text-align: center; font-weight: 600; color: var(--ink); }
.mc-shot-many p { margin: 0; }
.mc-shot-many code { color: var(--ink); font-weight: 700; }
.mc-shot-all { font-size: 0.84rem; color: var(--teal-deep); }
.mc-shot-filter { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 8px; font-weight: 700; color: var(--ink); }
.mc-shot-group h2 { margin: 26px 0 10px; font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.mc-shot-group h2 small { margin-left: 8px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.mc-shot-rows { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mc-shot-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-left: 6px solid var(--gold); border-radius: 12px; background: var(--paper); }
.mc-shot-row.is-done { border-left-color: var(--teal); }
.mc-shot-what { display: grid; gap: 6px; justify-items: start; color: var(--ink); }
.mc-shot-what a { font-size: 0.88rem; color: var(--teal-deep); }
.mc-shot-row .mc-gdc-empty { min-height: 64px; }
.mc-shot-word { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 6px; align-items: center; font-weight: 600; }
.mc-shot-word input { min-height: 32px; padding: 2px 8px; border: 1px solid var(--ink); border-radius: 6px; background: var(--paper); font-size: 0.86rem; color: var(--ink); }
.mc-shots-missing .mc-shot-row.is-done { display: none; }
@media (max-width: 760px) {
    .mc-shot-row { grid-template-columns: minmax(0, 1fr); }
}

.mc-applet { margin-top: 26px; padding: 6px 22px 22px; border: 2px solid var(--ink); border-radius: 18px; background: var(--paper); }
.mc-unit .mc-applet .mc-block-h { margin-top: 18px; }
.mc-applet-lead { margin: 0 0 14px; color: var(--muted); }
.mc-applet-say { margin: 16px 0; padding: 12px 16px; border-radius: 12px; background: var(--mint); font-weight: 600; line-height: 1.5; color: var(--ink); }
@media (max-width: 767.98px) {
    .mc-gdc-card { grid-template-columns: minmax(0, 1fr); }
    .mc-applet { padding: 2px 14px 16px; }
}

/* Label and value rows, used by the Explore applets (maths-applets.css). */
.mc-det-facts { display: grid; gap: 8px; margin: 0; }
.mc-det-facts > div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 14px; border-radius: 10px; background: var(--mint); }
.mc-det-facts dt { font-weight: 600; color: var(--ink); }
.mc-det-facts dd { margin: 0; font-weight: 800; text-align: right; color: var(--ink); }

/* A problem set that is still to come. */
.mc-sheet-soon { border-style: dashed; border-color: var(--gold); background: none; cursor: default; }
.mc-sheet-soon:hover { box-shadow: none; }
.mc-sheet-soon > i:first-child { color: var(--gold); }

/* A file a visitor must sign in to download: the same card, saying so. */
.mc-sheet-ask { flex-wrap: wrap; border-style: dashed; }
.mc-sheet-ask > span { flex-basis: 12rem; }
.mc-ask {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--ink);
    font-size: 0.86rem;
    font-style: normal;
    font-weight: 700;
    color: var(--paper);
    white-space: nowrap;
}

/* An exam review pack: its facts, its papers and its question map. */
.mc-rv-facts { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 14px; padding: 0; list-style: none; }
.mc-rv-facts li { padding: 6px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font-size: 0.92rem; color: var(--ink); }
.mc-rv-needs { margin: 0 0 8px; line-height: 1.6; color: var(--ink); }
.mc-rv-needs a { color: var(--teal-deep); font-weight: 600; }
.mc-rv-files { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.mc-rv-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.mc-rv-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.mc-rv-table th, .mc-rv-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.mc-rv-table thead th { font-size: 0.76rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.mc-rv-table thead small { font-weight: 400; text-transform: none; letter-spacing: 0; }
.mc-rv-table tbody th { font-weight: 800; color: var(--tangerine); }
.mc-rv-table tbody tr:last-child th, .mc-rv-table tbody tr:last-child td { border-bottom: 0; }
.mc-rv-table a { font-weight: 700; color: var(--teal-deep); white-space: nowrap; }
.mc-rv-unit { margin-top: 18px; }

/* An investigation's worked solutions: one row a class of the teacher's,
 * saying whether that class can see them, with the button that changes it. */
.mc-reveal form { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; }
.mc-reveal-state { color: var(--ink); }
.mc-reveal .btn { min-height: 44px; }

/* ------------------------------------------------------- example groups, pair, focus
   A section's examples can sit in named groups, each its own block and strip.
   "pair" is the board's own layout: the example fills the width, the your turn
   comes under it, lighter. "Focus" puts one example alone on the whole screen
   (the Fullscreen API when it works, a fixed overlay when it does not). */

.mc-ex-group { min-width: 0; margin-top: 26px; }
.mc-ex-grouprow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; }
.mc-ex-group-left { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mc-ex-headrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 6px; }
.mc-unit .mc-ex-grouprow .mc-ex-grouph { margin: 0; }
.mc-ex-group:first-of-type { margin-top: 8px; }
.mc-unit .mc-ex-grouph {
    margin: 0;
    padding-left: 12px;
    border-left: 6px solid var(--gold);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--ink);
}
.mc-watch-explainer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--teal) 12%, var(--paper));
    border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent);
    color: var(--teal-deep);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.3;
    transition: all 0.15s ease;
}
.mc-watch-explainer-badge:hover {
    background: var(--teal-deep);
    border-color: var(--teal-deep);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25);
}
.mc-watch-explainer-badge i {
    font-size: 0.82em;
}
.mc-ex-groupintro { margin: 0 0 12px; max-width: 60ch; line-height: 1.5; }

.mc-ex, .mc-ex-panel, .mc-ex-split, .mc-ex-ask, .mc-ex-work, .mc-ex-screens, .mc-ex-screen,
.mc-ex-side, .mc-ex-pair, .mc-ex-col, .mc-ex-rowtext, .mc-ex-row { min-width: 0; max-width: 100%; }
.mc-ex-q, .mc-ex-say { overflow-wrap: anywhere; }
.mc-ex-math { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding-block: 0.2em; }
.mc-ex-calc { max-width: 100%; }

.mc-ex-btn:focus-visible, .mc-ex-tab:focus-visible, .mc-ex-try input:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.mc-ex-panel:focus { outline: none; }
.mc-ex-panel:focus-visible { outline: 3px solid var(--cyan); outline-offset: -3px; }
.mc-ex-btn-icon { min-width: 44px; padding: 0 12px; }

.mc-ex-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 24px 0; }
.mc-ex-focusnav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.mc-ex-panel > .mc-ex-head { padding: 8px 24px 0; }
.mc-ex-source { display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.mc-ex-idea {
    margin: 14px 24px 0;
    padding: 10px 16px;
    border-left: 6px solid var(--gold);
    background: var(--cream);
}
.mc-ex-idea b { display: block; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.mc-ex-idea p { margin: 4px 0 0; font-size: 1.15em; }
.mc-ex-note { margin: 0 24px 22px; font-size: 1.05em; line-height: 1.5; }

.mc-ex-pair { display: flex; flex-direction: column; gap: 0; }
.mc-ex-col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 24px 24px; }
.mc-ex-col > * { max-width: 100%; }
.mc-ex-col-example { border-top: 6px solid var(--teal); margin-top: 14px; }
.mc-ex-col-turn { border-top: 3px solid var(--tangerine); background: var(--cream); font-size: 0.92em; }
.mc-ex-colh { margin: 0; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }
.mc-ex-lead { margin: 0; color: var(--muted); }
.mc-ex-bigq { margin: 0; font-family: var(--font-question); font-size: 1.5em; font-weight: 600; line-height: 1.4; color: var(--ink); }
.mc-ex-tag { margin: 0; font-size: 0.8rem; color: var(--muted); }
.mc-ex-items { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-family: var(--font-question); font-size: 1.25em; line-height: 1.4; color: var(--ink); }
/* A question made of lettered parts ((a) to (h) of a Do now): the sentence
 * above them is an instruction, not the question itself, so it is set at
 * reading size; short parts sit in columns as they do on the worksheets,
 * and the whole block is held to a readable width in the middle. */
.mc-ex-cols.has-items { max-width: 76rem; margin-inline: auto; }
.mc-ex-cols.has-items .mc-ex-qside, .mc-ex-cols.has-items .mc-ex-wside { width: 100%; }
.mc-ex .mc-ex-bigq.mc-ex-bigq-instr, .mc-ex.is-focus .mc-ex-bigq.mc-ex-bigq-instr { font-family: inherit; font-size: 1.1em; font-weight: 600; line-height: 1.45; }
.mc-ex-partgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; align-items: center; }
.mc-ex-items.mc-ex-partgrid { width: 100%; margin-top: 6px; }
.mc-ex .mc-ex-items.mc-ex-partgrid, .mc-ex.is-focus .mc-ex-items.mc-ex-partgrid { font-size: 1.1em; }
/* The answers sit under their parts, in the same columns at the same size. */
.mc-ex .mc-ex-answer.mc-ex-partgrid, .mc-ex.is-focus .mc-ex-answer.mc-ex-partgrid { gap: 18px 28px; font-size: 1.1em; }
.mc-ex-partgrid > li { min-width: 0; }
@media (min-width: 720px) {
    .mc-ex-partgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.mc-ex.is-focus .mc-ex-partgrid, .mc-ex.is-focus .mc-ex-answer.mc-ex-partgrid { gap: 28px 40px; }
.mc-ex-tablebox { width: 100%; }
.mc-ex-table { border-collapse: collapse; font-size: 1.15em; color: var(--ink); }
.mc-ex-table th { padding: 6px 14px 6px 0; border-bottom: 2px solid var(--ink); font-size: 0.7em; letter-spacing: 0.08em; text-transform: uppercase; text-align: left; }
.mc-ex-table td { padding: 8px 14px 8px 8px; border-bottom: 1px solid var(--line); min-width: 4em; }
.mc-ex-table tr.is-new td { background: color-mix(in srgb, var(--gold) 24%, var(--paper)); }
.mc-ex-btn-reveal { align-self: flex-start; }

.mc-ex-cols { display: flex; flex-direction: column; gap: 18px; width: 100%; min-width: 0; }
.mc-ex-qside, .mc-ex-wside { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.mc-ex-wside { width: 100%; }
.mc-ex-steps { gap: 20px; }
.mc-ex-steps .mc-ex-line { line-height: 1.6; }
.mc-ex-stepbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.mc-ex-stepbar .mc-ex-btn:not([hidden]) { display: inline-flex; align-items: center; }
.mc-ex-prog { font-size: 0.9rem; color: var(--muted); }
.mc-ex-panel[data-ex-style="all"] .mc-ex-steps .mc-ex-line[hidden] { display: list-item !important; }
.mc-ex-panel[data-ex-style="all"] .mc-ex-check.mc-ex-line[hidden] { display: flex !important; }
.mc-ex-panel[data-ex-style="all"] .mc-ex-stepbar, .mc-ex-panel[data-ex-style="stack"] .mc-ex-stepbar { display: none; }
.mc-ex-line.is-new { animation: mc-ex-new 1.4s ease-out; }
@keyframes mc-ex-new {
    from { background-color: color-mix(in srgb, var(--gold) 34%, var(--paper)); }
    to { background-color: transparent; }
}

@media (min-width: 900px) {
    .mc-ex-panel:not([data-ex-style="stack"]) .mc-ex-cols.has-steps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 40px; align-items: start; }
    .mc-ex-panel:not([data-ex-style="stack"]) .mc-ex-cols.has-steps .mc-ex-wside { padding-left: 32px; border-left: 2px solid var(--line); }
}

.mc-ex-solution { width: 100%; min-width: 0; margin-top: 4px; }
.mc-ex-lines { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-family: var(--font-question); font-size: 1.3em; line-height: 1.4; color: var(--ink); }
.mc-ex-check { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 14px 0 0; padding: 8px 14px; border-left: 6px solid var(--gold); background: var(--paper); font-family: var(--font-question); font-size: 1.15em; color: var(--ink); }
.mc-ex-check span { font-family: inherit; font-size: 0.7em; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.mc-sheets-pair { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 900px) {
    .mc-sheets-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1000px; }
    .mc-sheets-pair .mc-sheet { max-width: none; }
}
@media (max-width: 899.98px) {
    .mc-ex-bar { padding: 10px 18px 0; }
    .mc-ex-panel > .mc-ex-head { padding: 8px 18px 0; }
    .mc-ex-idea { margin: 12px 18px 0; }
    .mc-ex-note { margin: 0 18px 18px; }
    .mc-ex-col { padding: 16px 18px 20px; }
    .mc-ex-bigq { font-size: 1.3em; }
    .mc-ex-lines { font-size: 1.15em; }
}

/* Focus: one example on the whole screen. */
html.mc-ex-locked { overflow: hidden; }
.mc-ex.is-focus {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--paper);
    overflow: hidden;
}
.mc-ex.is-focus .mc-ex-strip, .mc-ex.is-focus .mc-ex-foot { display: none; }
.mc-ex.is-focus .mc-ex-panel {
    flex: 1 1 auto;
    min-height: 0;
    border: 0;
    border-radius: 0;
    overflow: auto;
    overscroll-behavior: contain;
    font-size: clamp(1.05rem, calc(0.8vw + 2vh), 2.4rem);
}
.mc-ex.is-focus .mc-ex-bar {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}
.mc-ex.is-focus .mc-ex-col.is-away { display: none; }
.mc-ex.is-focus .mc-ex-col-example { margin-top: 0; }
.mc-ex.is-focus .mc-ex-q { max-width: none; font-size: 1.3em; }
.mc-ex.is-focus .mc-ex-calc { font-size: 1.6em; }
.mc-ex.is-focus .mc-ex-row .mc-ex-calc { font-size: 1.4em; }
.mc-ex.is-focus .mc-ex-say { max-width: none; font-size: 1em; }
.mc-ex.is-focus .mc-ex-btn { font-size: 0.95rem; }
.mc-ex.is-focus .mc-ex-bigq { font-size: 1.7em; }
.mc-ex.is-focus .mc-ex-lines { font-size: 1.45em; }
.mc-ex.is-focus .mc-ex-steps { gap: 0.7em; }
.mc-ex.is-focus .mc-ex-prog { font-size: 0.95rem; }
@media (min-width: 900px) {
    .mc-ex.is-focus .mc-ex-panel[data-layout="pair"] { display: flex; flex-direction: column; }
    .mc-ex.is-focus .mc-ex-pair { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
    .mc-ex.is-focus .mc-ex-col:not(.is-away) { flex: 1 1 auto; min-height: 0; }
    .mc-ex.is-focus .mc-ex-panel:not([data-ex-style="stack"]) .mc-ex-cols.has-steps { flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
    .mc-ex.is-focus .mc-ex-panel:not([data-ex-style="stack"]) .mc-ex-cols.has-steps .mc-ex-qside { overflow-y: auto; }
    .mc-ex.is-focus .mc-ex-panel:not([data-ex-style="stack"]) .mc-ex-cols.has-steps .mc-ex-wside { overflow-y: auto; overscroll-behavior: contain; justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .mc-ex, .mc-ex * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}


/* Printed, the whole working shows. */
@media print {
    .mc-ex-steps .mc-ex-line[hidden] { display: list-item !important; }
    .mc-ex-check.mc-ex-line[hidden] { display: flex !important; }
}

/* ------------------------------------------------------- hideable side menu
   Wide screens only: below 1020px the menu is already a strip of tiles. */

.mc-menutoggle {
    display: none;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}
.mc-menutoggle:hover { background: var(--cream); }
.mc-menutoggle:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.mc-menuhide { margin: 0 0 14px 8px; }
.mc-menushow { margin: 0 12px 0 0; }
.mc-about .mc-menushow { margin: 0 0 14px; }

@media (min-width: 1020px) {
    .mc-menu-ready .mc-menuhide { display: inline-flex; }
    .mc-menu-ready.mc-menu-off .mc-menushow { display: inline-flex; }
    .mc-menu-off .sci-shell { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------- example style switch
   Real radio inputs as a segmented control. The chosen one carries a tick and
   a filled ground, so colour is not the only cue. */

.sci-stephead .mc-ex-style { margin-left: auto; }
.mc-ex-style { display: inline-flex; flex-wrap: wrap; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--paper); }
.mc-ex-style label { position: relative; margin: 0; cursor: pointer; }
.mc-ex-style input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mc-ex-style span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.mc-ex-style label + label span { border-left: 2px solid var(--ink); }
.mc-ex-style input:checked + span { background: var(--ink); color: var(--paper); font-weight: 800; }
.mc-ex-style input:checked + span::before { content: "\2713"; margin-right: 6px; }
.mc-ex-style input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: -5px; }
.mc-assess-link { margin: 0.5rem 0 1rem; font-size: 0.9375rem; color: var(--muted); }
.mc-assess-link a { display: inline-flex; align-items: center; min-height: 44px; color: var(--teal-deep); font-weight: 700; }
