/* Educator resource library, direction B (design-v2/RESOURCE-LIBRARY-B-PLAN.md): the library, lesson introductions,
   the access panel, the account strip and the Used control. Loaded after lessons.css and uses its tokens. TKS brand:
   Mediamoure headings, PP Neue Montreal for everything functional; palette values only. */
.ed-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ed-muted { color: var(--muted); }
.ed-small { margin: 0; font-size: 14px; color: var(--muted); }
.ed-quiet { margin: 0; font-size: 14px; color: var(--muted); }
.ed-link { background: none; border: 0; padding: 0; font: inherit; color: var(--green-800); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.ed-link:hover { color: var(--forest); }
.ed-h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 6vw, 64px); line-height: 1; letter-spacing: -0.02em; text-wrap: balance; }
.ed-h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4vw, 40px); line-height: 1.05; letter-spacing: -0.02em; }
.ed-h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; }
.ed-h1 em, .ed-h2 em, .ed-h3 em { color: var(--green-700); }
.ed-lead { margin: 0; font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 640px; }
.ed-label { margin: 0; font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0; }
.ed-eyebrow { font-size: 13px; font-weight: 500; color: var(--green-700); }
.ed-banner { margin: 0; background: var(--g50); color: var(--forest); border-radius: 16px; padding: 12px 16px; font-size: 15px; }

/* Account (signed in): sits at the right end of the header row, not in a strip of its own */
.ed-account { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.ed-account[hidden] { display: none; }
@media (max-width: 640px) {
  .lp-header__row:has(.ed-account:not([hidden])) :is(.lp-header__divider, .lp-header__label) { display: none; }
}

/* Status pills */
.ed-st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.ed-st--sample { background: var(--g50); color: var(--forest); }
.ed-st--used { background: var(--forest); color: var(--white); }
.ed-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; }

/* Library layout (option A1) */
html:has(body.ed-library) { scroll-padding-top: 88px; }
.ed-library .lp-main { overflow: visible; overflow-x: clip; }
.ed-intro { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-block: 28px 20px; }
.ed-library .ed-h1 { font-size: clamp(38px, 4.8vw, 54px); }

/* First sign-in: what it asks for, before the email is sent */
.ed-first { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--body); }
.ed-first p { margin: 0; }
.ed-first__list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

/* Sticky control bar, pills, status */
.ed-bar { position: sticky; top: 0; z-index: 5; background: rgba(253, 252, 251, 0.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ed-bar__in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-block: 10px; }
.ed-typebar { display: flex; align-items: center; flex-shrink: 0; }
.ed-tools { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; min-width: 0; }
.ed-search { flex: 1 1 180px; min-width: 0; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; }
.ed-search::placeholder { color: var(--muted); }
.ed-search:focus-visible { outline: 3px solid var(--green-700); outline-offset: 1px; border-color: var(--green-700); }
.ed-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
.ed-seg button { border: 0; border-radius: 999px; padding: 0 16px; min-height: 40px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: 14px; }
.ed-seg button[aria-pressed="true"] { background: var(--forest); color: var(--white); font-weight: 500; }
.ed-bar .ed-seg { flex-wrap: nowrap; padding: 3px; border-color: var(--line-2); }
.ed-bar .ed-seg button { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; min-height: 44px; white-space: nowrap; }
.ed-seg--view { flex-shrink: 0; }
.ed-n { font-size: 13px; font-weight: 400; color: var(--muted); }
.ed-bar .ed-seg button[aria-pressed="true"] .ed-n, .ed-pill[aria-pressed="true"] .ed-n { color: var(--g50); }

.ed-pills-wrap { padding-block: 12px 4px; }
.ed-pills { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ed-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line-2); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.ed-pill:hover { border-color: var(--ink); }
.ed-pill--mark::before { content: ""; width: 8px; height: 8px; background: var(--green); flex-shrink: 0; }
.ed-pill[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--white); }
.ed-pill[aria-pressed="true"]::before { background: var(--g50); }
.ed-pill.is-zero:not([aria-pressed="true"]) { color: var(--muted); border-style: dashed; }
.ed-pill.is-zero:not([aria-pressed="true"])::before { opacity: 0.45; }

