.curriculum-banner { display:flex; gap:18px; align-items:center; border:1px solid var(--line); border-radius:20px; padding:24px; margin:0 0 28px; background:var(--cream); }
.curriculum-book { display:grid; place-items:center; width:52px; height:52px; flex-shrink:0; background:var(--ink); color:var(--cream); border-radius:15px; }
.curriculum-banner strong { display:block; font-size:18px; line-height:1.4; }
.curriculum-banner p { margin-top:5px; font-size:14px; color:var(--ink-soft); }
.curriculum-banner small { display:block; margin-top:3px; color:var(--muted); }
.topic-card-shell { display:flex; flex-direction:column; min-width:0; border:1px solid var(--line); border-radius:18px; background:var(--white); overflow:hidden; }
.topic-card-shell .topic-card { border:0; border-radius:0; flex:1; }
.topic-card-shell .topic-card:hover { transform:none; background:var(--paper); box-shadow:none; }
.topic-card-links { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 20px; border-top:1px solid var(--line); font-size:12px; }
.topic-card-links a { display:inline-flex; align-items:center; gap:8px; font-weight:650; min-height:28px; }
.topic-card-links a:hover { text-decoration:underline; text-underline-offset:4px; }
.topic-card-links .icon { width:16px; height:16px; }
.topic-card-links > span { color:var(--muted); white-space:nowrap; }
.topic-grid > .topic-card-shell:only-child { grid-column:1 / -1; }
.curriculum-chapter { border:1px solid var(--line); border-radius:20px; background:var(--white); margin-top:12px; overflow:hidden; }
.curriculum-chapter > summary { list-style:none; display:flex; align-items:center; gap:17px; padding:22px; cursor:pointer; }
.curriculum-chapter > summary::-webkit-details-marker { display:none; }
.chapter-number { display:grid; place-items:center; background:var(--cream); width:48px; min-height:48px; border-radius:13px; font-weight:800; flex-shrink:0; }
.chapter-copy { flex:1; min-width:0; }
.chapter-copy strong { display:block; font-size:16px; line-height:1.5; }
.chapter-copy small { display:block; color:var(--muted); margin-top:5px; font-size:12px; }
.curriculum-chapter > summary > .icon { width:19px; height:19px; transition:transform .2s; }
.curriculum-chapter[open] > summary > .icon { transform:rotate(180deg); }
.curriculum-chapter[open] > summary { border-bottom:1px solid var(--line); }
.chapter-lessons { padding:20px; background:var(--paper); }
.chapter-lessons .topic-grid { margin:0; }
.curriculum-chapter summary:focus-visible, .theory-deeper summary:focus-visible, .lesson-source summary:focus-visible, .proof-details summary:focus-visible { outline:2px solid var(--ink); outline-offset:-4px; border-radius:8px; }
.theory-reader { max-width:860px; margin:0 auto; }
.theory-reader .page-heading { margin-top:30px; }
.theory-card.has-diagram { display:block; }
.geometry-diagram { background:var(--cream); color:var(--ink); border:1px solid var(--line); border-radius:20px; margin:20px 0; padding:18px 24px; }
.geometry-diagram svg { width:100%; max-width:430px; margin:0 auto; height:auto; }
.geometry-diagram svg text { stroke:none; fill:currentColor; font:16px var(--font); }
.geometry-diagram .geometry-fill { fill:color-mix(in srgb, var(--ink) 8%, transparent); }
.geometry-diagram figcaption { text-align:center; font-size:13px; line-height:1.7; color:var(--ink-soft); max-width:550px; margin:10px auto 0; }
.geometry-diagram small { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.theory-deeper { margin:22px 0; border:1px solid var(--line); border-radius:16px; overflow:hidden; }
.theory-deeper > summary { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:18px 20px; cursor:pointer; font-weight:700; font-size:14px; background:var(--cream); list-style:none; }
.theory-deeper > summary::-webkit-details-marker { display:none; }
.theory-deeper[open] > summary .icon { transform:rotate(180deg); }
.theory-deeper > .theory-sections { padding:0 22px; }
.theory-sections { margin-top:24px; }
.theory-section { padding:24px 0; border-bottom:1px solid var(--line); }
.theory-section:first-child { padding-top:0; }
.theory-section:last-child { border-bottom:0; }
.theory-section h3 { font-size:18px; letter-spacing:-.3px; line-height:1.5; }
.theory-section p { white-space:pre-line; font-size:15px; line-height:1.9; margin-top:12px; color:var(--ink-soft); overflow-wrap:anywhere; }
.theory-section .formula { white-space:pre-line; overflow-wrap:anywhere; font-size:19px; line-height:1.7; }
.theory-worked-example { padding:15px 18px; border-radius:12px; background:var(--accent-soft); }
.proof-details { border-left:3px solid var(--line-strong); padding:3px 0 3px 16px; margin-top:18px; }
.proof-details summary { cursor:pointer; font-weight:700; font-size:13px; padding:5px 0; }
.proof-details p { margin-top:6px; font-size:14px; }
.theory-mistakes { margin:22px 0; padding:20px 24px; background:var(--paper); border-radius:16px; }
.theory-mistakes h3 { display:flex; align-items:center; gap:10px; font-size:15px; }
.theory-mistakes .icon { width:19px; height:19px; }
.theory-mistakes ul { margin:12px 0 0; padding-left:20px; color:var(--ink-soft); font-size:14px; line-height:1.9; }
.theory-mistakes li + li { margin-top:8px; }
.theory-deeper > .theory-mistakes { margin:0 20px 20px; }
.lesson-source { padding:17px 0; margin-top:24px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; line-height:1.85; }
.lesson-source summary { cursor:pointer; font-weight:650; color:var(--ink-soft); }
.lesson-source p { margin-top:12px; overflow-wrap:anywhere; }
.lesson-source small { display:block; margin-top:10px; }
.question-source { margin-top:8px!important; font-size:11px!important; opacity:.85; }
.theory-reader-actions { display:flex; align-items:center; flex-wrap:wrap; gap:20px; padding:25px 0; margin-top:10px; border-top:1px solid var(--line); }
.inline-theory .theory-deeper { margin-bottom:0; }
.inline-theory .theory-section h3 { font-size:16px; }
@media (max-width:760px) {
  .curriculum-banner { padding:20px; align-items:flex-start; }
  .curriculum-banner strong { font-size:16px; }
  .curriculum-banner p { font-size:13px; }
  .curriculum-chapter > summary { padding:18px 15px; gap:12px; }
  .chapter-number { width:40px; min-height:40px; font-size:13px; }
  .chapter-copy strong { font-size:15px; }
  .chapter-lessons { padding:12px; }
  .theory-reader .page-heading h1 { font-size:30px; }
}
@media (max-width:520px) {
  .curriculum-book { width:40px; height:40px; border-radius:11px; }
  .curriculum-banner { gap:13px; padding:18px; }
  .curriculum-banner small { font-size:10px; }
  .topic-card-links { padding:9px 15px; font-size:11px; }
  .topic-card-links a { min-height:34px; }
  .chapter-lessons .topic-card { padding:18px 13px; gap:10px; }
  .chapter-lessons .topic-illustration { width:48px; }
  .chapter-copy strong { font-size:14px; }
  .chapter-copy small { font-size:11px; }
  .geometry-diagram { padding:14px; }
  .theory-deeper > .theory-sections { padding:0 16px; }
  .theory-section h3 { font-size:17px; }
  .theory-section .formula { font-size:17px; }
  .theory-mistakes { padding:18px; }
  .theory-deeper > .theory-mistakes { margin:0 12px 12px; }
  .theory-reader-actions .button { width:100%; justify-content:center; }
}
@media (prefers-reduced-motion:reduce) {
  .curriculum-chapter > summary > .icon { transition:none; }
}

.topic-eyebrow { flex-wrap:wrap; }
.topic-eyebrow .advanced-label { color:var(--ink); background:var(--cream); border-radius:6px; padding:3px 6px; font-size:10px; letter-spacing:0; }
