/* Skymenu Textbook Chapters - Dedicated Layout */
.book-chapter-page {
  --chapter-blue:#087fbd;
  --chapter-deep:#07385f;
  --chapter-sky:#eaf7ff;
  --chapter-line:#dce8ef;
  --chapter-text:#263746;
  --chapter-muted:#607487;
  background:#f4f8fb;
  color:var(--chapter-text);
}
.book-chapter-page *, .book-chapter-page *::before, .book-chapter-page *::after{box-sizing:border-box}
.book-chapter-page main{width:100%;overflow:hidden}

.book-chapter-page .book-hero{
  width:100%;
  padding:58px 24px 52px;
  background:linear-gradient(135deg,#06385f 0%,#087fbd 62%,#12a0d4 100%);
  color:#fff;
}
.book-chapter-page .book-hero-inner{
  width:min(1180px,100%);
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:42px;
}
.book-chapter-page .book-hero-copy{min-width:0;max-width:850px}
.book-chapter-page .book-chapter-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  width:auto;
  height:auto;
  padding:8px 14px;
  margin:0 0 14px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.32);
  color:#fff;
  font-size:12px;
  font-weight:900;
  letter-spacing:1.5px;
  box-shadow:none;
}
.book-chapter-page .book-hero h1{
  margin:0 0 14px;
  color:#fff;
  font-size:clamp(36px,5vw,58px);
  line-height:1.08;
  letter-spacing:-.6px;
}
.book-chapter-page .book-hero p{
  max-width:790px;
  margin:0;
  color:#edfaff;
  font-size:17px;
  line-height:1.75;
}

.book-chapter-page .book-layout{
  width:min(1180px,100%);
  margin:0 auto;
  padding:38px 24px 72px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 285px;
  gap:30px;
  align-items:start;
}
.book-chapter-page .book-content{min-width:0;width:100%}
.book-chapter-page .book-intro-card,
.book-chapter-page .book-section,
.book-chapter-page .book-end-card,
.book-chapter-page .book-sidebar-card{
  width:100%;
  background:#fff;
  border:1px solid var(--chapter-line);
  border-radius:16px;
  box-shadow:0 8px 24px rgba(16,53,78,.055);
}
.book-chapter-page .book-intro-card{padding:28px 30px;margin:0 0 22px}
.book-chapter-page .book-intro-card h2{
  margin:0 0 10px;
  color:var(--chapter-deep);
  font-size:27px;
  line-height:1.25;
}
.book-chapter-page .book-intro-card p,
.book-chapter-page .book-section p{
  color:var(--chapter-text);
  font-size:15.5px;
  line-height:1.8;
}
.book-chapter-page .book-intro-card p{margin:0;color:var(--chapter-muted)}

.book-chapter-page .book-section{padding:28px 30px;margin:0 0 20px}
.book-chapter-page .book-section-heading{
  display:block;
  margin:0 0 15px;
  color:var(--chapter-deep);
  font-size:23px;
  line-height:1.35;
  letter-spacing:-.1px;
}
.book-chapter-page .book-section-heading h2{margin:0;color:inherit;font-size:inherit;line-height:inherit}
.book-chapter-page .book-section-heading > span{display:inline-flex}
.book-chapter-page .book-section p{margin:0 0 14px}
.book-chapter-page .book-section p:last-child{margin-bottom:0}

.book-chapter-page .book-subsection{padding:20px 0;border-top:1px solid var(--chapter-line)}
.book-chapter-page .book-subsection:first-child{border-top:0;padding-top:0}
.book-chapter-page .book-subsection:last-child{padding-bottom:0}
.book-chapter-page .book-subsection h3{
  margin:0 0 8px;
  color:var(--chapter-blue);
  font-size:18px;
  line-height:1.4;
}

.book-chapter-page .book-example-grid,
.book-chapter-page .block-grid,
.book-chapter-page .word-value-grid,
.book-chapter-page .concept-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:13px;
  margin-top:17px;
}
.book-chapter-page .book-example,
.book-chapter-page .numbered-block,
.book-chapter-page .word-value-grid>div,
.book-chapter-page .concept-grid>div{
  min-width:0;
  padding:16px;
  background:#f9fcfe;
  border:1px solid var(--chapter-line);
  border-radius:12px;
}
.book-chapter-page .book-example strong,
.book-chapter-page .word-value-grid strong,
.book-chapter-page .concept-grid strong{color:var(--chapter-deep)}
.book-chapter-page .book-example p{font-size:14px;margin:5px 0 0;line-height:1.65}
.book-chapter-page .book-example small{display:block;margin-top:7px;color:var(--chapter-muted);line-height:1.55}

