/* Compact subject catalogues and child-facing teaching layouts. */
.subject-art{position:relative;isolation:isolate;display:grid;place-items:center;min-height:270px;margin:0 auto;width:min(100%,360px)}
.subject-art>span{position:absolute;z-index:-1;width:240px;height:240px;border-radius:50%;background:#ffffff66}
.subject-art img{width:160px;height:160px;object-fit:contain;transform:rotate(-6deg)}
.topic-directory{max-width:940px;margin:0 auto 80px}
.topic-directory>h2{font:800 36px/1.15 Baloo,Arial,sans-serif;margin:0 0 18px}
.topic-directory>p{font-size:17px;line-height:1.65}
.topic-filters{display:grid;grid-template-columns:minmax(0,1fr) 170px auto;gap:16px;align-items:end;margin:28px 0 16px}
.topic-filters>div{min-width:0}
.topic-filters label{display:block;font-size:14px;font-weight:700;margin-bottom:8px}
.topic-filters :is(input,select){display:block;width:100%;height:50px;min-width:0;padding:12px 14px;border:1px solid #b2c9bf;border-radius:14px;background:#fff;color:var(--ink);font:16px/1.4 Arial,sans-serif}
.topic-filters :is(input,select,button):focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.topic-reset{border:0;background:transparent;padding:13px 4px;color:var(--page-ink);font:700 14px/1.5 Arial,sans-serif;cursor:pointer;min-height:48px;text-decoration:underline;text-underline-offset:4px}
.topic-directory .topic-result{font-size:14px;margin:18px 0;color:var(--page-ink)}
.topic-groups{display:grid;gap:16px}
.topic-group{background:#fff;border-radius:24px;overflow:hidden}
.topic-group>summary{display:flex;align-items:center;gap:16px;list-style:none;padding:22px 26px;cursor:pointer;min-height:72px}
.topic-group>summary::-webkit-details-marker{display:none}
.topic-group>summary h3{font:700 26px/1.2 Baloo,Arial,sans-serif;margin:0;flex:1}
.topic-group>summary:after{content:'+';font:24px/1 Arial,sans-serif;width:26px;text-align:center;color:var(--page-ink)}
.topic-group[open]>summary:after{content:'−'}
.topic-group summary>span{font:14px/1.3 Arial,sans-serif;color:var(--page-ink);background:var(--page-tint);border-radius:20px;min-width:28px;text-align:center;padding:5px}
.topic-group ul{list-style:none;margin:0;padding:0 26px 14px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 26px}
.topic-group li{min-width:0;border-top:1px solid #e1eae5}
.topic-group li>a{display:flex;flex-direction:column;justify-content:center;gap:6px;min-height:94px;padding:16px 0;color:inherit;text-decoration:none}
.topic-group a strong{font:700 19px/1.35 Baloo,Arial,sans-serif}
.topic-group a span{font-size:12px;line-height:1.5;color:#706761}
.topic-group a:focus-visible{outline:3px solid var(--focus);outline-offset:3px;border-radius:5px}
.topic-directory .topic-scope{font-size:13px;line-height:1.55;color:#706761;margin-top:22px}
.topic-empty{padding:24px;background:white;border-radius:20px}
.topic-directory [hidden]{display:none!important}
.lesson-tip{display:grid;grid-template-columns:56px minmax(0,1fr);gap:22px;padding:28px 30px;background:#ffedb8;border-radius:26px;margin:32px 0 48px}
.lesson-tip h2{font:700 27px/1.2 Baloo,Arial,sans-serif;margin:0 0 12px}
.lesson-tip p{font-size:17px;line-height:1.65;margin:0}
.lesson-intro-section{background:#fff;border-radius:28px;padding:32px;margin-bottom:30px}
.lesson-colours{display:grid;grid-template-columns:1fr 1fr;gap:24px;text-align:center}
.lesson-colours span{display:block;width:68px;height:68px;background:#df5a4e;border-radius:50%;margin:0 auto 10px}
.lesson-colours strong{font:700 25px/1.3 Baloo,Arial,sans-serif}
.lesson-group-counts{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.lesson-group-counts span{background:var(--page-tint);border-radius:16px;padding:12px 18px;font:700 27px/1.2 Baloo,Arial,sans-serif}
.lesson-group-counts span:last-child{background:#ffedb8;font-size:20px}
.lesson-sentence{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:20px}
.lesson-sentence span{background:#dcebe3;border-radius:14px;padding:12px;font:700 23px/1.4 Baloo,Arial,sans-serif}
.lesson-sentence span+span{background:#ffdfc1}
.lesson-dialog p{background:#dcebe3;border-radius:18px 18px 18px 3px;padding:16px;font:700 22px/1.4 Baloo,Arial,sans-serif}
.lesson-dialog p+p{background:#ffedb8;border-radius:18px 18px 3px 18px;margin-left:25px}
.lesson-route{list-style:none;margin:0;padding:0;display:grid;gap:14px;counter-reset:step}
.lesson-route li{counter-increment:step;display:flex;align-items:center;gap:12px;font:700 24px/1.35 Baloo,Arial,sans-serif}
.lesson-route li:before{content:counter(step);display:grid;place-items:center;width:30px;height:30px;flex:none;background:#ffedb8;border-radius:50%;font-size:18px}
.lesson-calculation p{font:700 clamp(25px,3vw,34px)/1.35 Baloo,Arial,sans-serif;text-align:center;margin:14px 0}
.lesson-calculation p:last-child{color:var(--page-ink)}
.editorial-hero>.learning-visual{justify-self:center;background:transparent;border:0}
.footer-columns{margin-inline:auto;text-align:center}
.footer-columns .footer-discover{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 32px;max-width:100%;margin-inline:auto}
.footer-columns .footer-discover a{justify-content:center;text-align:center}
@media(hover:hover){.topic-group a:hover strong{color:var(--page-ink);text-decoration:underline;text-underline-offset:4px}}
@media(max-width:759px){.subject-art{min-height:190px}.subject-art>span{width:180px;height:180px}.subject-art img{width:120px;height:120px}.topic-filters{grid-template-columns:minmax(0,1fr) 145px;gap:14px}.topic-filters>div:first-child{grid-column:1/-1}.topic-reset{justify-self:start}.topic-group>summary{padding:20px}.topic-group>summary h3{font-size:24px}.topic-group ul{grid-template-columns:1fr;padding:0 20px 12px}.topic-group li>a{min-height:82px}.topic-directory>h2{font-size:31px}.lesson-tip{grid-template-columns:42px minmax(0,1fr);gap:14px;padding:24px 20px}.lesson-tip>img{width:42px;height:42px}.lesson-tip h2{font-size:24px}.lesson-intro-section{padding:26px 22px}.footer-columns .footer-discover{gap:8px 24px;max-width:420px}}
@media print{.topic-filters{display:none}.topic-group ul{display:block}.lesson-tip,.lesson-intro-section{break-inside:avoid}}

.lesson-colours .swatch-blue{background:#4b83b9}.lesson-colours .swatch-yellow{background:#f4ca57}.lesson-colours .swatch-green{background:#599a80}

.lesson-pattern{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;align-items:center;justify-items:center}.lesson-pattern span{width:44px;height:44px;border-radius:50%;background:#df5a4e}.lesson-pattern .pattern-blue{background:#4b83b9}.lesson-pattern b{font:700 40px/1.3 Baloo,Arial,sans-serif}

/* One cohesive topic finder, followed by calm, illustrated category panels. */
.topic-tools{padding:30px 32px 20px;border-radius:28px;background:var(--page-sand);margin-bottom:28px}
.topic-directory-heading{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;gap:22px}
.topic-directory-heading img{width:64px;height:64px;object-fit:contain}
.topic-directory-heading h2{font:800 33px/1.15 Baloo,Arial,sans-serif;margin:0 0 10px}
.topic-directory-heading p{font-size:16px;line-height:1.6;margin:0}
.topic-tools .topic-filters{margin:26px 0 12px;grid-template-columns:minmax(0,1fr) 180px auto;gap:14px}
.topic-filters label{font-size:13px;line-height:1.4;margin-bottom:9px}
.topic-filters :is(input,select){height:52px;border:1px solid #a9bfb5;border-radius:14px;background:#fff;font-size:16px}
.topic-search-wrap,.topic-select-wrap{position:relative;display:block}
.topic-search-wrap:before{content:'';position:absolute;left:17px;top:17px;width:13px;height:13px;border:2px solid #657c70;border-radius:50%;pointer-events:none}
.topic-search-wrap:after{content:'';position:absolute;left:31px;top:31px;width:7px;height:2px;background:#657c70;transform:rotate(45deg);transform-origin:left center;pointer-events:none}
.topic-search-wrap input{padding-left:46px}
.topic-filters select{appearance:none;-webkit-appearance:none;padding-right:44px;cursor:pointer}
.topic-select-wrap:after{content:'';position:absolute;right:20px;top:20px;width:8px;height:8px;border-right:2px solid #657c70;border-bottom:2px solid #657c70;transform:rotate(45deg);pointer-events:none}
.topic-filters[data-focus-mode=pointer] select:focus{outline:none;box-shadow:none}
.topic-filters[data-focus-mode=keyboard] select:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.topic-reset{font-weight:400;font-size:13px;padding-inline:2px}
.topic-tools .topic-result{margin:16px 0 0;font-size:13px;color:#4e675b}
.topic-groups{gap:20px}
.topic-group>summary{gap:18px;padding:22px 26px}
.topic-group-icon{width:46px;height:46px;object-fit:contain;flex:none}
.topic-group>summary h3{font-size:27px}
.topic-group>summary:after{border-radius:50%;background:var(--page-tint);width:30px;height:30px;display:grid;place-items:center;flex:none;font-size:23px}
.topic-group summary>[data-group-count]{background:none;padding:0;min-width:0;font-size:13px;color:#706761}
.topic-group ul{padding:0 28px 16px;gap:0 30px}
.topic-group li>a{min-height:100px;padding:19px 0;gap:8px}
.topic-group a strong{font-size:20px;line-height:1.3}
.topic-group a span{font-size:12px;line-height:1.5}
/* Figures use a block wrapper; inner diagrams define their own grids. */
.learning-visual{display:block}
.subtraction-path{display:block;width:100%;height:auto;overflow:visible}
.editorial-hero>.visual-subtract-path{max-width:440px;padding:12px 8px 0}
.editorial-page .visual-subtract-path figcaption{max-width:32ch;margin:16px auto 0}
@media(max-width:759px){
 .topic-tools{padding:26px 22px 18px;border-radius:26px;margin-bottom:24px}
 .topic-directory-heading{grid-template-columns:48px minmax(0,1fr);gap:15px;align-items:start}
 .topic-directory-heading img{width:48px;height:48px}
 .topic-directory-heading h2{font-size:29px}
 .topic-directory-heading p{font-size:15px;line-height:1.55}
 .topic-tools .topic-filters{grid-template-columns:minmax(0,1fr) auto;gap:14px;margin-top:24px}
 .topic-filters>div:first-child{grid-column:1/-1}
 .topic-reset{padding-inline:5px;align-self:end}
 .topic-group>summary{padding:20px;gap:13px}
 .topic-group-icon{width:38px;height:38px}
 .topic-group>summary h3{font-size:24px}
 .topic-group summary>[data-group-count]{display:none}
 .topic-group ul{padding:0 22px 12px}
 .topic-group li>a{min-height:86px;padding:17px 0}
 .topic-group a strong{font-size:20px}
 .editorial-hero>.visual-subtract-path{width:100%;max-width:390px}
}
@media(max-width:359px){.topic-tools{padding-inline:18px}.topic-directory-heading{grid-template-columns:1fr}.topic-directory-heading img{width:44px;height:44px}.topic-group>summary{gap:10px;padding-inline:16px}.topic-group>summary h3{font-size:22px}.topic-group-icon{width:32px;height:32px}}

/* The entire topic row is a link, with a persistent navigation cue. */
.topic-group li>a{display:grid;grid-template-columns:minmax(0,1fr) 34px;align-items:center;gap:16px;padding:18px 10px;border-radius:12px;transition:background-color .18s ease}
.topic-group .topic-link-copy{display:flex;flex-direction:column;gap:8px;min-width:0}
.topic-group a strong{color:var(--page-ink);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px;text-decoration-color:#8ca99c}
.topic-group .topic-open-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--page-tint);color:var(--page-ink)}
.topic-group a:focus-visible{outline-offset:-3px;background:var(--page-tint)}
@media(hover:hover){.topic-group li>a:hover{background:var(--page-tint)}.topic-group a:hover strong{text-decoration-thickness:2px}.topic-group a:hover .topic-open-icon{background:#fff}}
@media(max-width:759px){.topic-group li>a{grid-template-columns:minmax(0,1fr) 30px;gap:12px;padding:17px 4px}.topic-group .topic-open-icon{width:30px;height:30px}}
@media(prefers-reduced-motion:reduce){.topic-group li>a{transition:none}}
