/* Reading pass (2026-10-23, Stan's picks): Atkinson Hyperlegible for reading text, larger and brighter;
   on big screens a wider page where text stays near 74 characters per line and figures, explorers and
   example cards use the width. Loaded after house.css and before mobile.css. */
:root { --h-read: "Atkinson Hyperlegible", Inter, ui-sans-serif, system-ui, sans-serif; --read-col: 57rem; }

/* ---------- reading text: Learn lessons, practice questions, summaries ---------- */
html body section[id$="-learn"] :is(p, li, td, th, caption, summary, figcaption, dd, dt, blockquote, .ced13-lesson-equation),
html body section[id$="-practice"] :is(p, li, td, th, .ced-quiz-choice, .ced-feedback),
html body .student-topic-section :is(p, li) {
  font-family: var(--h-read);
}
html body :is(section[id$="-learn"], section[id$="-practice"], .student-topic-section) p {
  font-size: 1.19rem; line-height: 1.7; color: #E6DECF; max-width: var(--read-col);
}
html body section[id$="-learn"] li { font-size: 1.19rem; line-height: 1.65; color: #E6DECF; }
html body section[id$="-learn"] li + li { margin-top: .35em; }
html body section[id$="-learn"] p + p { margin-top: .9em; }
html body section[id$="-learn"] :is(strong, b) { color: #FFF5E2; font-weight: 700; }
html body section[id$="-learn"] :is(figcaption, caption) { font-size: .98rem; line-height: 1.5; color: #C9BFAE; }
html body section[id$="-learn"] :is(td, th) { font-size: 1.05rem; }
html body section[id$="-learn"] summary { font-size: 1.08rem; }
html body section[id$="-learn"] .ced13-lesson-intro > p:not(.ced13-lesson-eyebrow) { font-size: 1.28rem; line-height: 1.6; color: var(--h-text); }
html body section[id$="-learn"] .ced13-lesson-equation { font-size: 1.15rem; }
html body section[id$="-learn"] > .ced-topic-card h2,
html body section[id$="-learn"] .ced-topic-card > h2 { font: 700 1.6rem/1.25 var(--h-sans) !important; }
html body section[id$="-learn"] .ced-topic-card h3 { font-size: .85rem !important; }
html body .ced-question.h-q p { font-size: 1.22rem; line-height: 1.6; }
html body section[id$="-practice"] .ced-quiz-choice { font-size: 1.1rem; line-height: 1.45; }

/* ---------- wide screens ---------- */
@media (min-width: 2000px) {
  html { font-size: 112.5%; }
}
@media (min-width: 1400px) {
  html body .content-area { width: min(100%, 1900px); max-width: min(1900px, 94vw); }
  html body .h-bar { max-width: 1900px; }
  html body .subtab-panel.ced-topic-page { max-width: 1800px; }
  html body .ced13-lesson { max-width: none; }
  html body section[id$="-learn"] :is(.ced-topic-card, .ced13-lesson-intro) > :is(p, ul, ol, h2, h3, h4, .ced13-lesson-equation, .ced13-lesson-steps, .ced13-lesson-errors, blockquote) {
    max-width: var(--read-col); margin-left: auto; margin-right: auto;
  }
  html body section[id$="-learn"] figure { max-width: min(100%, 1180px); margin-left: auto; margin-right: auto; }
  html body section[id$="-learn"] :is(.ced-topic-card, .ced13-lesson-intro) > :is(details, .mole-check) { max-width: 1180px; margin-left: auto; margin-right: auto; }
  html body section[id$="-practice"] { max-width: 1180px; margin-left: auto; margin-right: auto; }
  html body section[id$="-explore"] { max-width: 1250px; margin-left: auto; margin-right: auto; }
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  html body :is(section[id$="-learn"], section[id$="-practice"], .student-topic-section) p,
  html body section[id$="-learn"] li { font-size: 1.1rem; line-height: 1.65; }
  html body section[id$="-learn"] .ced13-lesson-intro > p:not(.ced13-lesson-eyebrow) { font-size: 1.15rem; }
  html body section[id$="-learn"] > .ced-topic-card h2,
  html body section[id$="-learn"] .ced-topic-card > h2 { font-size: 1.4rem !important; }
}

/* ---------- worked examples, design 2 (Stan, 2026-10-23): the why beside the work, a green answer ----------
   <div class="ced13-lesson-example wx"> <h3>Example 1 · Fully worked: …</h3> <p class="wx-q">problem</p>
   <div class="wx-gf"><div><p class="wx-lab">Given</p><ul>…</ul></div><div><p class="wx-lab">Find</p><ul>…</ul></div></div>
   <ol class="wx-steps"><li><div class="wx-why"><p class="wx-st">step title</p><p>why</p></div><div class="wx-work">math</div></li>…</ol>
   <div class="wx-ans"><span class="wx-lab">Answer</span><span class="wx-val">…</span></div> <p class="wx-mean"><b>What it means:</b> …</p></div>
   Guided and on-your-own examples put the steps, answer and meaning inside <details class="wx-more">. */
html body section[id$="-learn"] .ced13-lesson-example.wx {
  max-width: 1180px; margin: 0 auto 22px; padding: 24px 28px 26px;
  background: var(--h-panel); border: 1px solid var(--h-line-2); border-radius: 18px;
}
html body section[id$="-learn"] .ced13-lesson-example.wx:first-of-type { padding-top: 24px; border-top: 1px solid var(--h-line-2); }
html body section[id$="-learn"] .wx h3 { margin: 0 0 10px !important; max-width: none; }
html body section[id$="-learn"] .wx p { max-width: none; margin-left: 0; margin-right: 0; }
html body section[id$="-learn"] .wx .wx-q { font-size: 1.24rem; line-height: 1.6; color: var(--h-text); margin: 0 0 18px; }
html body .wx-gf { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 20px; }
html body .wx-gf > div { background: var(--h-panel-2); border-radius: 12px; padding: 14px 18px; }
html body section[id$="-learn"] .wx-lab { font: 700 .78rem/1.2 var(--h-sans) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--h-muted) !important; margin: 0 0 8px; }
html body section[id$="-learn"] .wx-gf ul { margin: 0; padding: 0; list-style: none; }
html body section[id$="-learn"] .wx-gf li { margin: 3px 0 0; }
html body .wx-steps { list-style: none; margin: 0; padding: 0; counter-reset: wx; }
html body section[id$="-learn"] .wx-steps > li {
  counter-increment: wx; display: grid; grid-template-columns: 40px minmax(0, 1.1fr) minmax(0, 1fr); gap: 0 22px;
  padding: 16px 0; margin: 0; border-top: 1px dashed var(--h-line-2); align-items: start;
}
html body .wx-steps > li::before {
  content: counter(wx); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font: 700 1rem/1 var(--h-sans); color: var(--h-on-gold); background: var(--h-gold-grad);
}
html body section[id$="-learn"] .wx-st { font-weight: 700; color: var(--h-text); margin: 0 0 4px; }
html body section[id$="-learn"] .wx-why p { margin: 0; }
html body section[id$="-learn"] .wx-why p + p { margin-top: .4em; }
html body .wx-work {
  font: 500 1.05rem/1.55 "JetBrains Mono", var(--h-mono); color: #D6E6FB; white-space: pre-wrap; overflow-wrap: anywhere;
  background: #10161F; border: 1px solid rgba(143,184,232,.25); border-radius: 10px; padding: 10px 14px;
}
html body .wx-ans {
  display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 18px 0 0; padding: 14px 20px;
  border: 1.5px solid var(--h-good); border-radius: 14px; background: linear-gradient(90deg, rgba(126,211,162,.14), rgba(126,211,162,.03));
}
html body section[id$="-learn"] .wx-ans .wx-lab { margin: 0; padding: 7px 12px; border-radius: 999px; background: var(--h-good); color: #0B1A12 !important; }
html body .wx-val { font: 600 1.3rem/1.35 "JetBrains Mono", var(--h-mono); color: var(--h-good); }
html body section[id$="-learn"] .wx .wx-mean {
  margin: 14px 0 0; padding: 12px 16px; border-left: 3px solid var(--h-good); border-radius: 0 12px 12px 0;
  background: rgba(126,211,162,.07); color: #DCEFE3; font-style: italic;
}
html body section[id$="-learn"] .wx-mean b { font-style: normal; color: var(--h-good); }
html body section[id$="-learn"] details.wx-more { margin: 4px 0 0; border: 1px solid var(--h-line-2); border-radius: 12px; }
html body section[id$="-learn"] details.wx-more > summary { color: var(--h-gold-1); }
html body section[id$="-learn"] details.wx-more > :not(summary) { margin-left: 16px; margin-right: 16px; }
html body section[id$="-learn"] details.wx-more[open] { padding-bottom: 16px; }
@media (max-width: 760px) {
  html body section[id$="-learn"] .ced13-lesson-example.wx { padding: 18px 16px 20px; }
  html body .wx-gf { grid-template-columns: 1fr; }
  html body section[id$="-learn"] .wx-steps > li { grid-template-columns: 34px minmax(0, 1fr); gap: 8px 12px; }
  html body .wx-steps > li .wx-work { grid-column: 1 / -1; font-size: .86rem; white-space: pre; overflow-wrap: normal; overflow-x: auto; }
  html body .wx-val { font-size: 1.1rem; }
  html body section[id$="-learn"] details.wx-more > :not(summary) { margin-left: 10px; margin-right: 10px; }
}
