/* Shared chapter endings for 이어온: help list, next action, previous action and footer. */
:root{--end-ink:#24483b;--end-action:#35634c;--end-muted:#526354;--end-rule:#cdd5c3;--end-paper:#faf8f2;--end-tint:#e7eedc;--end-white:#fffefa}




body.chapter-pages #content .cp-related{margin-block:20px 0;border:0;border-bottom:1px solid var(--end-rule);padding-inline:0}
body.chapter-pages #content .cp-related+.cp-related,body.chapter-pages #content .cp-context-questions .cp-related{margin-top:0}
body.chapter-pages #content .cp-related>summary{min-height:56px;padding:16px 0;font-size:15px;line-height:1.6}
body.chapter-pages #content .cp-context-questions h3{margin-bottom:8px}
body.chapter-pages #content .cp-context-questions>.je-ref{margin-top:12px;font-size:12px}
body.chapter-pages #content .je-ref a{min-height:32px}
body.chapter-pages #content .end-pager{border:0;background:transparent;margin:0;padding:24px 0 0;scroll-margin-top:90px}
.end-main{display:flex;justify-content:space-between;align-items:center;gap:24px}
.end-eyebrow{display:block;color:var(--end-muted);font-size:12px;margin:0 0 6px}
.end-main p{font-size:15px;line-height:1.8;color:var(--end-ink);margin:0;word-break:keep-all;overflow-wrap:anywhere}
#content .end-main .end-next{display:inline-flex;align-items:center;justify-content:center;flex:none;min-height:48px;padding:12px 24px;background:var(--end-action);color:var(--end-white);border:1px solid var(--end-action);border-radius:999px;text-decoration:none;font-size:15px;font-weight:700;max-width:45%;text-align:center;word-break:keep-all}
#content .end-main .end-next:hover{background:var(--end-ink)}
.end-meta{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:12px;min-height:44px;color:var(--end-muted);font-size:12px}
.end-meta .end-prev{display:inline-flex;align-items:center;min-height:44px;text-underline-offset:4px;font-size:13px;color:var(--end-muted)}
body.chapter-pages #content .end-footer{margin-top:36px;padding:24px 0;display:flex;justify-content:space-between;align-items:center;gap:24px;border-top:1px solid var(--end-rule)}
body.chapter-pages #content .end-footer>div{display:flex;gap:16px;align-items:center}
body.chapter-pages #content .end-footer p{margin:0;font-size:12px;color:var(--end-muted)}
.end-footer nav{display:flex;gap:24px;align-items:center}
.end-footer nav a{display:inline-flex;align-items:center;min-height:44px;color:var(--end-muted);font-size:13px;text-underline-offset:4px}
.end-pager a:focus-visible,.end-footer a:focus-visible{outline:3px solid var(--end-action);outline-offset:4px}
@media(max-width:760px){.end-main{gap:16px;align-items:flex-start;flex-direction:column}#content .end-main .end-next{max-width:100%;align-self:flex-end}.end-meta{margin-top:4px}body.chapter-pages #content .end-footer{align-items:flex-start;gap:12px;flex-wrap:wrap;margin-top:28px}body.chapter-pages #content .end-footer>div{gap:8px;flex-direction:column;align-items:flex-start}.end-footer nav{gap:16px}}

body.chapter-pages #content .cp-context-questions+.cp-related{margin-top:0}
body.chapter-pages #content .end-source{font-size:12px;margin:8px 0 0;color:var(--end-muted)}

/* Revision 2: a clear next action with a prominent title and a restrained tinted surface. */
#content .end-main{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:32px;align-items:center;background:var(--end-tint);padding:24px 28px;border-radius:12px;min-height:136px}
#content .end-main .end-eyebrow{font-size:12px;font-weight:700;color:var(--end-action);margin-bottom:8px}
body.chapter-pages #content .end-main h3{font-size:22px;line-height:1.45;letter-spacing:-.025em;color:var(--end-ink);margin:0 0 8px;word-break:keep-all;text-wrap:balance}
#content .end-main p{font-size:15px;line-height:1.8;color:var(--end-muted);margin:0;max-width:none}
#content .end-main .end-next{min-width:200px;max-width:280px;min-height:52px;padding:14px 24px;font-size:16px;font-weight:700;line-height:1.5}
#content .end-main .end-next:active{transform:translateY(1px)}
#content .end-meta{margin-top:8px}
@media(max-width:760px){#content .end-main{grid-template-columns:minmax(0,1fr);padding:20px;gap:20px;min-height:0}body.chapter-pages #content .end-main h3{font-size:20px}#content .end-main .end-next{width:100%;max-width:none;min-width:0;justify-self:stretch;min-height:52px}#content .end-main p{font-size:14px}}

/* Revision 3: warm gold primary action and an explicit outlined previous action. */
:root{--end-gold:#E8D79D;--end-gold-hover:#DFCA85;--end-gold-edge:#A28E54}
#content .end-main .end-next{background:var(--end-gold);border-color:var(--end-gold-edge);color:var(--end-ink)}
#content .end-main .end-next:hover{background:var(--end-gold-hover);border-color:var(--end-gold-edge);color:var(--end-ink)}
#content .end-meta .end-prev{display:inline-flex;align-items:center;min-height:44px;padding:10px 16px;border:1px solid var(--end-rule);border-radius:8px;background:transparent;color:var(--end-ink);font-size:14px;line-height:1.5;text-decoration:none;word-break:keep-all}
#content .end-meta .end-prev:hover{background:var(--end-tint);border-color:var(--end-action)}
#content .end-meta{gap:16px;margin-top:12px}
