/* free-resources.css: the free resources listing pages (body.frl, was css/free-resources.css) and the single free resource
   pages in free-resources/ (body.frdetail, was css/free-resource.css). */

/* ========== listing pages ========== */
/* Free resources (freeresources.php, freeresources-primary/secondary/alevel.php) and free blank templates (blanktemplates.php),
   built by tools/build-free-resources.js and tools/build-blank-templates.js from templates/freeresources.template.html.
   The pages use the clean design: css/lab.css for the hero (.lh), the card grid section and type filter (.cg-sec / .cg-head /
   .cg-filter), free vs subscriber (.cm) and pricing (.pg). This file has only what these pages add, scoped to body.frl:
   a compact hero, the key stage switch and search, the "how to use" note, and the card grid at full width.
   The cards themselves (.fr-card and the weekly sets dialog) are styled in site.css under body.free. */

body.frl [hidden]{display:none!important}

/* ---------- hero: text only, so less height and a wider column ---------- */
body.frl .frl-hero{padding:56px 0 0}
body.frl .frl-hero .lh-text{max-width:1040px}
body.skills.frl .frl-hero h1{font-size:clamp(34px,4vw,50px);max-width:none} /* no 640px cap (main.css .lh h1): one line on desktop */
/* the free resources headings stay all black (no blue key word); blank templates keep theirs */
body.frl:not(.blanks) .frl-hero .mk{color:inherit}
body.frl .frl-hero .lh-sub{max-width:none;margin-top:12px;font-size:17px}
body.frl .frl-hero .lh-sub a{color:var(--ink);font-weight:700;text-decoration:none;border-bottom:2px solid rgba(20,26,46,.25)}
body.frl .frl-hero .lh-sub a:hover{border-color:var(--ink)}
/* the "← Back to Primary/Secondary" pill (elements/nav.php): lined up with the page's left edge (.hl-wrap), with room under it */
body.frl .mb-back{max-width:1200px;padding:0 28px}
body.frl .mb-back a{left:28px}
body.frl .mb-back~main .frl-hero{padding-top:96px}
@media (max-width:900px){body.frl .mb-back~main .frl-hero{padding-top:84px}}
@media (max-width:620px){body.frl .mb-back~main .frl-hero{padding-top:68px}}
@media (max-width:520px){body.frl .mb-back{padding:0 16px}body.frl .mb-back a{left:16px}}

