/* Round 13 · the School resources page (resources.html only). Loads after resources.css and r10-base.css.
   Plan: ../../../ROUND13-RESOURCES-BUILD-PLAN.md. Approved look: ../../../round13-mockup/R13b-Res-Picks.dc.html.
   Normal scrolling: no sticky or fixed stages. Every rule is scoped under .r13-main. */

body { background: var(--page); color: var(--ink); font-family: var(--ui); }
.r13-main { --grid-line: rgba(54, 117, 51, 0.08); --thread-x: 13px;
  background: var(--page); color: var(--ink); font: 400 16px/1.3 var(--ui); overflow-x: clip; }
.r13-main p, .r13-main ul, .r13-main ol, .r13-main h2, .r13-main h3, .r13-main h4, .r13-main h5, .r13-main blockquote { margin: 0; }
.r13-main h1, .r13-main h2, .r13-row__word, .r13-piece__words {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
.r13-main h1 em, .r13-row__word em, .r13-thumb--tile em { font-style: italic; color: var(--green-700); }
.r13-main h2 { font-size: clamp(36px, 3.4vw, 48px); line-height: 1.08; color: inherit; }
.r13-main a:not(.btn) { color: var(--green-800); }
.r13-main a:not(.btn):hover { color: var(--green-900); }
.r13-main a svg { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; }
.r13-main .btn { display: inline-flex; align-items: center; gap: 10px; }
.r13-main .btn svg { width: 20px; height: 20px; }
.r13-main [id] { scroll-margin-top: 24px; }

.r13-rule { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--ink); font: 500 14px/1.3 var(--ui); }
.r13-rule span:first-child { color: var(--green-800); }
.r13-rule span:last-child { color: var(--muted); }
.r13-status { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; font: 500 13px/1 var(--ui); white-space: nowrap; }
/* Round 15: board tokens, each with a 7 px square marker. */
.r13-status::before { content: ""; width: 7px; height: 7px; }
.r13-status--dev { background: #F4F1ED; color: var(--ink); }
.r13-status--dev::before { background: #807B76; }
.r13-status--ok { background: #C5E5C3; color: var(--green-900); }
.r13-status--ok::before { background: var(--green-700); }
.r13-status--you { background: var(--page); color: var(--ink); border: 1px solid #D3CCC4; }
.r13-status--you::before { background: var(--green); }
.r13-note { font-size: 13px; line-height: 1.45; color: var(--muted); }
/* Mobile UX plan 0B (2026-11-05): the IKEA student example opens here on phones only. Above 760px .r13-phone is
   display: none, so desktop keeps the Oct 30 removal in layout and for assistive technology. */
.r13-statuses { display: flex; flex-wrap: wrap; gap: 8px; }
.r13-phone { display: none; }
.r13-status--free { background: #FFF4D6; color: #6B4E00; }
.r13-status--free::before { background: #B98A00; }
@media (max-width: 760px) {
  .r13-card__text { min-width: 0; }
  .r13-statuses { min-width: 0; max-width: 100%; }
  .r13-status { max-width: 100%; box-sizing: border-box; height: auto; min-height: 28px; padding-block: 6px; white-space: normal; line-height: 1.25; }
  .r13-status::before { flex-shrink: 0; }
  .r13-status.r13-phone { display: inline-flex; }
  .r13-sample.r13-phone { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 6px; }
  .r13-sample__btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--green-900); color: #FFFFFF; font: 500 16px/1.2 var(--ui); cursor: pointer; }
  .r13-sample__btn:hover { background: var(--green-800); }
  .r13-sample__btn:focus-visible { outline: 3px solid var(--green-700); outline-offset: 3px; }
}

/* Hero: mint grid panel, text left, the relabelled Venn right. */
.r13-hero { padding-top: 8px; }
.r13-hero__panel { margin: 0 24px; border-radius: 40px; padding: 40px 0 80px; background-color: #F8F5F3; position: relative; overflow: hidden;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 48px 48px; }
.r13-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font: 500 14px/1.3 var(--ui); text-decoration: none; }
.r13-back:hover { text-decoration: underline; }
.r13-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; margin-top: 32px; }
.r13-tag { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--green-900); color: var(--page); font: 500 13px/1.2 var(--ui); }
.r13-main h1 { margin-top: 22px; font-size: clamp(40px, 4.2vw, 60px); line-height: 1.04; color: var(--ink); }
.r13-lead { margin-top: 24px !important; max-width: 46ch; font-size: 18px; line-height: 1.5; color: var(--muted); }
/* Scroll cue (canvas R12b): a mouse with a moving wheel. Decorative motion only. */
.r13-scroll { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 48px !important; font: 400 13px/1.3 var(--ui); color: var(--green-800); }
.r13-scroll rect:first-child { fill: none; stroke: currentColor; stroke-width: 1.5; }
.r13-scroll__wheel { fill: currentColor; animation: r13-wheel 1.6s var(--ease-ui) infinite; }
@keyframes r13-wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(8px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
.r13-venn { display: block; width: 100%; max-width: 560px; height: auto; justify-self: center; }
.r13-venn circle { fill: rgba(81, 176, 76, 0.14); stroke: var(--green-700); stroke-width: 1.5; }
.r13-venn text { font: 400 19px var(--ui); fill: var(--green-900); }

/* The green thread (resource-thread.js). Behind the content: pills and cards are opaque, the dots sit on top. */
.r13-thread-scope { position: relative; }
.r13-thread { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; overflow: visible; }
.r13-thread path { fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.r13-pieces, .r13-fit { position: relative; z-index: 1; }

/* The pieces: pill → two curves → two school words. */
.r13-pieces { padding: 112px 0 200px; }
.r13-pieces h2 { margin-top: 28px !important; max-width: 22ch; }
.r13-pieces__labels, .r13-piece { display: grid; grid-template-columns: 300px 96px minmax(0, 1fr); align-items: center; }
.r13-pieces__labels { margin-top: 40px; font: 500 15px/1.3 var(--ui); color: var(--muted); }
.r13-pieces__labels span:last-child { padding-left: 16px; }
.r13-pieces__list { list-style: none; padding: 0; margin-top: 20px !important; display: grid; gap: 20px; }
.r13-pill { position: relative; display: flex; align-items: center; min-height: 48px; box-sizing: border-box; padding: 10px 20px 10px 48px; border: 1px solid var(--line); border-radius: 24px; background: #FFFFFF; font: 400 17px/1.25 var(--ui); color: var(--ink); }
.r13-pill__dot { position: absolute; left: 21px; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: var(--green); } /* Round 15: a square, centre unchanged at 27 px */
.r13-piece__curves { display: block; width: 96px; height: 80px; }
.r13-piece__curves path { fill: none; stroke: var(--green-700); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.r13-piece__words { list-style: none; padding: 0 0 0 16px; font-size: clamp(22px, 1.9vw, 26px); color: var(--ink); }
.r13-piece__words li { height: 40px; line-height: 40px; white-space: nowrap; }

/* Where it connects: word → thread column (dot + arm) → card. */
.r13-fit { padding: 0 0 40px; }
.r13-fit__labels, .r13-row { display: grid; grid-template-columns: minmax(0, 5fr) 72px minmax(0, 6fr); gap: 24px; }
.r13-fit__labels { margin-top: 28px; font: 500 14px/1.3 var(--ui); color: var(--muted); }
.r13-row { align-items: center; padding: 44px 0; border-bottom: 1px solid var(--line); }
.r13-row__word { font-size: clamp(36px, 3.6vw, 52px); line-height: 1.04; color: var(--ink); }
.r13-row__thread { position: relative; align-self: stretch; }
.r13-row__dot { position: absolute; left: calc(var(--thread-x) - 9px); top: 50%; width: 18px; height: 18px; margin-top: -9px; box-sizing: border-box; border: 2px solid var(--green); background: var(--green); transition: background-color 240ms var(--ease-ui); }
.r13-row__arm { position: absolute; left: var(--thread-x); right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--green); transform-origin: left center; transition: transform 240ms var(--ease-ui); }
html[data-thread="on"] .r13-row:not(.is-reached) .r13-row__dot { background: var(--page); }
html[data-thread="on"] .r13-row:not(.is-reached) .r13-row__arm { transform: scaleX(0); }
.r13-card { display: grid; grid-template-columns: minmax(0, 1fr) 168px; gap: 24px; align-items: center; padding: 28px 30px; border-radius: 24px; border: 1px solid #E8E0D7; background: #FFFFFF; }
.r13-card__text { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.r13-card__text .r13-note { margin-top: 4px !important; }
.r13-card h3 { margin-top: 4px; font: 400 28px/1.15 var(--serif); letter-spacing: -0.01em; color: var(--ink); }
.r13-card__text > p { font-size: 16px; line-height: 1.5; color: var(--muted); }
.r13-thumb { width: 168px; height: 120px; border-radius: 14px; overflow: hidden; background: var(--warm-2); }
.r13-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.r13-thumb--tile { display: flex; align-items: flex-end; padding: 16px; box-sizing: border-box; background: var(--green-900); }
.r13-thumb--tile span { font: 400 20px/1.05 var(--serif); letter-spacing: -0.02em; color: var(--page); }
.r13-thumb--tile em { color: var(--green-tint); }
.r13-fit__foot { margin-top: 28px !important; font-size: 15px; line-height: 1.45; color: var(--muted); }


/* Call to action (round 15): the main page's close card. #C5E5C3, centred, a staircase top right, one plain heading style. */
/* R17: the green card floats on the drifting photo wall, as on the main page's close. */
.r13-cta { position: relative; isolation: isolate; overflow: hidden; margin-top: 24px; padding: clamp(120px, 12vw, 176px) 0; color: var(--ink); text-align: left; }
/* R17: same layout and size as the main page's close (home.css R16-09): a green panel and a white card side by side. */
.r13-cta > .wrap { position: relative; z-index: 1; max-width: 1120px; pointer-events: none; }
.r13-cta__grid { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; }
.r13-cta__panel, .r13-cta__card { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 5vw, 72px); box-shadow: 0 30px 80px -24px rgb(20 40 20 / .45); pointer-events: auto; }
.r13-cta__panel { flex: 1 1 460px; gap: 22px; background: #C5E5C3; border-radius: var(--win-r) 0 0 var(--win-r); }
.r13-cta__card { flex: 1 1 380px; background: #FFFFFF; border-radius: 0 var(--win-r) var(--win-r) 0; }
.r13-cta__panel > :not(.r15-steps), .r13-cta__card > :not(.r15-steps) { position: relative; z-index: 1; }
.r13-cta__label { margin: 0; font: 500 14px/1.3 var(--ui); color: var(--green-800); }
.r13-cta h2 { margin: 0; max-width: 15ch; font-size: clamp(40px, 4.2vw, 60px); line-height: 1.05; color: var(--ink); }
.r13-cta__text { margin: 0 !important; max-width: 44ch; font-size: 18px; line-height: 1.5; color: var(--muted); }
.r13-cta__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
/* When the panel and card stack, the top-right squares move from the card to the panel. */
.r13-cta .r13-cta__steps-stacked { display: none; }
@media (max-width: 860px) { .r13-cta__card .r15-steps--tr { display: none; } .r13-cta .r13-cta__steps-stacked { display: grid; } .r13-cta__panel { border-radius: var(--win-r) var(--win-r) 0 0; } .r13-cta__card { border-radius: 0 0 var(--win-r) var(--win-r); } .r13-cta__actions { align-items: stretch; text-align: center; } .r13-cta__actions .btn { justify-content: center; } .r13-main a.r13-cta__mail { justify-content: center; } }
.r13-main a.r13-cta__mail { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; color: var(--green-800); }
.r13-main a.r13-cta__mail:hover { color: var(--green-900); }
/* The other two pages (Damian 10-29), as on the main page and /inside closes. */
.r13-cta__pages { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.r13-main .r13-cta__pages a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font: 500 17px/1.3 var(--ui); color: var(--green-800); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.r13-main .r13-cta__pages a:hover { color: var(--green-900); }

/* Staircases (round 15): decorative, behind the content. */
.r15-steps { position: absolute; z-index: 0; display: grid; grid-template-columns: repeat(var(--cols), var(--cell, 48px)); grid-auto-rows: var(--cell, 48px); pointer-events: none; }
.r15-steps--tr { top: 0; right: 0; }
.r15-steps--bl { left: 0; bottom: 0; }
.r13-hero__panel > .wrap { position: relative; z-index: 1; }
.r13-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 28px 56px; font-size: 13px; color: var(--muted); }
.r13-footer a { display: inline-flex; align-items: center; min-height: 44px; }

@media (prefers-reduced-motion: reduce) {
  .r13-row__dot, .r13-row__arm { transition: none; }
  .r13-scroll__wheel { animation: none; }
}

/* Tablet */
@media (max-width: 1100px) {
  .r13-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .r13-venn { max-width: 440px; }
  .r13-pieces__labels, .r13-piece { grid-template-columns: 280px 72px minmax(0, 1fr); }
  .r13-card { grid-template-columns: minmax(0, 1fr); }
  .r13-thumb { width: 100%; height: 140px; order: -1; }
}

/* Phone: pieces stack (words indented under their pill), rows keep the thread on the left (plan A12). */
@media (max-width: 760px) {
  .r13-main { --thread-x: 12px; }
  .r13-hero__panel { margin: 0 8px; border-radius: 28px; padding-bottom: 56px; }
  .r13-venn { max-width: 360px; }
  .r13-rule { flex-wrap: wrap; }
  .r13-pieces { padding: 80px 0 72px; }
  .r13-pieces__labels { display: none; }
  .r13-piece { grid-template-columns: minmax(0, 1fr); }
  .r13-pill { justify-self: start; }
  .r13-piece__curves { display: none; }
  .r13-piece__words { padding: 6px 0 0 48px; font-size: 22px; }
  .r13-piece__words li { height: auto; line-height: 1.25; padding: 4px 0; white-space: normal; }
  .r13-fit__labels { display: none; }
  .r13-fit .r13-rule, .r13-fit__foot { padding-left: 36px; }
  .r13-row { position: relative; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 36px 0 36px 36px; }
  .r13-row__thread { position: absolute; left: 0; top: 0; bottom: 0; width: 24px; }
  .r13-row__dot { top: 56px; }
  .r13-row__arm { top: 56px; right: auto; width: 18px; } /* R13-REV-01: a short arm from the dot towards the word */
  .r13-row__word { font-size: 34px; }
  .r13-card { padding: 22px; }
  .r13-cta { margin-top: 16px; padding: 56px 0; }
  .r13-cta .r16-wall__track { grid-auto-columns: 260px; }
  .r15-steps { --cell: 32px; }
  .r15-steps--bl { display: none; }
  .r13-footer { flex-direction: column; }
}

/* ===== Round 15: the zoom from "The pieces" into "Where it connects" (../../../ROUND15-RESOURCES-PLAN.md §4) =====
   Only with html[data-zoom="on"] (set by resource-thread.js: JS, ≥ 1024 × 800, motion allowed). The section is the
   run; its direct child, the stage, pins. resource-thread.js writes one variable per frame, --zp (0…1), and the
   measured --z-ox/--z-oy (zoom origin), --z-dy (lift to centre) and --jl-* (join line). Transform and opacity only.
   Round 15b, the hand-off: the run gains --z-ov px, and "Where it connects" moves up by the same amount, so it rises while
   the stage is still pinned. Over that last stretch (--zh 0…1) piece 1's words glide and shrink onto row 1's first line
   (--h-x/--h-y/--h-s, measured) and lock on as the pin ends. Just after (--zh 1…1.15), while the two move together,
   the words cross-fade into row 1's word. The stage is never empty.
   Round 15c: the run also gains --z-hold px (40% of a window), a pause at p .25 once the line reaches the last piece. */
html[data-zoom="on"] .r13-thread-scope { --hz: min(1, var(--zh, 0)); --he: calc(var(--hz) * var(--hz) * (3 - 2 * var(--hz))); }
html[data-zoom="on"] .r13-pieces { height: calc(100vh + var(--zoom-run, 126vh) + var(--z-hold, 0px) + var(--z-ov, 0px)); margin-bottom: calc(-1 * var(--z-ov, 0px)); padding: 0;
  --zq: clamp(0, (var(--zp, 0) - 0.25) / 0.65, 1); --ze: calc(1 - (1 - var(--zq)) * (1 - var(--zq)) * (1 - var(--zq))); }
html[data-zoom="on"] .r13-pieces__stage { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: clip; }
html[data-zoom="on"] #samples { scroll-margin-top: 0; }
html[data-zoom="on"] .r13-pieces .r13-rule, html[data-zoom="on"] .r13-pieces h2, html[data-zoom="on"] .r13-pieces__labels {
  opacity: calc(1 - clamp(0, (var(--zp, 0) - 0.25) / 0.15, 1)); }
html[data-zoom="on"] .r13-pieces__zoom { transform-origin: var(--z-ox, 0px) var(--z-oy, 0px);
  transform: translate(calc(var(--he) * var(--h-x, 0px)), calc(var(--ze) * var(--z-dy, 0px) + var(--he) * var(--h-y, 0px)))
    scale(calc(1 + 1.6 * var(--ze) + var(--he) * var(--h-s, 0))); will-change: transform; }
html[data-zoom="on"] .r13-piece:not(:first-child) { opacity: calc(1 - clamp(0, (var(--zp, 0) - 0.35) / 0.25, 1)); }
html[data-zoom="on"] .r13-piece:first-child > :not(.r13-piece__words) { opacity: calc(1 - clamp(0, (var(--zp, 0) - 0.75) / 0.15, 1)); }
/* Round 15b: piece 1's words stay, travel onto row 1's word (the second word closes up to row 1's line gap) and fade into it. */
html[data-zoom="on"] .r13-piece:first-child .r13-piece__words { opacity: calc(1 - clamp(0, (var(--zh, 0) - 1) / 0.15, 1)); }
html[data-zoom="on"] .r13-piece:first-child .r13-piece__words li:nth-child(2) { transform: translateY(calc(var(--he) * var(--h-li, 0px))); }
/* The rule, labels and row thread rise unseen behind the moving words, and fade in as the words land. */
html[data-zoom="on"] #fit .r13-rule, html[data-zoom="on"] .r13-fit__labels, html[data-zoom="on"] .r13-thread { opacity: clamp(0, (var(--zh, 1) - 0.8) / 0.2, 1); }
html[data-zoom="on"] .r13-row:first-of-type .r13-row__word { opacity: clamp(0, (var(--zh, 2) - 1) / 0.15, 1); }
/* The pieces join: one green line down through the five square pill dots, behind the pills. */
html[data-zoom="on"] .r13-pieces__list { position: relative; }
html[data-zoom="on"] .r13-pieces__list::before { content: ""; position: absolute; z-index: 0; left: calc(var(--jl-x, 27px) - 1px); top: var(--jl-top, 40px); width: 2px; height: var(--jl-h, 0px);
  background: var(--green); transform-origin: top; transform: scaleY(clamp(0, var(--zp, 0) / 0.25, 1));
  opacity: calc(1 - clamp(0, (var(--zp, 0) - 0.75) / 0.15, 1)); } /* R15-REV-01: leaves with piece 1's pill and curves */
html[data-zoom="on"] .r13-pill { z-index: 1; }

/* The lesson library link in the Mindset row (design-v2/RESOURCE-LIBRARY-B-PLAN.md §3): the phone sample button's look,
   at every width. Non-clickable availability pills on the remaining rows use an inverted slimmer full-ring treatment. */
.r13-library { margin: 14px 0 0; }
.r13-main a.r13-library__btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--green-900); color: #FFFFFF; font: 500 16px/1.2 var(--ui); text-decoration: none; }
.r13-main a.r13-library__btn:hover { background: var(--green-800); color: #FFFFFF; }
.r13-main a.r13-library__btn:focus-visible { outline: 3px solid var(--green-700); outline-offset: 3px; }
.r13-library__pill { display: inline-flex; align-items: center; min-height: 34px; padding: 5px 15px; border-radius: 999px; background: #FFFFFF; color: var(--green-900); border: 1.5px solid var(--green-700); font: 500 13.5px/1.2 var(--ui); letter-spacing: 0.005em; }
