/* ETO single posts, pages, 404 and front page. Loads after list.css (page grid, crumbs, h1, lead, empty state). */
.eto-post { min-width: 0; }
.eto-post--quiz, .eto-post--page, .eto-post--404, .eto-post--front { max-width: 720px; }
.eto-post--front { max-width: 1100px; }
/* Narrow columns start at the same left edge as list and lesson pages (whose box is 1360px), not centred. */
.eto-main > .eto-post, .eto-main > .eto-comments { margin-left: max(0px, (100% - 1360px) / 2); }
.eto-post--page .eto-prose { max-width: 70ch; }
.eto-post__body { min-width: 0; }
/* ETO Quiz reads the theme tokens itself (plugin quiz.css). */
.eto-post--quiz .eto-quiz { margin-inline: 0; }

/* Reading text */
.eto-prose { font-size: 18px; line-height: 1.72; color: var(--text); overflow-wrap: break-word; }
.eto-prose > :first-child { margin-top: 0; }
.eto-prose h2, .eto-prose h3 { scroll-margin-top: calc(var(--tb-stuck) + 16px); }
.eto-prose h2 { margin: 44px 0 12px; font-family: var(--font-serif); font-weight: 500; font-size: 28px; line-height: 1.25; letter-spacing: -.01em; }
.eto-prose h3 { margin: 26px 0 6px; font-family: var(--font-serif); font-weight: 600; font-size: 21px; line-height: 1.3; }
.eto-prose p { margin: 0 0 16px; }
.eto-prose ul, .eto-prose ol { margin: 0 0 16px; padding-left: 24px; }
.eto-prose li { margin: 0 0 8px; }
.eto-prose img { border-radius: 8px; }
.eto-prose pre { max-width: 100%; overflow-x: auto; }
.eto-prose iframe, .eto-prose video { max-width: 100%; }
.eto-prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0 0 20px; font-size: 16px; }
.eto-prose th, .eto-prose td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; }
.eto-prose th { background: var(--surface-2); }
.eto-prose a { color: var(--accent-ink); text-underline-offset: 3px; overflow-wrap: anywhere; }
.eto-prose blockquote { margin: 0 0 16px; padding: 4px 0 4px 16px; border-left: 3px solid var(--line-strong); color: var(--text-2); }
@media (max-width: 620px) { .eto-prose { font-size: 17px; } .eto-prose h2 { font-size: 24px; } }

/* Lesson: ~70ch column, contents list and rail ad in the rail from 1280px (mockup); folded inline list below */
.eto-page--lesson .eto-post--lesson { max-width: 70ch; }
@media (min-width: 1280px) { .eto-page--lesson.eto-page--rail { grid-template-columns: minmax(0, 70ch) 280px; justify-content: start; gap: 48px; } }
.eto-rail--lesson { display: none; }
@media (min-width: 1280px) { .eto-rail--lesson { display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--tb) + 24px); align-self: start; } .eto-rail--lesson .eto-toc { max-height: calc(100vh - var(--tb) - 48px); overflow-y: auto; overscroll-behavior: contain; } }
.eto-toc { padding: 16px 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.eto-toc b { display: block; padding: 0 10px 8px; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.eto-toc ol, .eto-toc-inline ol { margin: 0; padding: 0; list-style: none; }
.eto-toc a { display: flex; align-items: center; min-height: 44px; padding: 4px 10px 4px 12px; border-left: 3px solid transparent; border-radius: 8px; font-size: 14.5px; line-height: 1.35; color: var(--text-2); text-decoration: none; }
.eto-toc a:hover { background: var(--surface-2); color: var(--text); }
.eto-toc a, .eto-toc-inline a { overflow-wrap: anywhere; }
.eto-toc .eto-toc__l3 a { padding-left: 24px; font-size: 14px; }
.eto-toc-inline { margin: 16px 0 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.eto-toc-inline summary { display: flex; align-items: center; min-height: 48px; padding: 0 16px; font-weight: 650; cursor: pointer; }
.eto-toc-inline ol { padding: 0 8px 10px; }
.eto-toc-inline a { display: flex; align-items: center; min-height: 44px; padding: 4px 8px; color: var(--text-2); }
.eto-toc-inline .eto-toc__l3 a { padding-left: 24px; }
@media (min-width: 1280px) { .eto-toc-inline { display: none; } }
.eto-page--lesson .eto-ad { margin: 24px 0; }

/* "Test yourself" box */
/* Share row under a lesson (template-parts/share.php). */
.eto-share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 32px 0 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.eto-share-row__label { flex-basis: 100%; margin: 0 0 4px; font-size: 16px; }
.eto-share-row__label span { color: var(--muted); }
.eto-share-dot { width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px var(--line-strong); flex: none; }
.eto-share-row__btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; }
.eto-share-row__btn:hover { background: var(--surface-2); }
.eto-share-row__btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.eto-share-row__btn[hidden] { display: none; }
.eto-share-row__btn--native { border-color: var(--accent-edge); background: var(--accent); color: var(--on-accent); }
.eto-share-row__btn--native:hover { background: var(--accent-hover); }
.eto-share-row__status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eto-testyou { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin: 40px 0 8px; padding: 22px 24px; border: 1.5px solid var(--accent-edge); border-radius: var(--r); background: var(--accent-soft); }
.eto-testyou h2 { margin: 0 0 6px; font-family: var(--font-serif); font-weight: 500; font-size: 24px; }
.eto-testyou p { margin: 0; color: var(--text-2); }
.eto-testyou__ic { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: var(--accent); color: var(--on-accent); flex: none; }
.eto-testyou__ic .eto-ic { width: 26px; height: 26px; }
.eto-testyou__b { flex: 1 1 200px; min-width: 0; }
.eto-testyou__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px !important; }
.eto-testyou__t { color: var(--text) !important; font-weight: 650; font-size: 17px; line-height: 1.4; }
.eto-testyou__m { margin-top: 4px !important; font-size: 14.5px; }
.eto-btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: var(--r); background: var(--accent); color: var(--on-accent); font-weight: 650; text-decoration: none; box-shadow: 0 2px 0 var(--accent-edge); }
.eto-btn:hover { background: var(--accent-hover); }

