/* Arachne: site-neutral chapter content styles, final site theme owned by Hephaestus. */
main {min-width:0; max-width: min(100%, 980px); margin-inline:auto;}
body {font-family: system-ui, "Segoe UI", Arial, sans-serif; color:#111111; line-height:1.65;}
main p, main li {overflow-wrap:break-word;}
main p {margin: .95rem 0 1.1rem;}
main h1, main h2, main h3 {line-height:1.28;}
main h2 {margin-top:2.1rem;}main h3 {margin-top:1.65rem;}
figure.book-figure {clear:both; margin:1.8rem auto 2rem; max-width:min(100%, 800px);}
figure.book-figure img {display:block;width:auto;height:auto;max-width:100%;max-height:750px;margin-inline:auto;}
figure.book-figure figcaption {text-align:center; font-size:.91rem;color:#495566;line-height:1.5;margin-top:.65rem;}
.math.display, mjx-container[display="true"] {display:block;max-width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;padding:.4rem 0;}
.book-prev-next {border-top:1px solid #d5dce2;margin-top:2.6rem;padding:1.1rem 0; display:flex; flex-wrap:wrap;justify-content:space-between;gap:.7rem;font-size:.95rem;}
.book-prev-next a {padding:.35rem .5rem; border-radius:4px;}
.book-prev-next a:focus-visible {outline:3px solid #175bb5;outline-offset:3px;}
.footnotes {overflow-wrap:anywhere;}
@media(max-width:640px){body{font-size:16px;line-height:1.65;}figure.book-figure{margin:1.45rem 0;}main h1{font-size:1.65rem;}main h2{font-size:1.4rem;}main h3{font-size:1.16rem;}}

/* A two-panel figure uses original image assets in source order. */
.book-figure-panels img{margin-block:.75rem;}
.book-figure-panel-first{margin:1.8rem auto;max-width:min(100%,800px)}
.book-figure-panel-first img{display:block;width:auto;height:auto;max-width:100%;margin:auto;}

/* HEPHAESTUS CH01 visual QA 2026-10-20: 75% of previous desktop display
   size with 75%-container mobile scaling; scoped by Chapter 1 figure ID.
   Original artwork bytes, captions, alt text and figure identities are intact. */
#fig-ch01-05 img { width: min(67.5%, 513px); max-width: 100%; height: auto; max-height: none; }
#fig-ch01-09 img { width: min(67.5%, 422.10px); max-width: 100%; height: auto; max-height: none; }
#fig-ch01-11 img { width: min(75%, 467px); max-width: 100%; height: auto; max-height: none; }
#fig-ch01-12 img { width: min(75%, 467px); max-width: 100%; height: auto; max-height: none; }
#fig-ch01-14 img { width: min(75%, 408px); max-width: 100%; height: auto; max-height: none; }
#fig-ch01-15 img { width: min(75%, 446px); max-width: 100%; height: auto; max-height: none; }
#fig-ch01-16 img { width: min(75%, 509px); max-width: 100%; height: auto; max-height: none; }
#fig-ch01-17 img { width: min(75%, 600px); max-width: 100%; height: auto; max-height: none; }

/* Hephaestus: Chapter 1 responsive tablet + indentation. */
.ch01-opening-layout{display:grid;grid-template-columns:minmax(0,1.18fr) minmax(0,.82fr);gap:clamp(1rem,3vw,2rem);align-items:start;margin:1.1rem 0 1.4rem}
.ch01-opening-intro,.ch01-opening-tablet{min-width:0}
.ch01-opening-intro p:first-child{margin-top:0}
.ch01-opening-tablet figure.book-figure{clear:none;max-width:100%;margin:0 auto}
.ch01-opening-tablet figure.book-figure img{width:100%;height:auto;max-width:100%;max-height:340px;object-fit:contain}
.ch01-opening-tablet figure.book-figure figcaption{text-align:left}
.ch01-babylonian-equations{margin:.6rem 0 1.3rem clamp(1rem,3vw,2.2rem);border:0;background:transparent;color:inherit}
.ch01-babylonian-equations p{margin:.55rem 0}
#fig-ch01-19 img{width:min(90%,720px);max-width:100%;height:auto;max-height:none}
#fig-ch01-20 img{width:min(90%,712px);max-width:100%;height:auto;max-height:none}
#fig-ch01-21 img{width:min(80%,640px);max-width:100%;height:auto;max-height:none}
@media(max-width:740px){.ch01-opening-layout{grid-template-columns:minmax(0,1fr);gap:.9rem}.ch01-opening-tablet figure.book-figure{max-width:min(100%,380px)}}