.book-chapter-page .numbered-block{display:flex;align-items:center;gap:12px}
.book-chapter-page .numbered-block span{
  flex:0 0 32px;width:32px;height:32px;display:grid;place-items:center;
  border-radius:50%;background:var(--chapter-blue);color:#fff;font-weight:900;font-size:13px;
}
.book-chapter-page .numbered-block strong{font-size:14px;line-height:1.45;color:var(--chapter-deep)}

.book-chapter-page .book-note{
  margin:16px 0 0;
  padding:15px 17px;
  border-left:4px solid var(--chapter-blue);
  border-radius:0 10px 10px 0;
  background:#eef8fd;
  color:var(--chapter-text);
  line-height:1.7;
}
.book-chapter-page .formula-card{
  margin:17px 0 0;
  padding:19px;
  border:1px solid #cfe6f1;
  border-radius:12px;
  background:linear-gradient(135deg,#edf9ff,#f9fcfe);
}
.book-chapter-page .formula-card strong{color:var(--chapter-deep)}

.book-chapter-page .roman-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin:18px 0}
.book-chapter-page .roman-grid div{padding:14px 6px;text-align:center;background:#f8fcfe;border:1px solid var(--chapter-line);border-radius:10px;color:var(--chapter-deep);font-size:22px;font-weight:900}
.book-chapter-page .roman-grid small{display:block;margin-top:4px;color:var(--chapter-muted);font-size:11px}
.book-chapter-page .roman-example{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:17px}
.book-chapter-page .roman-example span{padding:11px 6px;text-align:center;background:#f8fcfe;border:1px solid var(--chapter-line);border-radius:9px;color:var(--chapter-deep);font-size:13px;font-weight:800}
.book-chapter-page .word-value-grid span,.book-chapter-page .concept-grid span{display:block;margin-top:5px;color:var(--chapter-muted);font-size:13px;line-height:1.6}

.book-chapter-page .number-line-demo{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px;margin-top:18px}
.book-chapter-page .number-line-demo span{padding:11px 4px;text-align:center;border-top:3px solid var(--chapter-blue);background:#f8fcfe;color:var(--chapter-deep);font-size:13px;font-weight:800}
.book-chapter-page .book-end-card{padding:23px 25px;margin-top:22px;background:linear-gradient(135deg,#eefaff,#fff)}
.book-chapter-page .book-end-card strong{display:block;color:var(--chapter-deep);font-size:18px;margin-bottom:6px}
.book-chapter-page .book-end-card p{margin:0;color:var(--chapter-muted);line-height:1.7}

.book-chapter-page .book-sidebar{min-width:0;position:relative}
.book-chapter-page .book-sidebar-card{padding:19px;margin:0 0 17px;position:sticky;top:88px}
.book-chapter-page .book-sidebar-card + .book-sidebar-card{top:360px}
.book-chapter-page .book-sidebar-card h3{margin:0 0 11px;color:var(--chapter-deep);font-size:17px;line-height:1.3}
.book-chapter-page .book-sidebar-card a{display:block;padding:9px 0;border-bottom:1px solid var(--chapter-line);color:var(--chapter-text);font-size:13px;line-height:1.45;text-decoration:none}
.book-chapter-page .book-sidebar-card a:last-child{border-bottom:0}
.book-chapter-page .book-sidebar-card a:hover{color:var(--chapter-blue)}

@media(max-width:980px){
  .book-chapter-page .book-layout{grid-template-columns:1fr;max-width:850px}
  .book-chapter-page .book-sidebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
  .book-chapter-page .book-sidebar-card,.book-chapter-page .book-sidebar-card + .book-sidebar-card{position:static;margin:0}
}
@media(max-width:680px){
  .book-chapter-page .book-hero{padding:42px 16px 40px}
  .book-chapter-page .book-hero-inner{grid-template-columns:1fr;gap:20px}
  .book-chapter-page .book-hero h1{font-size:38px}
  .book-chapter-page .book-hero p{font-size:15px}
  .book-chapter-page .book-layout{padding:25px 14px 50px}
  .book-chapter-page .book-intro-card,.book-chapter-page .book-section{padding:21px 19px}
  .book-chapter-page .book-intro-card h2{font-size:24px}
  .book-chapter-page .book-section-heading{font-size:21px}
  .book-chapter-page .book-example-grid,.book-chapter-page .block-grid,.book-chapter-page .word-value-grid,.book-chapter-page .concept-grid,.book-chapter-page .book-sidebar{grid-template-columns:1fr}
  .book-chapter-page .roman-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .book-chapter-page .roman-example{grid-template-columns:repeat(2,minmax(0,1fr))}
  .book-chapter-page .number-line-demo{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:420px){
  .book-chapter-page .roman-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