.ed-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-block: 10px 8px; }
.ed-count { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.ed-status .ed-count { margin: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
.ed-status .ed-count:focus { outline: none; }
.ed-status .ed-count:focus-visible { outline: 3px solid var(--green-700); outline-offset: 4px; }
.ed-filters { font-size: 14px; color: var(--muted); }
.ed-clear { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 500; color: var(--green-700); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; }
.ed-clear:hover { color: var(--forest); }


/* Results & groups */
.ed-results { display: flex; flex-direction: column; gap: 36px; padding-block: 20px 48px; }
.ed-group { display: flex; flex-direction: column; gap: 14px; }
.ed-group__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.ed-group__head .ed-h2 { font-size: clamp(30px, 4vw, 38px); }
.ed-group__n { margin: 0; font-size: 14px; color: var(--muted); white-space: nowrap; }
.ed-group__desc { margin: -6px 0 2px; font-size: 16px; line-height: 1.5; color: var(--body); max-width: 780px; }
.ed-show-all { align-self: flex-start; margin-top: 4px; }

/* Cards (Option 5A Slim ribbon: full-bleed pill ribbon, titles stay on white; List view uses a 6px left rail) */
.ed-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ed-card { position: relative; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ed-card--sample { border: 2px solid var(--green-700); }
.ed-once { margin: 0; font-size: 14px; color: var(--forest); background: var(--g50); border-radius: 12px; padding: 10px 12px; }
.ed-card__top { display: flex; flex-wrap: wrap; gap: 6px 8px; justify-content: space-between; align-items: center; margin: -18px -18px 4px; padding: 10px 18px; }
.ed-card[data-type="mindsets"] .ed-card__top { background: var(--forest); }
.ed-card[data-type="life-skills"] .ed-card__top { background: var(--wash); box-shadow: inset 0 -1px 0 var(--g50); }
.ed-card--sample .ed-card__top { margin: -16px -16px 4px; padding: 9px 16px; border-radius: 16px 16px 0 0; }
.ed-type { display: inline-flex; align-items: center; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--line-2); color: var(--ink); white-space: nowrap; }
.ed-type--mindsets { background: var(--g50); color: var(--forest); }
.ed-type--life-skills { background: var(--paper); color: var(--green-800); box-shadow: inset 0 0 0 1px var(--green-700); }
.ed-flag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ed-flag--free { gap: 6px; background: var(--white); color: var(--forest); }
.ed-flag--free::before { content: ""; width: 7px; height: 7px; flex-shrink: 0; background: var(--green); }
.ed-card[data-type="mindsets"] .ed-card__top :focus-visible { outline-color: var(--white); }
.ed-card[data-type="mindsets"] .ed-why[data-why-skill] { box-shadow: inset 3px 0 0 var(--forest); }
.ed-card[data-type="life-skills"] .ed-why[data-why-skill] { box-shadow: inset 3px 0 0 #44933F; }
.ed-card__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 27px; line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); }
.ed-card__title em { font-style: italic; color: var(--green-700); }
.ed-why, .ed-snip { margin: 0; background: var(--warm); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.48; color: var(--body); }
.ed-why b { display: block; font-size: 13px; font-weight: 500; color: var(--green-700); margin-bottom: 2px; }
.ed-details { display: flex; flex-direction: column; gap: 8px; }
.ed-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted); align-items: center; }
.ed-meta span { display: inline-flex; align-items: center; gap: 6px; }
.ed-card__line { margin-top: auto; padding-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.ed-skills-row { display: inline-flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; font-weight: 500; color: var(--ink); }
.ed-skill { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ed-skill::before { content: ""; width: 8px; height: 8px; background: var(--green); flex-shrink: 0; }
.ed-skill.is-hit::before { background: var(--forest); }
.ed-card__foot { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 4px; }
.ed-more { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; }
.ed-more:hover { color: var(--green-700); }
.ed-card__foot .ed-link { margin-left: auto; font-size: 14px; font-weight: 500; }
.ed-empty { border: 1px dashed var(--line-2); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; background: var(--paper); }
.ed-empty p { margin: 0; font-size: 18px; font-weight: 500; }

/* List view */
.ed-library[data-view="list"] .ed-cards { grid-template-columns: minmax(0, 1fr); gap: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.ed-library[data-view="list"] .ed-card { overflow: visible; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 20px; row-gap: 4px; align-items: center; border: 0; border-top: 1px solid var(--line); margin-top: -1px; border-radius: 0; padding: 14px 20px; }
.ed-library[data-view="list"] .ed-card[data-type="mindsets"] { box-shadow: inset 6px 0 0 var(--forest); }
.ed-library[data-view="list"] .ed-card[data-type="life-skills"] { box-shadow: inset 6px 0 0 #8BCA88; }
.ed-library[data-view="list"] .ed-card--sample { border: 0; border-top: 1px solid var(--line); background: var(--wash); }
.ed-library[data-view="list"] .ed-card__title { grid-column: 1; grid-row: 1; font-size: 22px; }
.ed-library[data-view="list"] .ed-card__q { grid-column: 1; grid-row: 2; font-size: 14px; font-weight: 400; color: var(--body); }
.ed-library[data-view="list"] .ed-card__top { grid-column: 2; grid-row: 1; justify-content: flex-start; margin: 0; padding: 0; background: none; box-shadow: none; border-radius: 0; }
.ed-library[data-view="list"] .ed-card[data-type="mindsets"] .ed-type--mindsets { background: var(--forest); color: var(--white); }
.ed-library[data-view="list"] .ed-card--sample .ed-flag--free { box-shadow: inset 0 0 0 1px var(--green-700); }
.ed-library[data-view="list"] .ed-card__line { grid-column: 2; grid-row: 2; margin-top: 0; padding-top: 0; }
.ed-library[data-view="list"] .ed-card__foot { grid-column: 3; grid-row: 1 / 3; border-top: 0; padding-top: 0; flex-wrap: nowrap; justify-content: flex-end; gap: 14px; }
.ed-library[data-view="list"] .ed-card__foot .ed-link { margin-left: 0; white-space: nowrap; }
.ed-library[data-view="list"] .ed-snip,
.ed-library[data-view="list"] .ed-card > .ed-why,
.ed-library[data-view="list"] .ed-details { grid-column: 1 / -1; margin-top: 8px; }

/* Coming soon, booking, privacy */
/* Coming soon as a roadmap track (Damian, 2026-11-15, "Soon 1"): three stops on one dotted line; the weekly mindset
   lessons get the filled square. Below 900px the line runs down the left side. */
.ed-soon { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 30px 32px 32px; }
.ed-soon__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 28px; }
.ed-soon .ed-h2 { font-size: 34px; }
.ed-soon__lead { margin: 0; font-size: 15px; color: var(--muted); }
.ed-track { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.ed-track::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 12px); }
.ed-stop { position: relative; display: flex; flex-direction: column; gap: 6px; padding-top: 30px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.ed-stop::before { content: ""; position: absolute; top: 0; left: 0; width: 14px; height: 14px; box-sizing: border-box; background: var(--paper); border: 2px solid var(--g100); }
.ed-stop--now::before { background: var(--green); border-color: var(--green); }
.ed-stop--now::after { content: ""; position: absolute; top: 0; left: 14px; width: 14px; height: 14px; background: var(--g100); }
.ed-stop__when { font-size: 12px; font-weight: 500; color: var(--muted); }
.ed-stop--now .ed-stop__when { color: var(--green-700); }
.ed-stop b { font-size: 17px; font-weight: 500; line-height: 1.25; color: var(--ink); }
@media (max-width: 900px) {
  .ed-track { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-left: 30px; }
  .ed-track::before { top: 0; bottom: 0; left: 6px; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--line-2) 0 6px, transparent 6px 12px); }
  .ed-stop { padding-top: 0; }
  .ed-stop::before { left: -30px; top: 2px; }
  .ed-stop--now::after { display: none; }
}
.ed-book { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: center; justify-content: space-between; padding-block: 24px 48px; font-size: 15px; color: var(--muted); }
.ed-book p { margin: 0; max-width: 60ch; }
.ed-modal { padding: 0; border: 0; border-radius: 24px; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--white); color: var(--ink); }
.ed-modal::backdrop { background: rgba(35, 31, 32, 0.55); }
.ed-modal__inner { position: relative; padding: 40px 36px 36px; display: flex; flex-direction: column; gap: 16px; }
.ed-privacy__body { display: flex; flex-direction: column; gap: 12px; max-width: 720px; font-size: 15px; line-height: 1.55; color: var(--body); }
.ed-privacy__body p { margin: 0; }
.ed-privacy__body b { color: var(--ink); font-weight: 500; }

