.course-wrap,
.topic-page,
.folio-wrap {
  padding-block: clamp(2rem, 6vw, 4rem);
}
.course-section {
  margin-bottom: 3rem;
  scroll-margin-top: 6rem;
}
.course-section h2,
.topic-page h2 {
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  letter-spacing: -0.045em;
  line-height: 1.15;
  margin: 0.4em 0;
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.course-topic {
  padding: 1.2rem;
  border-radius: 1.1rem;
  scroll-margin-top: 6rem;
}
.course-topic:target {
  outline: 2px solid #96d9f5;
}
.course-topic h3 {
  margin: 0.3rem 0;
  font-size: 1.28rem;
}
.course-topic p,
.topic-page p,
.folio-transcript {
  color: #c7dbea;
  line-height: 1.65;
}
.course-topic .cg-button {
  margin-top: 0.5rem;
}
.topic-page,
.folio-wrap {
  max-width: 56rem;
}
.topic-page h1,
.folio-wrap h1 {
  font-size: clamp(2.25rem, 5vw, 4.65rem);
  letter-spacing: -0.055em;
  line-height: 1.04;
  margin: 0.25em 0;
}
.topic-page .cg-crumbs,
.folio-wrap .cg-crumbs {
  margin-bottom: 1.7rem;
}
.topic-page .cg-actions,
.topic-page .book-panel,
.topic-art {
  margin: 1.6rem 0;
}
.topic-art {
  background: #f4f8fc;
  border-radius: 1rem;
  overflow: hidden;
  color: #18344c;
}
.topic-art img,
.folio-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.topic-art figcaption,
.folio-figure figcaption {
  font-size: 0.82rem;
  padding: 0.8rem 1rem;
  line-height: 1.5;
}
.star-comparison {
  background: radial-gradient(ellipse at center, #1e354a 0%, #071a2d 80%);
  border: 1px solid #819db955;
  color: #c7dbea;
}
.star-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18%;
  padding: 2.6rem 0 1rem;
}
.star-pair span {
  width: 12%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #fffbda, #ffd374 65%, #e69347);
  box-shadow: 0 0 18px #ffd56b55;
}
.star-pair span + span {
  width: 24%;
}
.folio-nav {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.folio-figure {
  margin: 1rem 0;
  background: white;
  color: #254159;
  border-radius: 0.6rem;
  overflow: hidden;
}
.folio-transcript {
  border-block: 1px solid #658498;
  padding: 1rem 0;
  margin-bottom: 1rem;
}
.folio-transcript summary {
  cursor: pointer;
  font-weight: 650;
}
.folio-transcript div {
  white-space: pre-line;
  margin-top: 1rem;
}
.topic-page details summary {
  cursor: pointer;
}
.folio-wrap .cg-actions {
  flex-wrap: wrap;
}


.course-topic { display:flex; flex-direction:column; align-items:flex-start; }
.course-topic h3 a { color:var(--cg-ice); text-decoration:none; }
.course-topic h3 a:hover { text-decoration:underline; text-underline-offset:.18em; }
.chapter-sample-link { display:grid; gap:.1rem; width:100%; margin-top:auto; padding:.8rem 0 .15rem; border-top:1px solid var(--cg-line); font-size:.94rem; }
.chapter-sample-link span { color:var(--cg-steel); font-size:.76rem; text-decoration:none; }
.chapter-extract { display:grid; align-items:center; gap:clamp(1rem,4vw,2.5rem); grid-template-columns:minmax(0,1fr) minmax(5rem,8.4rem); padding:clamp(1rem,4vw,2rem); margin:1.8rem 0; border-radius:var(--cg-radius); }
.chapter-extract .cg-actions { margin-bottom:0; }
.chapter-leaf { display:block; align-self:center; }
.chapter-leaf img { display:block; width:100%; height:auto; border-radius:.18rem; box-shadow:0 .45rem 1.4rem #020b16b0; }
.chapter-investigations, .topic-page #study { margin-block:2.5rem; scroll-margin-top:6rem; }
.chapter-footer { display:flex; gap:.9rem 1.6rem; flex-wrap:wrap; border-top:1px solid var(--cg-line); margin-top:2rem; padding-block:1.3rem; }
.folio-credits { padding-left:1.3rem; color:var(--cg-steel); font-size:.86rem; }
.studio-hub, .teachers-hub { padding-block:clamp(2.2rem,5vw,4.8rem); }
.studio-group, .teacher-section, .teacher-paper { margin-bottom:clamp(3rem,6vw,5rem); scroll-margin-top:6rem; }
.studio-group h2, .teachers-hub h2 { margin:.2rem 0 1.1rem; font-size:clamp(1.8rem,3.4vw,2.8rem); letter-spacing:-.045em; line-height:1.12; }
.studio-grid, .teacher-formats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(.8rem,2vw,1.45rem); }
.studio-card { overflow:hidden; border-radius:var(--cg-radius); display:flex; flex-direction:column; }
.studio-thumb { display:block; width:100%; height:auto; aspect-ratio:1.9; object-fit:cover; background:#071322; border-bottom:1px solid var(--cg-line); }
.studio-card-copy { padding:clamp(1.1rem,2.2vw,1.65rem); display:flex; flex-direction:column; flex:1; align-items:flex-start; }
.studio-card h3, .teachers-hub h3 { margin:0 0 .45rem; font-size:clamp(1.25rem,2vw,1.55rem); line-height:1.22; letter-spacing:-.025em; }
.studio-card .cg-kicker { margin:0 0 .75rem; font-size:.71rem; letter-spacing:.05em; }
.studio-card .cg-kicker a { text-decoration:none; }
.studio-card-copy > p:not(.cg-kicker), .teachers-hub p:not(.cg-kicker), .teacher-formats li { color:var(--cg-steel); line-height:1.67; }
.studio-card .cg-actions { margin-top:auto; padding-top:.7rem; }
.teacher-head .book-status { display:inline-flex; }
.teacher-formats { margin-block:1.4rem 2rem; }
.teacher-formats.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.teacher-formats ul { padding-left:1.1rem; }
.teacher-formats li + li { margin-top:.45rem; }
.teacher-chapter-intro { border-left:2px solid var(--cg-cyan); padding-left:clamp(1rem,2vw,1.7rem); }
.teacher-section > p, .teacher-chapter-intro p { max-width:78ch; }
.teacher-outline { border-radius:var(--cg-radius); padding-inline:clamp(.9rem,2vw,1.6rem); }
.teacher-chapter { scroll-margin-top:6rem; }
.teacher-chapter + .teacher-chapter { border-top:1px solid var(--cg-line); }
.teacher-chapter summary { display:grid; grid-template-columns:4.2rem 1fr auto 1.2rem; align-items:center; gap:.7rem; padding:1.1rem .1rem; font-weight:650; cursor:pointer; list-style:none; }
.teacher-chapter summary::-webkit-details-marker { display:none; }
.teacher-chapter summary::after { content:""; height:.51rem; width:.51rem; border:solid var(--cg-light); border-width:0 2px 2px 0; transform:rotate(45deg); justify-self:center; }
.teacher-chapter[open] summary::after { transform:rotate(225deg); }
.teacher-code,.teacher-chapter summary small { color:var(--cg-steel); font-size:.82rem; }
.teacher-code { color:var(--cg-light); letter-spacing:.06em; }
.teacher-detail { padding:0 .4rem 1.5rem clamp(.2rem,6.5vw,4.9rem); max-width:64rem; }
.teacher-detail h3 { font-size:1rem; }
.teacher-detail ol { padding-left:1.5rem; line-height:1.65; columns:2; column-gap:2.5rem; }
.teacher-detail li { break-inside:avoid; padding-bottom:.35rem; }
.teacher-chapter:target summary { color:#a4e3ff; }
@media(max-width:880px){.studio-grid,.teacher-formats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.studio-grid,.teacher-formats,.teacher-formats.two{grid-template-columns:1fr}.teacher-detail ol{columns:1}.teacher-chapter summary {grid-template-columns:3.35rem 1fr 1rem;gap:.4rem}.teacher-chapter summary small{grid-column:2}.teacher-chapter summary::after{grid-column:3;grid-row:1 / span 2}.chapter-extract {grid-template-columns:minmax(0,1fr) 4.9rem;gap:.7rem}.chapter-extract .cg-actions{grid-column:1/-1}.studio-thumb{max-height:15rem}}
@media(max-width:430px){.chapter-extract{display:block}.chapter-leaf{display:none}}

.studio-filter { display:grid; grid-template-columns:minmax(9rem,1.1fr) minmax(8rem,.8fr) minmax(11rem,1.3fr) auto; gap:.75rem 1.2rem; align-items:end; padding:1.15rem 1.35rem; border-radius:var(--cg-radius); margin-bottom:2.25rem; }
.studio-filter[hidden], .studio-card[hidden], .studio-group[hidden] { display:none; }
.studio-control { display:grid; gap:.35rem; }
.studio-filter label { font-size:.85rem; font-weight:650; color:var(--cg-steel); }
.studio-filter input, .studio-filter select { box-sizing:border-box; min-width:0; width:100%; padding:.72rem .75rem; border:1px solid #587389; border-radius:.6rem; background:#091c2d; color:#ecf6ff; font:inherit; }
.studio-filter input::placeholder { color:#b1c7d7; }
.studio-filter p { grid-column:1/-1; margin:0; font-size:.82rem; color:var(--cg-steel); }
.chapter-more summary { color:var(--cg-light); font-weight:650; padding:.6rem 0; }
.chapter-more ul { display:grid; gap:.5rem; padding-left:1.3rem; }
@media(min-width:681px) and (max-width:870px){.studio-filter{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.studio-filter { grid-template-columns:minmax(0,1fr); justify-items:stretch; }.studio-filter button{justify-self:start}}
