/* A quiet closing scene. Every element is visible before optional motion runs. */
.synthesis-ending-invitation { margin-top: 20px; }
.synthesis-ending-invitation .primary-button { max-width: 100%; white-space: normal; }
.synthesis-workspace[data-view="epilogue"] {
    border-color: #a58b53;
    background: #173e34;
    box-shadow: 0 18px 65px rgba(13, 29, 22, .4), 0 0 0 1px rgba(223, 196, 128, .2);
}
.synthesis-workspace[data-view="epilogue"] .synthesis-header {
    align-items: center;
    padding-block: 19px;
    border-bottom-color: #5b6848;
    background: #ece6d1;
}
.synthesis-workspace[data-view="epilogue"] .synthesis-header h2 { font-size: clamp(25px, 2.5vw, 32px); }
.synthesis-workspace[data-view="epilogue"] .synthesis-paper { padding: 0; background: transparent; }
.epilogue-complete-mark { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 10px; padding: 9px 13px; border: 1px solid #aaba94; border-radius: 99px; color: #3b5b3e; background: #f7faec; font-size: 14px; font-weight: 700; line-height: 1.4; }
.epilogue-complete-mark > span { color: #476c43; font-size: 18px; }
.research-epilogue {
    position: relative;
    isolation: isolate;
    min-width: 0;
    padding: clamp(25px, 3.6vw, 44px);
    color: #fff9e9;
    background: radial-gradient(ellipse at 13% 8%, rgba(219, 184, 103, .15), transparent 45%), linear-gradient(150deg, #234d3f 0%, #153a32 65%, #183d31 100%);
    overflow-wrap: anywhere;
}
.research-epilogue::before {
    position: absolute;
    z-index: -1;
    inset: 12px;
    border: 1px solid rgba(217, 192, 126, .25);
    border-radius: 4px;
    pointer-events: none;
    content: "";
}
.epilogue-hero { display: grid; grid-template-columns: minmax(250px, 340px) minmax(0, 1fr); align-items: center; gap: clamp(24px, 3.5vw, 46px); }
.epilogue-hero-copy { min-width: 0; }
.epilogue-book { position: relative; width: 100%; min-width: 0; max-width: 340px; margin: 0 auto; border-radius: 18px; box-shadow: 0 15px 28px rgba(8, 24, 17, .24); }
.epilogue-book-art { display: block; width: 100%; height: auto; aspect-ratio: 420 / 326; border-radius: inherit; }
.epilogue-book-entry, .epilogue-bookmark { opacity: 1; }
.epilogue-book-light { opacity: 0; }
.epilogue-bookmark { transform-box: fill-box; transform-origin: top center; }
.epilogue-kicker { margin: 0 0 14px; color: #e4ce91; font-size: 12px; font-weight: 700; line-height: 1.5; letter-spacing: .1em; text-transform: uppercase; }
.research-epilogue .epilogue-title { max-width: 740px; margin: 0; color: #fff7e3; font: 400 clamp(30px, 3.8vw, 47px)/1.13 Georgia, "Times New Roman", serif; letter-spacing: -.025em; text-wrap: balance; }
.epilogue-lead { max-width: 700px; margin: 19px 0 0; color: #d5dfc8; font-size: 17px; line-height: 1.65; }
.epilogue-findings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 34px 0 0; padding: 0; list-style: none; }
.epilogue-finding { display: flex; align-items: flex-start; min-width: 0; gap: 10px; padding: 18px 14px; border: 1px solid rgba(210, 195, 146, .35); border-radius: 10px; background: rgba(249, 239, 207, .065); }
.epilogue-finding > div { flex: 1; min-width: 0; }
.epilogue-finding-number { flex: 0 0 auto; padding-top: 1px; color: #c8b782; font: 400 15px/1.4 Georgia, "Times New Roman", serif; }
.epilogue-finding-location { display: block; margin-bottom: 8px; color: #bfcfaf; font-size: 11px; line-height: 1.4; }
.epilogue-finding h4 { margin: 0; color: #fff4d7; font: 700 19px/1.25 Georgia, "Times New Roman", serif; }
.epilogue-finding-check { flex: 0 0 auto; color: #dec68d; font-size: 14px; line-height: 1.5; }
.epilogue-answer { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 30px; }
.epilogue-answer p { max-width: 760px; margin: 0; color: #e1e6d2; font-size: 16px; line-height: 1.65; text-align: center; }
.epilogue-answer-line { flex: 1 1 36px; max-width: 85px; height: 1px; background: #a18d58; }
.epilogue-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 12px; margin-top: 28px; }
.synthesis-stage .epilogue-actions .primary-button { min-height: 52px; padding: 14px 22px; border-color: #ddc58b; color: #253d2d; background: linear-gradient(110deg, #f2dfab, #dcc68a); box-shadow: 0 5px 18px rgba(8, 24, 18, .16); }
.synthesis-stage .epilogue-actions .primary-button:hover:not(:disabled) { border-color: #f7e6b9; color: #1c3425; background: #f7e6b9; }
.synthesis-stage .epilogue-actions .secondary-button { min-height: 52px; padding: 14px 22px; border-color: #7e9471; color: #e6edd8; background: rgba(16, 41, 32, .35); }
.synthesis-stage .epilogue-actions .secondary-button:hover:not(:disabled) { border-color: #b2c29b; color: #fff8e7; background: #315746; }
.epilogue-keepsake { margin: 16px 0 0; color: #b9cab0; font-size: 13px; line-height: 1.5; text-align: center; }
body[data-input-mode="keyboard"] #app .research-epilogue :focus { outline-color: #f4d993; }

@media (max-width: 1000px) {
    .epilogue-findings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .epilogue-hero { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 800px), (max-width: 1100px) and (max-height: 500px) {
    .synthesis-workspace[data-view="epilogue"] .synthesis-header { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 17px 16px; }
    .synthesis-workspace[data-view="epilogue"] .synthesis-header h2 { font-size: 25px; }
    .synthesis-workspace[data-view="epilogue"] .synthesis-header .synthesis-eyebrow { font-size: 12px; }
    .research-epilogue { padding: 25px 18px 26px; }
    .research-epilogue::before { inset: 8px; }
    .epilogue-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; text-align: center; }
    .epilogue-book { max-width: 300px; }
    .epilogue-kicker { margin-bottom: 12px; font-size: 12px; letter-spacing: .055em; }
    .research-epilogue .epilogue-title { font-size: clamp(29px, 6vw, 36px); line-height: 1.16; }
    .epilogue-lead { margin-top: 16px; font-size: 16px; line-height: 1.6; }
    .epilogue-findings { gap: 10px; margin-top: 25px; }
    .epilogue-finding { padding: 16px 12px; }
    .epilogue-finding-location { font-size: 14px; }
    .epilogue-finding h4 { font-size: 21px; }
    .epilogue-answer { margin-top: 24px; }
    .epilogue-answer-line { display: none; }
    .epilogue-answer p { font-size: 16px; line-height: 1.6; }
    .epilogue-actions { flex-direction: column; margin-top: 24px; }
    .epilogue-actions button { width: 100%; max-width: 100%; white-space: normal; }
    .epilogue-keepsake { font-size: 14px; }
}
@media (max-width: 620px) {
    .epilogue-findings { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 650px) and (max-width: 1100px) and (max-height: 500px) {
    .epilogue-hero { grid-template-columns: minmax(200px, 240px) minmax(0, 1fr); text-align: left; }
    .epilogue-findings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .epilogue-actions { flex-direction: row; }
    .epilogue-actions button { flex: 1; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .research-epilogue, .research-epilogue * { animation: none !important; transition: none !important; }
}