.eto-comments { max-width: 720px; margin-top: 40px; }
.eto-page--lesson + .eto-comments { max-width: 70ch; }
.eto-post--front .eto-front > * { max-width: 100%; }

/* 404: popular quizzes under the search */
.eto-404-popular { margin-top: 40px; }
.eto-404-popular h2 { margin: 0 0 14px; font-family: var(--font-serif); font-weight: 500; font-size: 24px; }
.eto-404-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.eto-404-cards > .eto-lc { height: 100%; }
.eto-404-cards .eto-lc-t { font-size: 17px; }

/* Rewritten pages: FAQ (Yoast FAQ block) and the donation addresses */
.eto-prose .schema-faq-section { padding: 18px 0; border-top: 1px solid var(--line); }
.eto-prose .schema-faq-section:last-child { border-bottom: 1px solid var(--line); }
.eto-prose .schema-faq-question { display: block; margin: 0 0 6px; font-family: var(--font-serif); font-weight: 600; font-size: 20px; line-height: 1.35; }
.eto-prose .schema-faq-answer { margin: 0; }
.eto-prose code { padding: 2px 6px; border-radius: 6px; background: var(--surface-2); font-size: .88em; overflow-wrap: anywhere; word-break: break-all; }
.eto-prose .eto-donate-qr img { width: 180px; height: auto; border: 1px solid var(--line); background: #fff; }
.eto-prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.eto-prose .wp-block-button__link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: var(--r); background: var(--accent); color: var(--on-accent); font-weight: 650; text-decoration: none; box-shadow: 0 2px 0 var(--accent-edge); }
.eto-prose .wp-block-button__link:hover { background: var(--accent-hover); }
.eto-testyou .eto-chip { padding: 2px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 12.5px; font-weight: 600; line-height: 1.6; }

/* "♥ Save" at the top of a quiz or lesson: a sign-in link for guests, a button for members (ETO Accounts) */
.eto-lesson-meta { margin: -6px 0 14px; font-size: 15px; color: var(--muted); }
.eto-acc-savelink, .eto-acc-savebtn--top, .eto-quiz .eto-acc-savebtn.eto-acc-savebtn--top { display: inline-flex; align-items: center; gap: 5px; min-height: 0; padding: 10px 0; margin: -10px 0; border: 0; border-radius: 6px; background: none; font: inherit; font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; vertical-align: baseline; }
.eto-quiz .eto-acc-savebtn.eto-acc-savebtn--top:hover { background: none; }
.eto-acc-savelink svg, .eto-acc-savebtn--top .eto-acc-ic { width: 16px; height: 16px; color: var(--reward); flex: none; }
.eto-acc-savebtn--top .eto-acc-ic { display: inline-flex; }
.eto-acc-savebtn--top .eto-acc-ic svg { width: 16px; height: 16px; }
.eto-acc-savebtn--top[aria-pressed="true"] svg path { fill: currentColor; }

/* PDF worksheets page */
.eto-pdfhub__lead { max-width: 70ch; margin: 0 0 22px; font-size: 18px; line-height: 1.6; color: var(--text-2); }
.eto-pdfhub__steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.eto-pdfhub__step { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.eto-pdfhub__step > b { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.eto-pdfhub__step strong { display: block; margin: 3px 0 4px; }
.eto-pdfhub__step p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.eto-pdfhub .eto-home-browse__more { color: var(--muted); font-weight: 600; }
