/* Early learning hubs (/early-learning/, scripts/early-learning.mjs). */
.el-page h2 { margin-top: 36px; }
.el-page .sub { color: var(--muted); }
.el-countries { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.el-country { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius-lg, 16px); padding: 14px 16px; }
.el-country a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); min-height: 44px; }
.el-country a strong { font-size: 1.2rem; }
.el-country a span { color: var(--coral-dark); font-weight: 700; }
.el-country p { margin: 8px 0 0; font-size: .95rem; }
.el-region { margin: 16px 0; padding: 12px 14px; background: var(--sun-field); border-radius: var(--radius, 12px); }
.el-region-h { margin: 0 0 8px; font-weight: 700; }
.el-region-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.el-region .f-note, .el-filters .f-note { font-size: .85rem; color: var(--muted); margin: 6px 0 0; flex-basis: 100%; }
.el-mine { margin: 8px 0 0; font-weight: 700; }
.el-table-wrap, .el-page .table-wrap { overflow-x: auto; max-width: 100%; }
.el-table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: .95rem; }
.el-table caption { text-align: left; font-weight: 700; padding: 0 0 8px; }
.el-table th, .el-table td { border: 1px solid var(--line-2); padding: 8px 10px; text-align: left; vertical-align: top; }
.el-table thead th { background: var(--sun-soft); }
.el-area h3 { margin: 24px 0 10px; }
.el-stages { columns: 2 220px; }
.el-sources li { overflow-wrap: anywhere; }
.pdf-pair { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.pdf-pair .btn { min-height: 44px; }
.el-review-top { margin: -4px 0 12px; font-size: var(--t-sm, .95rem); color: var(--ink); padding: 8px 12px; border-left: 4px solid var(--coral); background: var(--coral-soft); border-radius: 8px; }
.el-feature { margin: 12px 0; padding: 12px 14px; border-left: 4px solid var(--coral); background: var(--coral-soft); border-radius: 8px; }
.el-dl { margin: 28px 0; padding-top: 4px; border-top: 2px solid var(--line); }
.el-dl-row { display: grid; gap: 16px; align-items: start; }
@media (min-width: 720px) { .el-dl-row { grid-template-columns: 300px 1fr; } }
.el-prev { margin: 0; }
/* Preview: the same white sheet on a tinted tray as the resource cards. */
.el-prev { max-width: 320px; padding: 14px; border-radius: var(--radius); background: var(--well); }
.el-prev img { display: block; width: 100%; height: auto; border-radius: 3px; background: #fff; }
.el-prev figcaption { font-size: .875rem; color: var(--muted); margin-top: 8px; }
/* Downloads: the main pair reads first; an ink-saver pair right after it is one step quieter. */
.el-dl .pdf-pair + .pdf-pair { margin-top: 0; }
.el-dl .pdf-pair + .pdf-pair .btn { --b-bd: var(--line-2); font-weight: 600; font-size: 1rem; }
.el-dl .pdf-pair + .pdf-pair .btn:hover { --b-bd: var(--line-2); }
.el-dl .pdf-pair .btn::before { content: ""; width: 14px; height: 14px; flex: none; background: currentColor; -webkit-mask: var(--dl-ico) center / contain no-repeat; mask: var(--dl-ico) center / contain no-repeat; }
.el-page { --dl-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M6.5 9.5 12 15l5.5-5.5M4 20h16'/%3E%3C/svg%3E"); }

/* "Inside this set" (scripts/glance.mjs): what the page holds, as facts and a visual contents list of its printables. */
.glance { margin: 20px 0 24px; padding: 18px 18px 20px; border-radius: var(--radius-lg); background: var(--card); border: 2px solid var(--line); }
.glance .gl-h { margin: 0 0 6px; font-size: var(--t-lg); }
.gl-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 16px; padding: 0; font-size: var(--t-sm); font-weight: 700; }
.gl-facts li { display: inline-flex; align-items: center; gap: 6px; }
.gl-facts li::before { content: ""; width: 16px; height: 16px; flex: none; background: var(--green); -webkit-mask: var(--ok-ico) center / contain no-repeat; mask: var(--ok-ico) center / contain no-repeat; }
.glance { --ok-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5 9.5 17.5 19.5 6.5'/%3E%3C/svg%3E"); }
.gl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 12px; }
@media (min-width: 900px) { .gl-list { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; } }
.gl-list a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 6px 6px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .9375rem; line-height: 1.3; transition: background-color .2s, transform .28s var(--spring); }
.gl-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; padding: 10px; border-radius: 8px; background: var(--well); transition: background-color .2s; }
.gl-img img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: 2px; background: #fff; }
@media (hover: hover) {
  .gl-list a:hover { background: var(--sun-soft); }
  .gl-list a:hover .gl-img { background: var(--well-hover); }
}
.gl-list a:focus-visible { background: var(--sun-soft); }
/* Phones: one row that scrolls sideways, the next printable peeking in. */
@media (max-width: 560px) {
  .glance { padding: 16px 0 16px 16px; }
  .glance .gl-h, .gl-facts { padding-right: 16px; }
  .gl-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding: 0 16px 4px 0; overscroll-behavior-x: contain; }
  .gl-list li { flex: 0 0 128px; scroll-snap-align: start; }
}
.el-outcomes li { margin: 4px 0; }
/* Resource cards: what it is, ages, paper and country at a glance (11 Nov 2026, research/twinkl-ux-20261111.md). */
.el-grid .card .el-meta { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; margin-top: auto; font-size: .875rem; line-height: 1.4; }
/* Facts: type in ink, then ages and paper; a fact never breaks inside, and the dot ends a line rather than starting one. */
.el-facts { display: flex; flex-wrap: wrap; color: var(--muted); font-weight: 600; }
.el-facts > span { white-space: nowrap; }
.el-facts > span:first-child { color: var(--ink); font-weight: 700; }
.el-facts > span:not(:last-child)::after { content: "·" / ""; margin: 0 .4em; color: var(--muted); font-weight: 600; }
.el-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.el-badge, .el-free { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.el-badge { background: var(--sun-soft); color: var(--ink); }
.el-free { background: var(--green-soft); color: var(--green); }
/* Filters: live counts, several per row, clear all; on phones the bar stays in reach while the grid scrolls. */
.el-filters .chip.is-empty:not([aria-pressed="true"]) { --b-bg: #fff; --b-bd: var(--line-2); }
.el-filters .f-on { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; background: var(--sun); color: var(--ink); font-weight: 800; font-size: var(--t-xs); white-space: nowrap; }
.el-filters .f-on[hidden] { display: none; }
.el-filters .f-what { font-weight: 600; color: var(--muted); }
/* Phones (review-ready UX, 12 Nov 2026): one short summary row ("Filter resources  2 on") and one status row
   ("14 of 69 resources match · Clear all"), so the sticky bar stays about 100 px tall instead of ~240. */
@media (max-width: 560px) {
  .el-filters .f-what, .el-filters .f-x { display: none; }
  .el-filters .f-foot { flex-wrap: nowrap; gap: 10px; margin-top: 4px; padding-bottom: 4px; }
  .el-filters .f-foot .f-status { flex: 1; min-width: 0; font-size: var(--t-xs); line-height: 1.3; }
  .el-filters .f-clear { flex: none; padding: 0 16px; }
}
.el-filters .f-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 6px; }
.el-filters .f-foot .f-status { margin: 0; }
.el-filters .f-clear { min-height: 44px; }
.el-filters .f-clear[hidden] { display: none; }
/* Phones: the closed bar (one summary row and the status row) sticks to the top while scrolling the cards; the open
   panel scrolls with the page instead of covering three quarters of it (teacher review, 12 Nov 2026), and "Show N
   resources" at its foot closes it and jumps to the cards. */
.el-filters .f-done { display: none; margin: 10px 0 12px; }
@media (max-width: 560px) {
  .el-filters { position: sticky; top: 0; z-index: 20; background: var(--bg); }
  .el-filters.is-open { position: static; }
  .el-filters .f-done { display: block; }
  .el-filters .f-show { width: 100%; min-height: 48px; }
}
.el-jump { margin: 4px 0 8px; }
/* The country choice and the filter bar only work with JavaScript, so they start hidden; html.js is set in the head,
   so with JavaScript on they take their space from the first paint and the grid below no longer jumps when
   public/early-learning.js fills them (CLS was 0.25 at 1280 px once the grid moved up into the first screen). */
.js .el-region[hidden], .js .el-filters[hidden] { display: block !important; } /* beats the global [hidden] rule in style.css */
.js .el-filters .f-foot .f-status:empty { min-height: 1.6em; }

/* "Supports:" block (data/frameworks.js supportsBlock): one row per framework, a badge with its name and country,
   then the strands, outcomes, areas or domains as a short list (review-ready UX, 12 Nov 2026). */
.fw-sup { margin: 16px 0; padding: 14px 16px 12px; border-radius: var(--radius); background: #fff; max-width: 760px; }
.fw-sup .fw-sup-h { margin: 0 0 8px; font-weight: 800; }
.fw-sup ul { list-style: none; margin: 0; padding: 0; }
.fw-list > li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 4px 14px; align-items: start; padding: 8px 0; }
.fw-badge { justify-self: start; display: inline-flex; flex-direction: column; align-items: flex-start; padding: 4px 10px 5px; border-radius: 10px; background: var(--sun-soft); font-weight: 800; line-height: 1.2; }
.fw-c { font-weight: 600; font-size: .8125rem; color: var(--muted); }
.fw-parts li { margin: 0; padding: 2px 0; line-height: 1.4; }
.prose .fw-parts li, .prose .fw-list > li { margin: 0; }
@media (min-width: 768px) { .fw-list > li { grid-template-columns: 9rem minmax(0, 1fr); } }
@media (max-width: 560px) {
  .fw-list > li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .fw-badge { flex-direction: row; align-items: baseline; gap: 6px; }
}

/* "About this resource" (scripts/glance.mjs aboutHtml): one summary row on phones, open in two columns from 768 px. */
.el-about { margin: 0 0 24px; }
.ab-d { border-radius: var(--radius-lg); background: #fff; }
.ab-d > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; min-height: 56px; padding: 10px 44px 10px 18px; position: relative; cursor: pointer; list-style: none; border-radius: var(--radius-lg); }
.ab-d > summary::-webkit-details-marker { display: none; }
.ab-d > summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .3s var(--spring); }
.ab-d[open] > summary::after { transform: translateY(4px) rotate(-135deg); }
.ab-d > summary:hover { background: var(--sun-soft); }
.el-about .ab-h { margin: 0; font-size: var(--t-lg); }
.ab-short { color: var(--muted); font-size: var(--t-xs); font-weight: 600; }
.ab-body { padding: 4px 18px 16px; }
.ab-facts { margin: 0; }
.ab-facts > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 12px; padding: 6px 0; }
.ab-facts dt { font-weight: 800; }
.ab-facts dd { margin: 0; }
.ab-facts ul { list-style: none; margin: 0; padding: 0; }
.ab-facts li + li { margin-top: 2px; }
.ab-use h3 { margin: 12px 0 6px; font-size: var(--t-md); }
.ab-use ol { margin: 0; padding-left: 1.4em; }
.ab-use li { margin: 0 0 6px; padding-left: 2px; }
@media (min-width: 768px) {
  .ab-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 8px 32px; padding: 0 22px 18px; }
  .ab-use h3 { margin-top: 6px; }
  @supports selector(::details-content) {
    .ab-d::details-content { content-visibility: visible; display: block; block-size: auto; }
    .ab-d > summary { cursor: default; padding: 16px 22px 8px; min-height: 0; }
    .ab-d > summary::after, .ab-short { display: none; }
    .ab-d > summary:hover { background: none; }
  }
}