/* ---------- the browser: heading and count left; key stage pages and search right ---------- */
body.frl .frl-browse{padding-top:32px}
body.frl .frl-browse .cg-head{align-items:center;margin-bottom:24px}
body.frl .frl-count{margin:0;font-size:15px;color:var(--mut)}
body.frl .frl-count b{color:var(--ink)}
body.frl .frl-controls{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
/* key stage pages: a segmented switch of links (each is its own page) */
body.frl .frl-ks{display:flex;gap:4px;padding:4px;border-radius:999px;background:var(--soft);border:1px solid var(--line)}
body.frl .frl-ks a{padding:8px 16px;border-radius:999px;font-size:14px;font-weight:700;color:var(--mut);text-decoration:none;text-align:center}
body.frl .frl-ks a:hover{color:var(--ink)}
body.frl .frl-ks a[aria-current="page"]{background:var(--ink);color:#fff}
body.frl .frl-ks a.off:not([aria-current]){opacity:.4;pointer-events:none;cursor:default}
body.frl .frl-search{position:relative;width:260px}
body.frl .frl-search input{width:100%;height:46px;padding:0 42px 0 18px;border:1px solid var(--line);border-radius:999px;background:#fff;font:inherit;font-size:15px;color:var(--ink)}
body.frl .frl-search input:focus,body.frl .frl-select select:focus{outline:none;border-color:var(--ink);box-shadow:0 0 0 3px rgba(20,26,46,.08)}
body.frl .frl-search svg{position:absolute;right:16px;top:50%;transform:translateY(-50%);color:#8a91a1;pointer-events:none}

/* type filter: a sidebar list beside the cards, with a small yellow New / Popular badge; a select instead on phones */
/* list style (2026-11-21, the user's choice from the old page): full-width rows with a thin divider under each; the chosen
   type has a light blue background, blue text and a blue bar down its left edge. No rounded pills */
body.frl .frl-layout{display:grid;grid-template-columns:270px minmax(0,1fr);gap:40px;align-items:start}
body.frl .frl-side{align-self:start}
/* the list is taller now, so it only stays in view (sticky under the nav) on screens tall enough to show all of it */
@media (min-height:1150px){body.frl .frl-side{position:sticky;top:84px}}
body.skills.frl .frl-side h3{margin:0 0 8px;padding:0 0 0 20px;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--grey)}
body.frl .frl-filter{display:flex;flex-direction:column;gap:0;margin:0}
body.skills.frl .frl-filter button{display:flex;align-items:center;gap:8px;width:100%;padding:10px 16px 10px 17px;border:0;border-left:3px solid transparent;border-bottom:1px solid #e5e7eb;border-radius:0;background:none;font:inherit;font-size:16px;font-weight:500;line-height:1.35;text-align:left;color:#374151;cursor:pointer;transition:background .15s ease,color .15s ease}
body.skills.frl .frl-filter button:hover{background:#f9fafb;color:var(--ink)}
body.skills.frl .frl-filter button[aria-pressed="true"]{background:#eff6ff;border-left-color:#2563eb;color:#2563eb}
body.skills.frl .frl-filter button:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
body.frl .frl-filter em{display:inline-block;padding:2px 7px;border-radius:999px;background:#fde047;font-style:normal;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#422006}
body.frl .frl-filter em.ks-primary{background:#10b981;color:#fff}
body.skills.frl .frl-filter button:disabled{opacity:.4;cursor:default}
body.skills.frl .frl-filter button:disabled:hover{background:none;color:var(--mut)}
body.frl .frl-select{display:none}
body.frl .frl-select select{width:100%;height:48px;padding:0 16px;border:1px solid var(--line);border-radius:14px;background:#fff;font:inherit;font-size:15px;font-weight:700;color:var(--ink)}

/* how to use the chosen type (shown when one is picked) */
body.frl .frl-how{margin:0 0 28px;padding:22px 24px;border-radius:18px;background:var(--soft)}
body.frl .frl-how small{font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#8a91a1}
body.skills.frl .frl-how h3{margin:6px 0 0;font-size:19px;line-height:1.25;letter-spacing:-.02em;font-weight:800;color:var(--ink)}
body.frl .frl-how p{margin:8px 0 0;max-width:820px;font-size:15px;line-height:1.6;color:var(--mut)}

/* Question Generator cards: a mini generator. The key stage colour (site.css .fr-thumb.qg.ks-*) carries an "∞ Unlimited"
   chip and the key stage name; a real Question Generator worksheet (image, js/free-resources-shared.js QG_IMG) hangs off the
   right edge, cropped to its top-left corner (header and first questions). On hover the sheet straightens and lifts. */
body.free.frl .fr-thumb.qg{display:block;padding:0}
body.free.frl .qg-chip{position:absolute;left:14px;top:14px;z-index:2;display:inline-flex;align-items:center;gap:6px;padding:5px 10px 5px 8px;border-radius:999px;background:rgba(255,255,255,.2);box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);font-size:12px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:#fff}
body.free.frl .fr-thumb.qg .qg-chip img{width:20px;height:auto;min-height:0;max-width:none;margin:0;filter:none}
body.free.frl .qg-ks{position:absolute;left:16px;bottom:14px;z-index:2;max-width:38%;font-size:19px;font-weight:800;line-height:1.1;letter-spacing:-.02em;color:#fff}
/* "Secondary" is the longest single word, so it's a little smaller to fit beside the sheet */
body.free.frl .fr-thumb.qg.ks-secondary .qg-ks{font-size:16px}
body.free.frl .qg-sheet{position:absolute;left:44%;right:-6%;top:22px;bottom:-24px;overflow:hidden;border-radius:10px;background:#fff;box-shadow:0 18px 30px -14px rgba(20,26,46,.5);transform:rotate(3deg);transform-origin:left top;transition:transform .35s cubic-bezier(.3,1.3,.5,1)}
/* the worksheet image has its own white margin round the page: scaled up and pinned top-left so the sheet shows the header
   and the first questions, readable at card size */
body.free.frl .fr-thumb.qg .qg-sheet img{position:absolute;left:-12%;top:-15%;width:185%;max-width:none;height:auto;min-height:0;margin:0;filter:none}
body.free.frl .fr-card:hover .qg-sheet,body.free.frl .fr-card:focus-visible .qg-sheet{transform:rotate(0) translateY(-6px)}
@media (prefers-reduced-motion:reduce){body.free.frl .qg-sheet{transition:none}}
/* the Christmas card (js/free-resources-shared.js christmasHTML): a wrapped present on a red tile with falling snow;
   on hover the lid lifts and tips and the present gives a little hop */
body.free.frl .fr-thumb.xmas{align-items:center;padding:0;background:radial-gradient(circle at 18% 22%,rgba(255,255,255,.55) 0 2px,transparent 3px),radial-gradient(circle at 78% 16%,rgba(255,255,255,.45) 0 2px,transparent 3px),radial-gradient(circle at 88% 58%,rgba(255,255,255,.5) 0 1.5px,transparent 2.5px),radial-gradient(circle at 10% 70%,rgba(255,255,255,.4) 0 1.5px,transparent 2.5px),radial-gradient(circle at 40% 12%,rgba(255,255,255,.35) 0 1.5px,transparent 2.5px),linear-gradient(135deg,#ef4444,#b91c1c)}
body.free.frl .xm-gift{width:44%;height:auto;margin-top:14px;overflow:visible}
body.free.frl .xm-lid,body.free.frl .xm-box{transform-box:view-box;transition:transform .4s cubic-bezier(.3,1.4,.5,1)}
body.free.frl .xm-lid{transform-origin:20px 52px}
body.free.frl .xm-box{transform-origin:60px 104px}
body.free.frl .fr-xmas:hover .xm-lid,body.free.frl .fr-xmas:focus-visible .xm-lid{transform:translate(-2px,-14px) rotate(-12deg)}
body.free.frl .fr-xmas:hover .xm-box,body.free.frl .fr-xmas:focus-visible .xm-box{transform:scale(1.03,.97)}
@media (prefers-reduced-motion:reduce){body.free.frl .xm-lid,body.free.frl .xm-box{transition:none}}
/* the last card, "Unlock all resources today": light grey, a padlock whose shackle lifts and swings open on hover */
body.free.frl .fr-unlock .fr-thumb{flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:16px;background:#eef0f4;box-shadow:inset 0 0 0 1px var(--line);transition:background .2s}
body.free.frl .fr-unlock:hover .fr-thumb,body.free.frl .fr-unlock:focus-visible .fr-thumb{background:#e6e9ef}
/* a solid light grey padlock: a thick shackle and a filled body with the keyhole cut out in the tile's colour */
body.free.frl .fr-lock{width:64px;height:64px;overflow:visible;--lock:#c6cbd5}
body.free.frl .fr-unlock:hover .fr-lock,body.free.frl .fr-unlock:focus-visible .fr-lock{--lock:#b7bdc9}
body.free.frl .fr-lock-body{fill:var(--lock);transition:fill .2s}
body.free.frl .fr-key{fill:#eef0f4;transition:fill .2s}
body.free.frl .fr-unlock:hover .fr-key,body.free.frl .fr-unlock:focus-visible .fr-key{fill:#e6e9ef}
body.free.frl .fr-shackle{fill:none;stroke:var(--lock);stroke-width:2.8;stroke-linecap:round;transform-box:view-box;transform-origin:16px 11px;transition:transform .35s cubic-bezier(.3,1.4,.5,1),stroke .2s}
body.free.frl .fr-unlock:hover .fr-shackle,body.free.frl .fr-unlock:focus-visible .fr-shackle{transform:translateY(-2.5px) rotate(28deg)}
body.free.frl .fr-unlock-text{max-width:80%;font-size:17px;font-weight:800;letter-spacing:-.01em;line-height:1.25;text-align:center;color:var(--ink)}
@media (prefers-reduced-motion:reduce){body.free.frl .fr-shackle{transition:none}}
/* the cards: three across, beside the sidebar */
body.frl .fr-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:40px 22px}
body.frl .fr-empty a{color:var(--ink)}

/* ---------- blank templates: the groups in the sidebar (each with its count), one heading and grid per group ---------- */
body.skills.frl .frl-filter button small{margin-left:auto;padding-left:10px;font-size:12.5px;font-weight:700;color:#8a91a1}
body.skills.frl .frl-filter button[aria-pressed="true"] small{color:#2563eb}
body.free.blanks.frl .bt-group[hidden]{display:none}
body.free.blanks.frl .bt-group:first-of-type,body.free.blanks.frl .frl-select+.bt-group{padding-top:0}
body.free.blanks.frl .frl-main .bt-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:1100px){body.free.blanks.frl .frl-main .bt-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
body.frl .frl-jump{margin:24px 0 8px}
body.frl .frl-jump a i{font-size:12px}
body.free.blanks.frl .bt-group{padding:48px 0 8px;border-top:0;scroll-margin-top:24px}
body.skills.frl .bt-group h3{margin:0 0 22px;font-size:clamp(22px,2.4vw,28px);line-height:1.15;letter-spacing:-.018em;font-weight:800;color:var(--ink)}
body.frl .bt-group h3 small{margin-left:6px;font-size:.6em;font-weight:700;letter-spacing:0;color:var(--grey)}

/* ---------- pricing with all three plans: the plans in a row, what they include across the full width below ---------- */
body.frl .pg-grid.frl-three{grid-template-columns:repeat(3,minmax(0,1fr))}
body.frl .pg-grid.frl-three .pg-inc{grid-column:1/-1}
body.frl .pg-grid.frl-three .pg-inc ul{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}

@media (max-width:1100px){body.frl .fr-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:900px){
 body.frl .frl-hero{padding:64px 0 0}
 body.frl .frl-browse{padding-top:56px}
 body.frl .pg-grid.frl-three{grid-template-columns:1fr 1fr}
}
@media (max-width:760px){
 body.frl .fr-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:32px 14px}
 body.frl .frl-controls{width:100%;flex-direction:column;align-items:stretch}
 /* one line each: equal quarters squeezed the labels onto two lines, which made the whole switch twice as tall */
 body.frl .frl-ks a{flex:1 1 auto;padding:8px 6px;white-space:nowrap}
 body.frl .frl-search{width:100%}
 body.frl .frl-layout{grid-template-columns:minmax(0,1fr);gap:0}
 body.frl .frl-side{display:none}
 body.frl .frl-select{display:block;margin:0 0 24px}
}
@media (max-width:600px){body.frl .pg-grid.frl-three{grid-template-columns:1fr}}
/* phones: js/free-resources.js shows 24 cards at a time; the rest get .fr-cut until "Load more" (.fr-more) */
body.frl .fr-grid>.fr-cut{display:none!important}
body.frl .fr-more{display:flex;justify-content:center;width:100%;max-width:320px;margin:28px auto 0}
body.frl .fr-more[hidden]{display:none}
@media (max-width:480px){body.frl .fr-grid:not(.bt-grid){grid-template-columns:1fr}}

/* ========== single resource pages (was css/free-resource.css) ========== */
/* Free resource detail pages (free-resources/*.php, built by tools/build-free-resource-pages.js from
   templates/free-resource.template.html). The pages use the clean design: css/lab.css for the hero (.lh), buttons (.hl-btn),
   the resource panel (.shot), the related cards (.cg-sec / .cg-grid), free vs subscriber (.cm) and pricing (.pg).
   This file has only what these pages add, scoped to body.frdetail: breadcrumbs, the two-column hero, the facts and topic
   tags, each file of a multi-file resource, and the about / curriculum links / how to use it section. */

/* ---------- hero: breadcrumbs, then text left and the resource right (no bleed) ---------- */
body.frdetail .frd-hero{padding:28px 0 72px}
body.frdetail .frd-crumbs ol{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 40px;padding:0;list-style:none;font-size:13.5px;color:var(--mut)}
body.frdetail .frd-crumbs li+li::before{content:"/";margin-right:6px;color:rgba(20,26,46,.3)}
body.frdetail .frd-crumbs a{color:var(--mut);text-decoration:none}
body.frdetail .frd-crumbs a:hover{color:var(--ink);text-decoration:underline}
body.frdetail .frd-crumbs [aria-current]{color:var(--ink);font-weight:600}
body.frdetail .frd-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:64px;align-items:center}
body.frdetail .frd-hero .lh-text{max-width:none}
/* the pill above the heading: one plain sentence ("Free problem solving resource"), neutral grey, no colour */
body.skills.frdetail .frd-hero .lh-badge{background:var(--soft);border:1px solid var(--line);box-shadow:none;color:var(--mut);font-weight:600}
body.skills.frdetail .frd-hero .lh-badge::before{display:none}
body.skills.frdetail .frd-hero h1{font-size:clamp(36px,4.4vw,56px)}
body.frdetail .frd-hero .lh-sub{margin-top:20px}
body.frdetail .frd-ic{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}

/* the resource: lab.css .shot, a little taller, opening the resource */
body.frdetail .frd-preview{aspect-ratio:1/1;text-decoration:none}
/* the preview on its key stage badge's colour (as the .fr-badge.ks-* badges on the free resources list, main.css), and
   the Unlock pill in a darker shade of the same colour. --ks is the badge colour, --ksd the darker one */
body.frdetail .ks-primary{--ks:#10b981;--ksd:#047857}
body.frdetail .ks-secondary{--ks:#60a5fa;--ksd:#1d4ed8}
body.frdetail .ks-gcse{--ks:#fcd34d;--ksd:#b45309}
body.frdetail .ks-alevel{--ks:#f87171;--ksd:#b91c1c}
body.frdetail .ks-alevelfm{--ks:#fb7185;--ksd:#be123c}
body.frdetail .ks-l2fm{--ks:#ec4899;--ksd:#9d174d}
body.skills.frdetail .frd-preview[class*="ks-"]{background:var(--ks)}
body.frdetail .frd-unlock[class*="ks-"]{background:var(--ksd);box-shadow:0 10px 22px -10px var(--ksd)}
body.frdetail .frd-unlock[class*="ks-"]:hover{background:var(--ksd);filter:brightness(.88);box-shadow:0 14px 26px -10px var(--ksd)}
body.frdetail .frd-unlock[class*="ks-"] svg path.k{stroke:var(--ksd)}
body.frdetail .frd-preview img{transition:transform .2s ease}
body.frdetail .frd-preview:hover img{transform:scale(1.02)}
body.frdetail .frd-preview .shot-cap{left:auto;right:16px;bottom:16px}
/* "Unlock 10,000+ more resources" (or "thousands more" on Primary): a solid blue pill with a white padlock, sitting half
   over the preview's top edge at the right, linking to getstarted.php. It sits beside the preview link (.frd-shot wraps
   both), as links can't nest */
body.frdetail .frd-shot{position:relative;min-width:0}
body.frdetail .frd-unlock{position:absolute;z-index:2;top:0;right:20px;transform:translateY(-50%);display:inline-flex;align-items:center;gap:8px;padding:9px 16px 9px 13px;border-radius:999px;background:var(--blue);box-shadow:0 10px 22px -10px rgba(61,90,254,.75);font-size:14px;font-weight:800;color:#fff;text-decoration:none;white-space:nowrap;transition:background .15s,box-shadow .15s,transform .15s}
body.frdetail .frd-unlock:hover{background:#2f4be0;transform:translateY(calc(-50% - 1px));box-shadow:0 14px 26px -10px rgba(61,90,254,.85)}
body.frdetail .frd-unlock:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
body.frdetail .frd-unlock svg{width:16px;height:16px}
body.frdetail .frd-unlock svg path{stroke:#fff}
body.frdetail .frd-unlock svg rect{fill:#fff}
body.frdetail .frd-unlock svg path.k{stroke:var(--blue)}
body.frdetail .frd-more .fd-lock svg path{stroke:var(--blue)}
body.frdetail .frd-more .fd-lock svg rect{fill:var(--blue)}
body.frdetail .frd-more .fd-lock svg path.k{stroke:#fff}

/* bingo games: the pop-up listing every file, opened by clicking the preview (script in the page) */
body.frdetail .frd-modal{position:fixed;inset:0;z-index:10050;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(20,26,46,.5)}
body.frdetail .frd-modal[hidden]{display:none}
/* page held still behind the pop-up: scrolling locked on <html> with the scrollbar's space kept (scrollbar-gutter), so
   the page doesn't shift sideways when the scrollbar disappears */
html.frd-modal-open{overflow:hidden;scrollbar-gutter:stable}
body.frdetail .frd-modal-box{width:min(620px,100%);max-height:calc(100vh - 32px);overflow-y:auto;padding:22px 22px 18px;border-radius:24px;background:#fff;box-shadow:0 30px 60px -24px rgba(20,26,46,.55)}
body.frdetail .frd-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
body.frdetail .frd-modal-head small{display:block;margin-bottom:4px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#8a91a1}
body.skills.frdetail .frd-modal-head h2{margin:0;font-size:22px;line-height:1.2;letter-spacing:-.02em;font-weight:800;color:var(--ink)}
body.frdetail .frd-modal-x{flex:none;display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid var(--line);border-radius:50%;background:#fff;font:inherit;font-size:22px;line-height:1;color:var(--mut);cursor:pointer}
body.frdetail .frd-modal-x:hover{border-color:var(--ink);color:var(--ink)}
body.frdetail .frd-modal-sub{margin:8px 0 14px;font-size:14px;line-height:1.5;color:var(--mut)}
/* the files in columns, each with a small heading: Cards | Game A | Game B (--cols set in the page) */
body.frdetail .frd-modal-cols{display:grid;grid-template-columns:repeat(var(--cols,3),minmax(0,1fr));gap:14px}
body.skills.frdetail .frd-modal-col h3{margin:0 0 8px;font-size:12px;line-height:1.3;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#8a91a1}
body.frdetail .frd-modal-links{display:grid;gap:8px;margin:0;padding:0;list-style:none}
body.frdetail .frd-modal-links li{display:flex}
body.frdetail .frd-modal-links a{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:0;padding:14px 16px;border:1px solid var(--line);border-radius:14px;color:var(--ink);text-decoration:none;transition:border-color .15s,background-color .15s}
body.frdetail .frd-modal-links a:hover{border-color:#c5cad6;background:var(--soft)}
body.frdetail .frd-modal-links a:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
body.frdetail .frd-modal-links b{display:block;font-size:15px;line-height:1.25;font-weight:700}
body.frdetail .frd-modal-links small{display:block;margin-top:2px;font-size:12.5px;color:#8a91a1}
body.frdetail .frd-modal-go{display:none}
@media (max-width:560px){body.frdetail .frd-modal-cols{grid-template-columns:minmax(0,1fr)}}

/* bingo and other multi-file resources: each file as a small outlined pill */
body.frdetail .frd-files{margin:24px 0 0}
body.frdetail .frd-files p{margin:0 0 10px;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#8a91a1}
body.frdetail .frd-files div{display:flex;flex-wrap:wrap;gap:8px}
body.frdetail .frd-files a{display:inline-flex;align-items:center;height:38px;padding:0 15px;border-radius:999px;border:1.5px solid rgba(20,26,46,.18);font-size:14px;font-weight:700;color:var(--ink);text-decoration:none}
body.frdetail .frd-files a:hover{background:var(--soft)}

/* key stage / type / format, then the topics */
body.frdetail .frd-facts{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);max-width:520px;margin:30px 0 0;padding:14px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
body.frdetail .frd-facts div+div{padding-left:18px;border-left:1px solid var(--line)}
body.frdetail .frd-facts dt{margin:0 0 4px;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#8a91a1}
body.frdetail .frd-facts dd{margin:0;font-size:15.5px;font-weight:700;color:var(--ink)}
body.frdetail .frd-tags{display:flex;flex-wrap:wrap;gap:6px;margin:18px 0 0;padding:0;list-style:none}
body.frdetail .frd-tags li{padding:5px 12px;border-radius:999px;background:var(--soft);border:1px solid var(--line);font-size:13.5px;font-weight:600;color:var(--mut)}

/* ---------- about this resource: one compact soft panel. Left: a short summary and the curriculum links in two columns;
   right: "How to use it" as numbered step names ---------- */
body.frdetail .frd-sec{padding:40px 0 0}
body.frdetail .frd-panel{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:28px 40px;align-items:start;padding:28px 32px;border-radius:22px;background:var(--soft);box-shadow:inset 0 0 0 1px var(--line)}
body.frdetail .frd-panel.one{grid-template-columns:minmax(0,1fr)}
/* one column (no steps): keep the summary to a readable line length; the curriculum links can use the width */
body.frdetail .frd-panel.one .frd-lead{max-width:860px}
body.skills.frdetail .frd-panel h2{margin:0 0 10px;font-size:20px;line-height:1.25;letter-spacing:-.015em;font-weight:800;color:var(--ink)}
body.frdetail .frd-lead{margin:0;font-size:15.5px;line-height:1.6;color:var(--mut)}
body.frdetail .frd-lead strong,body.frdetail .frd-lead b{color:var(--ink)}
body.skills.frdetail .frd-panel h3{margin:20px 0 10px;font-size:12px;line-height:1.3;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#8a91a1}
body.frdetail .frd-cur{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 24px;margin:0;padding:0;list-style:none}
body.frdetail .frd-cur li{padding-left:12px;border-left:2px solid #d9def0;font-size:14px;line-height:1.45;color:var(--mut)}
body.frdetail .frd-cur b{color:var(--ink);font-weight:700}
body.frdetail .frd-how{padding-left:32px;border-left:1px solid var(--line)}
body.skills.frdetail .frd-how h3{margin-top:0}
body.frdetail .frd-steps{display:grid;gap:10px;margin:0;padding:0;list-style:none;counter-reset:s}
body.frdetail .frd-steps li{position:relative;padding-left:34px;counter-increment:s;font-size:14.5px;line-height:22px;font-weight:600;color:var(--ink)}
body.frdetail .frd-steps li::before{content:counter(s);position:absolute;left:0;top:0;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px var(--line);font-size:12px;font-weight:800;color:var(--ink)}

/* ---------- more like it: lab.css .cg-grid.four, the sheets contained on a soft panel ---------- */
body.frdetail .frd-rel{padding-top:88px}
body.frdetail .frd-rel .fx-link{margin-top:0}
body.frdetail .frd-rel .cg-thumb{display:grid;place-items:center;padding:14px;background:var(--soft);border-color:transparent}
body.frdetail .frd-rel .cg-thumb img{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}
/* under the related cards: main.css .fd-more (made for dark sections) in a light version, a soft panel with ink text */
body.frdetail .frd-more{margin-top:40px;background:var(--soft);box-shadow:inset 0 0 0 1px var(--line)}
body.skills.frdetail .frd-more h3{color:var(--ink)}
body.frdetail .frd-more p{color:var(--mut)}
body.frdetail .frd-more p strong{color:var(--ink)}
body.skills.frdetail .frd-more .fd-more-link{color:var(--ink)}

@media (max-width:900px){
 body.frdetail .frd-hero{padding:20px 0 48px}
 body.frdetail .frd-crumbs ol{margin-bottom:28px}
 body.frdetail .frd-grid{grid-template-columns:1fr;gap:36px}
 body.frdetail .frd-preview{aspect-ratio:4/3;max-height:440px}
 body.frdetail .frd-panel{grid-template-columns:1fr;gap:24px;padding:24px 22px}
 body.frdetail .frd-how{padding:20px 0 0;border-left:0;border-top:1px solid var(--line)}
 body.frdetail .frd-sec{padding-top:24px}
 body.frdetail .frd-rel{padding-top:64px}
}
@media (max-width:520px){
 body.frdetail .frd-facts{grid-auto-flow:row;grid-template-columns:1fr;gap:10px}
 body.frdetail .frd-cur{grid-template-columns:1fr}
 body.frdetail .frd-facts div+div{padding-left:0;border-left:0}
 body.frdetail .frd-hero .lh-ctas .hl-btn{flex:1 1 100%;justify-content:center}
}