/* JP8080.ORG chapter reading design, 2026-10-25.
   Brings the chapter text in line with the homepage: warm paper, serif display
   headings, mint accents, dark reference cards. Loaded after styles.css. */

body .document{padding:56px clamp(12px,7vw,120px) 90px;background:linear-gradient(180deg,#e9e7df 0,var(--paper) 220px)}

/* Reading panel */
body .prose{width:min(100%,820px);padding:clamp(30px,6vw,78px) clamp(24px,6vw,84px);background:#fbfaf6;border:1px solid rgba(17,23,25,.07);border-radius:20px;box-shadow:0 30px 80px rgba(17,25,27,.12)}
body .prose p,body .prose li{color:#2b3535;font-size:17px;line-height:1.8}
body .prose strong{color:var(--ink)}
body .prose a{color:#0f7a63;text-decoration:underline;text-decoration-color:rgba(15,122,99,.35);text-underline-offset:3px}
body .prose a:hover{text-decoration-color:currentColor}

/* "Chapter 7" label becomes a small eyebrow, like the homepage */
body .prose #chapter-text-title{display:inline-block;margin:0 0 22px;padding:7px 12px;border-radius:999px;background:#11191b;color:var(--mint);font:800 10px/1 Arial,Helvetica,sans-serif;letter-spacing:.18em;text-transform:uppercase}

/* Opening line in the homepage's italic serif voice */
body .prose .lead{margin:0 0 30px;color:#16413a;font:italic 400 clamp(22px,2.6vw,28px)/1.42 Georgia,"Times New Roman",serif;letter-spacing:-.01em}

/* Section headings: serif display with a mint rule */
body .prose h2{margin:2.3em 0 .6em;color:var(--ink);font:400 clamp(28px,3.3vw,38px)/1.12 Georgia,"Times New Roman",serif;letter-spacing:-.02em}
body .prose h2:not(#chapter-text-title)::before{content:"";display:block;width:42px;height:3px;margin-bottom:18px;border-radius:3px;background:var(--mint)}
body .prose h3{margin:1.8em 0 .5em;color:#0f7a63;font:800 12px/1.3 Arial,Helvetica,sans-serif;letter-spacing:.14em;text-transform:uppercase}

/* Lists */
body .prose ul,body .prose ol{padding-left:1.3em}
body .prose li{margin:.35em 0}
body .prose li::marker{color:#0f7a63;font-weight:700}

/* Key idea, Pro tip and similar boxes become dark cards */
body .prose .reference{margin:38px 0;padding:26px 30px;border-radius:16px;border-left:4px solid var(--mint);background:linear-gradient(135deg,#101719,#18292b);color:#e3ece8;box-shadow:0 16px 40px rgba(16,23,25,.18)}
body .prose .reference h3{margin:0 0 10px;color:var(--mint)}
body .prose .reference p,body .prose .reference li{color:#d6e1dd}
body .prose .reference strong{color:#fff}
body .prose .reference > :last-child{margin-bottom:0}

/* Tables */
body .prose table{margin:28px 0;border-collapse:separate;border-spacing:0;border:1px solid #e1ded3;border-radius:14px;overflow:hidden;font-size:15px}
body .prose caption{caption-side:top;padding:0 0 10px;color:#6b7472;font:italic 14px Georgia,serif;text-align:left}
body .prose th{padding:14px 16px;border:0;background:#11191b;color:var(--mint);font:800 10px/1.4 Arial,Helvetica,sans-serif;letter-spacing:.12em;text-transform:uppercase}
body .prose td{padding:14px 16px;border:0;border-top:1px solid #ebe8de;color:#2b3535;line-height:1.6}
body .prose tbody tr:nth-child(even) td{background:#f4f2ea}

/* Amazon block spacing inside the chapter */
body .document .amz-pick{margin:0 auto 34px}

/* Previous and next chapter cards */
body .pager{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:0 clamp(12px,7vw,120px) 80px;background:var(--paper)}
body .pager>a,body .pager>span{min-height:0;padding:24px 28px;border-radius:16px;background:linear-gradient(135deg,#101719,#18292b);border:1px solid rgba(114,229,196,.18);transition:border-color .2s,transform .2s}
body .pager>a:hover,body .pager>a:focus-visible{border-color:var(--mint);transform:translateY(-2px)}
body .pager b{font:400 clamp(18px,2vw,23px)/1.3 Georgia,serif}

@media (max-width:760px){
  body .document{padding:34px 10px 60px}
  body .prose{padding:30px 20px;border-radius:16px}
  body .prose p,body .prose li{font-size:16px;line-height:1.75}
  body .prose .reference{padding:22px 20px}
  body .pager{grid-template-columns:1fr;gap:12px;padding:0 10px 56px}
}