/* "Related sets" (scripts/glance.mjs relatedHtml): the same tray cards as "Inside this set", with type and ages. */
.el-related { margin: 32px 0 8px; }
.el-related h2 { margin: 0 0 12px; }
.rel-list .rel-m { margin-top: -4px; color: var(--muted); font-weight: 600; font-size: .875rem; }
@media (max-width: 560px) { .el-related .gl-list { margin-right: -16px; padding-right: 16px; } .rel-list li { flex-basis: 140px; } }
/* Brain breaks (/brain-breaks/, scripts/brain-breaks.mjs): card list, type shapes and the on-page picker. */
.bb-pick { margin: 24px 0; padding: 4px 18px 14px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); }
.bb-f { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0; }
.bb-f label { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.bb-out { min-height: 1.5em; font-weight: 700; font-size: var(--t-md); }
.bb-cards { list-style: none; padding: 0; margin: 12px 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.bb-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.bb-card h3 { margin: 0 0 4px; display: flex; gap: 8px; align-items: center; }
.bb-card p { margin: 6px 0; }
.bb-meta { color: var(--muted); font-weight: 600; font-size: var(--t-sm); }
.bb-adapt { color: var(--muted); font-size: var(--t-sm); }
.bb-card.bb-on { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.bb-card:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.bb-sh { display: inline-block; width: 16px; height: 16px; flex: none; background: var(--ink); vertical-align: -2px; margin-right: 4px; }
.bb-circle { border-radius: 50%; background: #c4553d; }
.bb-square { border-radius: 2px; background: #2f6db3; }
.bb-triangle { clip-path: polygon(50% 0, 100% 100%, 0 100%); background: #6b4fb3; }
.bb-diamond { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: #9a7400; }
.bb-star { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); background: #3d8a3a; }
.bb-group h2 { display: flex; gap: 8px; align-items: center; }