/* Lesson introduction */
.ed-hero { align-items: start; }
.ed-gate { background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: 28px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.ed-gate p { margin: 0; }
.ed-mats { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ed-mats li { border: 1px dashed var(--line-2); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--white); font-size: 14px; font-weight: 500; }
.ed-mats li svg { flex-shrink: 0; }
.ed-sk { display: block; height: 10px; width: 80%; border-radius: 5px; background: var(--line); }
.ed-sk--short { width: 50%; }

/* Used control */
.ed-used-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.ed-used { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px 0 14px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; font-weight: 500; }
.ed-used__box { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.ed-used__box svg { visibility: hidden; }
.ed-used.is-on { background: var(--forest); border-color: var(--forest); color: var(--white); }
.ed-used.is-on .ed-used__box { background: var(--green); border-color: var(--green); color: var(--ink); }
.ed-used.is-on .ed-used__box svg { visibility: visible; }
.ed-used[aria-busy="true"] { opacity: 0.7; }
.ed-used__status { font-size: 14px; color: var(--green-700); }
.ed-used__status.is-error { color: var(--ink); }

/* Access panel: a side panel on wide screens, a bottom sheet on phones (direction B) */
.ed-panel { margin: 0 0 0 auto; padding: 0; border: 0; width: min(460px, 100vw); max-width: 100vw; height: 100%; max-height: 100vh; background: var(--white); color: var(--ink); border-radius: 24px 0 0 24px; }
.ed-panel::backdrop { background: rgba(35, 31, 32, 0.55); }
.ed-panel__inner { position: relative; padding: 72px 36px 36px; display: flex; flex-direction: column; gap: 16px; }
.ed-panel__x { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--grid); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; }
.ed-stepn { margin: 0; font-size: 13px; color: var(--muted); }
.ed-step { display: flex; flex-direction: column; gap: 16px; }
.ed-step p { margin: 0; }
.ed-form { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.ed-form > .lp-btn, .ed-form > .ed-link { align-self: flex-start; }
.ed-field { display: flex; flex-direction: column; gap: 6px; }
.ed-field label, .ed-flabel { font-size: 14px; font-weight: 500; }
.ed-opt { font-weight: 400; color: var(--muted); }
.ed-field input { font: inherit; font-size: 16px; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid #A59F99; background: var(--paper); color: var(--ink); width: 100%; box-sizing: border-box; }
.ed-field input:focus-visible { outline: 3px solid var(--green-700); outline-offset: 1px; border-color: var(--green-700); }
.ed-code { letter-spacing: 0.5em; font-size: 24px !important; text-align: center; }
.ed-error { margin: 0; font-size: 14px; background: var(--grid); border-radius: 12px; padding: 10px 12px; }
.ed-error::before { content: "!"; display: inline-flex; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; background: var(--ink); color: var(--white); font-size: 12px; font-weight: 500; align-items: center; justify-content: center; }
.ed-note { font-size: 14px; background: var(--warm); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ed-note b { font-weight: 500; }
.ed-row { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.ed-why-note { font-size: 13px; color: var(--muted); }
.ed-form .lp-btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }

@media (max-width: 960px) {
  .ed-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ed-mats { grid-template-columns: minmax(0, 1fr); }
  .ed-soon { padding: 24px 20px; }
  .ed-soon .ed-h2 { font-size: 30px; }
  .ed-soon__top { margin-bottom: 22px; }
  .ed-intro { padding-block: 24px 16px; }
  .ed-results { padding-block: 16px 36px; }
  .ed-gate { padding: 22px; }
  .ed-panel { inset: auto 0 0 0; margin: 0; width: 100vw; height: auto; min-height: 92vh; max-height: 92vh; overflow-y: auto; border-radius: 24px 24px 0 0; }
  .ed-panel__inner { padding: 64px 20px 28px; }
}
@media (max-width: 640px) {
}
@media (max-width: 600px) {
  html:has(body.ed-library) { scroll-padding-top: 80px; }
  .ed-cards { grid-template-columns: minmax(0, 1fr); }
  .ed-bar:not([hidden]),
  .ed-bar:not([hidden]) .ed-bar__in { display: contents; }
  .ed-typebar { position: sticky; top: 0; z-index: 5; background: rgba(253, 252, 251, 0.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 16px; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ed-typebar .ed-seg { max-width: 100%; }
  .ed-bar .ed-typebar .ed-seg button { padding: 0 12px; font-size: 13px; }
  .ed-tools { background: rgba(253, 252, 251, 0.96); border-bottom: 1px solid var(--line); padding: 8px 16px; width: 100%; flex-wrap: nowrap; gap: 8px; }
  .ed-search { min-width: 0; flex: 1 1 auto; font-size: 16px; }
  .ed-bar .ed-seg--view button { padding: 0 11px; font-size: 13px; }
  .ed-pills-wrap { padding-inline: 16px; }
  .ed-pills { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .ed-library[data-view="list"] .ed-card { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 16px; }
  .ed-library[data-view="list"] .ed-card[data-type="mindsets"] { box-shadow: inset 4px 0 0 var(--forest); }
  .ed-library[data-view="list"] .ed-card[data-type="life-skills"] { box-shadow: inset 4px 0 0 #8BCA88; }
  .ed-library[data-view="list"] .ed-card__foot { border-top: 1px solid var(--line); padding-top: 4px; justify-content: space-between; }
  .ed-library[data-view="list"] .ed-card__foot .ed-link { margin-left: auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .ed-panel[open] { animation: ed-in 180ms ease-out; }
  @keyframes ed-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 760px) {
  .ed-panel[open] { animation-name: ed-up; }
  @keyframes ed-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* What students see (critique 2026-11-15): a classroom-screen frame drawn from the public projection, on cards and on
   the lesson introduction. Brand palette only; the pixel blocks are the same elements the screens use. */
.ed-thumb { position: relative; overflow: hidden; min-height: 150px; box-sizing: border-box; border-radius: 16px; border: 1px solid var(--g50); background-color: var(--white); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 28px 28px; color: var(--ink); padding: 14px 18px 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.ed-thumb__pix { position: absolute; top: 0; right: 0; display: grid; grid-template-columns: repeat(var(--cols), 18px); grid-auto-rows: 18px; }
.ed-thumb__tag { align-self: flex-start; font-size: 12px; font-weight: 500; color: var(--white); background: var(--forest); border-radius: 999px; padding: 3px 10px; }
.ed-screen--q .ed-thumb__tag { color: var(--forest); background: var(--g50); }
.ed-thumb__q { font-family: var(--serif); font-size: 24px; line-height: 1.1; letter-spacing: -0.01em; max-width: 90%; text-wrap: balance; }
.ed-thumb__title { position: relative; margin: 0; font-family: var(--serif); font-weight: 400; font-size: 42px; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.ed-thumb__title em { font-style: italic; color: var(--green-700); }
.ed-card__q { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.38; color: var(--ink); }
.ed-screens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; }
.ed-screen { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; } /* pill top-left, like the library cards */
.ed-screen--title { background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.ed-screen--title .ed-thumb__tag { background: var(--forest); color: var(--white); }
.ed-screen__title { font-family: var(--serif); font-size: 26px; line-height: 1; letter-spacing: -0.02em; }
.ed-screen__title em { color: var(--green-700); }
.ed-screen--q { background: var(--forest); color: var(--white); }
.ed-screen--q .ed-thumb__q { font-size: 19px; }
/* "How this works" on the email step: the details a first-time educator may want, out of the way. */
.ed-how { font-size: 14px; color: var(--body); }
.ed-how summary { cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; color: var(--green-800); text-decoration: underline; text-underline-offset: 3px; }
.ed-how[open] summary { margin-bottom: 4px; }
.ed-how p, .ed-how ol { margin: 0 0 8px; }
.ed-how ol { padding-left: 20px; }
.ed-field input[aria-invalid="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
@media (max-width: 760px) {
  .ed-thumb { min-height: 128px; }
  .ed-thumb__title { font-size: 34px; }
  .ed-thumb__q { font-size: 21px; }
  .ed-screens { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .ed-screen__title { font-size: 20px; }
  .ed-screen--q .ed-thumb__q { font-size: 15px; }
}

/* 3B: the corner cluster's loose bottom-right pixel opens TKStack. */
.ed-loose, .ed-loose__slot { --px: 56px; position: absolute; right: 0; width: var(--px); height: var(--px); }
.ed-loose__slot { top: calc(var(--px) * 3); z-index: 1; border: 1.5px dashed #A8D8A6; box-sizing: border-box; pointer-events: none; }
.ed-loose { top: calc(var(--px) * 2.4); z-index: 2; display: block; text-decoration: none; }
.ed-loose::before { content: ""; position: absolute; right: 0; top: 0; width: max(44px, 100%); height: max(44px, 100%); }
.ed-loose__px { display: block; width: 100%; height: 100%; background: #C5E5C3; transform: none; }
.ed-loose__tag { position: absolute; right: calc(100% + 12px); top: calc(var(--px) * 1.1); transform: translateY(-50%); white-space: nowrap; padding: 7px 14px; border-radius: 999px; background: var(--ink); color: var(--white); font: 500 13px/1.2 var(--sans); opacity: 0; pointer-events: none; }
.ed-loose__tag::after { content: ""; position: absolute; left: 100%; top: 0; bottom: 0; width: 12px; pointer-events: none; }
.ed-loose:hover .ed-loose__px, .ed-loose:focus-visible .ed-loose__px { transform: translateY(calc(var(--px) * 0.6)); }
.ed-loose:hover .ed-loose__tag, .ed-loose:focus-visible .ed-loose__tag { opacity: 1; pointer-events: auto; }
.ed-loose:hover .ed-loose__tag::after, .ed-loose:focus-visible .ed-loose__tag::after { pointer-events: auto; }
.ed-loose:focus-visible { outline: none; }
.ed-loose:focus-visible .ed-loose__px { outline: 3px solid #367533; outline-offset: -3px; }
@media (max-width: 640px) {
  .ed-loose, .ed-loose__slot { --px: 32px; }
}
@media (prefers-reduced-motion: no-preference) {
  .ed-loose__px { transition: transform 180ms ease-out; animation: ed-slip 400ms ease-out; }
  .ed-loose:hover .ed-loose__px, .ed-loose:focus-visible .ed-loose__px { animation-delay: -400ms; }
  .ed-loose--settled .ed-loose__px { animation: none; }
  .ed-loose__tag { transition: opacity 180ms ease-out; }
  @keyframes ed-slip { from { transform: translateY(calc(var(--px) * -0.4)); } to { transform: none; } }
}
