/* chapter-page-specific styles (loaded after app-common.css). Pilot: one dedicated
   chapter page (Kindergarten "Counting & Numbers 1 to 10"). Mirrors the hero/crumb
   patterns in grade.css + topic.css; classes here that also exist in those files are
   deliberately re-declared per-sheet (each app-shell CSS file is self-contained —
   see the NOTE in app-common.css about .ch-row-lessons::before). */

/* Content wrap */
.chapter-wrap{padding:20px 24px;flex:1;opacity:0}

.chapter-wrap.ready{opacity:1}

.crumb{display:flex;align-items:center;gap:8px;font-size:13px;color:rgba(41,40,39,.5);flex-wrap:wrap;position:sticky;top:0;z-index:3;background:#F5F2EF;padding:16px 0;margin:-20px 0 24px}

.crumb-sep{color:rgba(41,40,39,.3)}

/* Hero — same "Today's Workout" card language as the topic page, minus the grade pills.
   Top accent + tinted icon background use the same per-chapter hue (chHash/hueVars) the
   icon SVG's own fill colors already relied on — previously only the SVG used it, so
   every chapter's hero card looked identically neutral regardless of topic. */
.t-hero{margin-bottom:24px}

/* No card chrome — matches the Grade Hub / Test Prep hero (.grade-section-header,
   app-common.css), icon + title sitting directly on the page, not boxed. */
.workout-card{background:none;border-radius:8px;padding:0;display:flex;flex-direction:column;gap:14px;margin-bottom:14px;border:none}

/* .wc-title's shared app-common.css size (24px) was sized for a boxed hero card;
   Test Prep's equivalent title (.grade-section-title, same file) runs smaller at
   20px for this un-boxed treatment — matching that here. */
.chapter-wrap .wc-title{font-size:20px;line-height:28px}

.wc-head{display:flex;align-items:center;gap:16px;min-width:0}

.ch-ic{width:40px;height:40px;border-radius:50%;background:var(--cb,#F5F2EF);display:flex;align-items:center;justify-content:center}

.ch-row-num{font-size:12px;font-weight:500;color:rgba(41,40,39,.5);width:16px;flex-shrink:0;text-align:center}

/* Same colored stroke as the lesson-number circles below (.lr-sno, app-common.css) —
   var(--c), this chapter's own hue — so the hero icon reads as part of the same
   chapter-color family, not a plain tinted circle with no ring. Applies to every
   chapter via the CSS var, not hardcoded per chapter. */
.wc-icon .ch-ic{width:56px;height:56px;border:1.5px solid var(--c)}

.wc-icon .ch-ic svg{width:34px;height:34px}

.wc-headtext{display:flex;flex-direction:column;gap:4px;min-width:0}

.t-pills{display:flex;flex-wrap:wrap;gap:8px}

.t-pill{display:inline-flex;align-items:center;gap:5px;padding:5px 12px;border:1px solid rgba(41,40,39,.12);border-radius:20px;font-size:12px;color:rgba(41,40,39,.7)}

.t-pill strong{color:#1C1917;font-weight:500}

/* "About [Chapter]" card — same AccordionRow + peach-tinted expand-panel pattern as
   the Exam Hub's "About [Exam]" card (see exam.css), one sub-topic ("What your child
   will learn"). FAQs render below it via the shared EnrichmentFaqFold (Tailwind, no CSS
   here). Each sheet CSS file is self-contained (see the note at the top of this file),
   so these are re-declared rather than shared from exam.css. */
.about-section{margin-bottom:24px}

.section-divider{border:none;border-top:1px solid #EDE8E3;margin:0 0 24px}

/* Unpositioned, like the exam sheet's version (no checkerboard gutter — that pattern
   is grade/topic-list-specific, not used on this page). */
.ch-row-lessons{background:var(--cb,#F9F7F5);padding:12px 24px 16px;border-top:1px solid #EDE8E3;margin-top:-1px;overflow:hidden}

.about-topic{border-radius:4px;cursor:pointer}

.about-topic:hover{background:rgba(0,0,0,.04)}

.about-topic-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:8px 10px;font-size:13px;font-weight:600;color:#1C1917;line-height:1.35}

.about-topic-caret{color:#97948E;transition:transform .15s ease;flex-shrink:0;display:flex}

.about-topic-caret svg{width:16px;height:16px;fill:currentColor;display:block}

.about-topic.open .about-topic-caret{transform:rotate(180deg)}

.about-topic-body{display:none;padding:2px 10px 12px}

.about-topic.open .about-topic-body{display:block}

.about-topic-body p{font-size:13px;color:#57534E;line-height:1.6;margin-bottom:10px}

/* Lessons card — reuses the shared .lr-item/.lr-sno/.lr-cta row styling from
   app-common.css; only the card chrome + hue gutter pattern are page-specific.
   Plain neutral border on all sides (same #C7BEB8 as the Grade Hub's
   .ch-row's own hover/open state) — not the colored border-left accent, matching
   the same "not that brown thingy" fix made there. */
.chapter-lessons{background:#fff;border-radius:8px;overflow:hidden;margin-bottom:24px;border:1px solid #C7BEB8}

.chapter-lessons-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 24px 4px}

.chapter-lessons-title{margin:0;font-family:'Athletics';font-size:16px;font-weight:700;color:#1C1917}

.chapter-lessons-meta{font-size:12px;color:rgba(41,40,39,.5);white-space:nowrap}

.chapter-lessons-body{position:relative;padding:8px 24px 4px 20px;overflow:hidden}

.chapter-lessons-body::before{content:'';position:absolute;left:0;top:0;bottom:0;width:40px;background-image:linear-gradient(45deg,var(--c) 25%,transparent 25%,transparent 75%,var(--c) 75%),linear-gradient(45deg,var(--c) 25%,transparent 25%,transparent 75%,var(--c) 75%);background-size:12px 12px;background-position:0 0,6px 6px;opacity:.12;pointer-events:none}

/* Consolidated "browse elsewhere" box — all Kindergarten chapters / all Grades /
   Enrichment, as rows in ONE card instead of separate stacked boxes. */
.rp-links{background:#fff;border:1px solid #EDE8E3;border-radius:8px;margin-bottom:16px;overflow:hidden}

.rp-links-link{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:13px 16px;font-size:13px;font-weight:600;color:#1C1917;text-decoration:none;border-top:1px solid #EDE8E3}

.rp-links-link:first-child{border-top:none}

.rp-links-link .cta-arrow{display:inline-block;color:#97948E;transition:transform .15s ease}

.rp-links-link:hover{background:rgba(28,25,23,.04)}

.rp-links-link:hover .cta-arrow{transform:translateX(3px)}

/* RIGHT RAIL — resources list, same links as the grade page's rail */
.rp-resources{background:#fff;border:1px solid #EDE8E3;border-radius:8px;padding:0 16px}

.rp-res-title{font-size:11px;line-height:16px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:#97948E;padding:16px 0 12px}

.rp-res-item{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid #EDE8E3;text-decoration:none;color:#1C1917;font-size:14px;line-height:20px;font-weight:500}

.rp-res-item:hover .rp-res-name{text-decoration:underline}

.rp-res-icon{width:18px;height:18px;display:flex;align-items:center;justify-content:center;flex-shrink:0}

.rp-res-icon svg{width:18px;height:18px;display:block}

@media(max-width:1024px){
  /* Rail flows below the content, same as grade/topic pages */
  .shell{display:block;overflow-y:auto}
  .main{overflow-y:visible}
  .rightpanel{border-left:none;border-top:1px solid #EDE8E3;background-image:none;overflow-y:visible}
  .rp-resources{grid-column:1 / -1}
}

@media(max-width:767px){
  .chapter-wrap{padding:16px}
  .workout-card{padding:16px}
  .wc-icon .ch-ic{width:44px;height:44px}
  .wc-icon .ch-ic svg{width:28px;height:28px}
  .chapter-lessons-head{padding:16px 16px 4px}
  .chapter-lessons-body{padding:8px 16px 4px 16px}
  .wc-title{font-size:20px;line-height:28px}
}
