/* Reading-first workbook chapters, shared with the real editor preview. */
[data-reading-mode="layered"] .reading-hero{display:block;max-width:820px;margin-inline:auto}
[data-reading-mode="layered"] .result-portrait,[data-reading-mode="layered"] .reading-tabs,[data-reading-mode="layered"] #traits{display:none}
[data-reading-mode="layered"] .result-description{max-width:70ch}
.layered-chapter-nav{display:flex;flex-wrap:wrap;gap:.5rem;margin:2rem 0}
.layered-chapter-nav a{padding:.55rem .85rem;border:1px solid #cad4ce;border-radius:2rem;text-decoration:none;color:inherit;background:#fffaf3}
.layered-note{font-size:.9rem;line-height:1.7;color:#59695f;max-width:75ch}
.layered-chapter{padding:3rem 0;border-top:1px solid #cad4ce;scroll-margin-top:6rem;max-width:880px;margin-inline:auto}
.layered-chapter>header{display:flex;align-items:baseline;gap:1rem;margin-bottom:1.8rem}.layered-heading-text>span{font-family:monospace;color:#728777;font-size:.85rem}.layered-chapter h2{font-size:clamp(1.65rem,3.5vw,2.4rem);line-height:1.3}.layered-chapter h3{font-size:1.15rem;margin:0 0 .8rem}.layered-chapter h4{font-size:1rem;margin:0 0 .6rem}
.layered-section{margin:0 0 2rem;max-width:75ch}.layered-section p{line-height:1.85;margin:.6rem 0;overflow-wrap:anywhere}.layered-section ul{line-height:1.85;padding-inline-start:1.5rem}.layered-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.layered-cards article{border:1px solid #dce2d8;background:#fffaf3;border-radius:1rem;padding:1.25rem}.layered-cards article p:last-child{margin-bottom:0}
.layered-optional,.layered-stage>details{margin:1rem 0 2rem;padding:1rem 1.3rem;border:1px solid #dce2d8;border-radius:1rem}.layered-optional summary,.layered-stage>details summary,.layered-explore>summary,.layered-legacy>summary{cursor:pointer;font-weight:600;padding:.4rem 0}.layered-optional[open]>.layered-section,.layered-stage>details[open]>.layered-section{margin-top:1rem}.layered-stage{margin-bottom:2.5rem}
.layered-code-list{display:flex;flex-wrap:wrap;gap:.5rem}.layered-code-list span{font-family:monospace;border:1px solid #dce2d8;padding:.15rem .6rem;border-radius:.4rem}.layered-explore{padding:1.4rem;border:1px solid #cad4ce;border-radius:1rem;margin:2rem auto;max-width:980px}.layered-explore[open]>summary{margin-bottom:1.5rem}.layered-legacy{margin-top:2rem}.layered-load-error button{padding:.6rem 1rem;border:1px solid #416652;border-radius:.5rem;background:#244d3b;color:white;font:inherit;cursor:pointer}.layered-section.cms-locked{padding:0;background:transparent;border:0;border-radius:0}
.layered-chapter-nav a:focus-visible,.layered-year-picker :focus-visible,.layered-explore summary:focus-visible,.layered-optional summary:focus-visible{outline:3px solid #8a642f;outline-offset:4px}
@media(max-width:620px){.layered-cards{grid-template-columns:1fr}.layered-chapter{padding:2rem 0}.layered-explore{padding:1rem}.layered-chapter-nav{gap:.4rem}.layered-chapter-nav a{font-size:.85rem;padding:.45rem .7rem}}

[data-reading-mode="layered"] .reading-identity{display:none}.layered-tagline{font-weight:600;color:#345c49}.layered-expanded{border-left:2px solid #cad4ce;padding:.7rem 1rem}.layered-expanded>summary{cursor:pointer}.layered-expanded>summary h3{display:inline;line-height:1.6}.layered-expanded[open]>summary{margin-bottom:1rem}.layered-expanded>summary:focus-visible{outline:3px solid #8a642f;outline-offset:4px}
[data-reading-mode="layered"] .result-reading{min-width:0}[data-reading-mode="layered"] .result-description,.layered-tagline,.layered-cards article{overflow-wrap:anywhere}.layered-cards article{min-width:0}

/* Reuse the original soft preview and green sign-in action for a locked chapter. */
.layered-gate{border:1px solid #cbd7c5;border-radius:12px;background:#fffefa;overflow:hidden}
.layered-gate .gate-message{position:relative;inset:auto;min-height:255px;padding:12px}
.layered-gate .gate-blur{position:absolute;inset:28px}
.layered-gate .gate-message h3{font:600 22px/1.4 "Playfair Display",Georgia,serif;margin:0 0 9px;color:#264f39}
html:lang(zh-Hant) .layered-gate .gate-message h3{font-family:"PingFang TC","Microsoft JhengHei",sans-serif;line-height:1.5}
.layered-lock-row{display:flex;align-items:center;gap:16px;padding:20px;border:1px solid #d3dfcc;border-radius:10px;background:#f3f6ed}
.layered-lock-row .gate-lock{flex:0 0 38px;margin:0}.layered-lock-row p{flex:1;margin:0;color:#4a6452;font-size:13px;line-height:1.75}
.layered-section .access-unlock{background:#285d45;color:#fffef5;border:1px solid #245740;border-radius:6px;flex-shrink:0}.layered-section .access-unlock:hover{background:#19472f}
.layered-gate .access-unlock:focus-visible,.layered-lock-row .access-unlock:focus-visible{outline:3px solid #8a642f;outline-offset:4px}
@media(max-width:620px){.layered-gate{min-height:0;padding:20px}.layered-gate .gate-message{min-height:255px;padding:8px}.layered-lock-row{flex-wrap:wrap;padding:18px;gap:12px}.layered-lock-row p{flex-basis:calc(100% - 50px)}.layered-lock-row .access-unlock{margin-left:50px;max-width:calc(100% - 50px)}}

/* Illustrations belong to their reading chapters, outside the calculation reference. */
.layered-heading-text{display:flex;align-items:baseline;gap:1rem;min-width:0}
.layered-illustrated-passage{display:grid;grid-template-columns:minmax(160px,34%) minmax(0,1fr);align-items:center;gap:clamp(1.5rem,4vw,3rem);margin:0 0 3rem}
.layered-art-frame{margin:0;align-self:center}
.layered-chapter-art{display:block;width:100%;height:auto;object-fit:contain;border-radius:8px}
.layered-passage-copy{min-width:0}.layered-passage-copy>.layered-section{margin:0;max-width:none}.layered-passage-copy .layered-lock-row{flex-wrap:wrap}.layered-passage-copy .layered-lock-row .access-unlock{margin-left:54px}
#chapter-relationships .layered-illustrated-passage{grid-template-columns:minmax(0,1fr) minmax(160px,34%)}
#chapter-relationships .layered-art-frame{grid-column:2;grid-row:1}#chapter-relationships .layered-passage-copy{grid-column:1;grid-row:1}
@media(max-width:620px){.layered-illustrated-passage,#chapter-relationships .layered-illustrated-passage{grid-template-columns:minmax(0,1fr);gap:1.5rem;margin-bottom:2.5rem}.layered-art-frame{width:min(100%,280px);justify-self:center}#chapter-relationships .layered-art-frame,#chapter-relationships .layered-passage-copy{grid-column:auto;grid-row:auto}.layered-passage-copy .layered-lock-row .access-unlock{margin-left:50px}}
/* A quiet year selector replaces the input-and-submit form. */
/* Panoramas retain the former 34%-column image height across the full chapter. */
.layered-illustrated-passage.layered-panorama,#chapter-relationships .layered-illustrated-passage.layered-panorama{grid-template-columns:minmax(0,1fr);gap:1.5rem}
.layered-panorama .layered-art-frame,#chapter-relationships .layered-panorama .layered-art-frame{grid-column:1;grid-row:1;width:100%;aspect-ratio:50/17;align-self:start;overflow:hidden;border-radius:8px}
.layered-panorama .layered-chapter-art{height:100%;object-fit:cover;object-position:center}
.layered-panorama .layered-passage-copy,#chapter-relationships .layered-panorama .layered-passage-copy{grid-column:1;grid-row:2}
@media(max-width:620px){.layered-panorama .layered-art-frame,#chapter-relationships .layered-panorama .layered-art-frame{aspect-ratio:1;max-height:280px}}

.layered-year-picker{display:flex;align-items:center;gap:2rem;padding:1.5rem 1.75rem;margin:0 0 2rem;border:1px solid #d3ddcf;border-radius:16px;background:#eef2e7}
.layered-year-field{flex:0 0 180px;position:relative}.layered-year-field::after{content:"";position:absolute;bottom:23px;right:18px;width:8px;height:8px;border-right:2px solid #325442;border-bottom:2px solid #325442;transform:rotate(45deg);pointer-events:none}.layered-year-field label{display:block;margin-bottom:.65rem;font-size:.8rem;font-weight:600;color:#47644f}
.layered-year-field select{appearance:none;width:100%;min-height:52px;padding:.65rem 2.8rem .65rem 1rem;border:1px solid #9caf9b;border-radius:10px;background:#fffef8;font:600 1.35rem/1.4 "DM Sans",sans-serif;color:#244d3b;cursor:pointer}
.layered-year-field select:hover{border-color:#416652}.layered-year-field select:disabled{opacity:.65;cursor:default}
.layered-year-guidance{min-width:0}.layered-year-guidance>p:first-child{margin:0 0 .4rem;color:#325642;font-size:.95rem;line-height:1.6}.layered-year-guidance .layered-note{margin:0;font-size:.8rem}
.layered-annual-lead{padding:1.5rem 0 .5rem}.layered-annual-lead:empty{display:none}.layered-annual-lead [data-content-section="wb.personal-year.overview"] h3{font-size:1.5rem;line-height:1.4}
.layered-annual-focus{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-bottom:2rem}.layered-annual-focus:empty{display:none}
.layered-annual-focus>.layered-section{max-width:none;margin:0;padding:1.4rem;border:1px solid #dce2d8;border-radius:14px;background:#fffaf3;min-width:0}
.layered-annual-focus>.cms-locked{background:transparent;padding:0;border:0}.layered-annual-focus .layered-lock-row{flex-wrap:wrap}.layered-annual-focus .layered-lock-row .access-unlock{margin-left:54px}
.layered-seasons{margin-top:2rem;padding-top:1.5rem;border-top:1px solid #dce2d8}.layered-seasons>h3{margin-bottom:1.3rem}.layered-seasons>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.2rem}.layered-seasons .layered-section{min-width:0;padding:1rem 0;border-top:2px solid #acbea8}.layered-seasons h3{font-size:1rem}.layered-seasons .layered-lock-row{display:flex;flex-direction:column;align-items:flex-start;padding:14px}.layered-seasons .layered-lock-row .access-unlock{margin:0;max-width:100%}
@media(max-width:620px){.layered-year-picker{align-items:stretch;flex-direction:column;gap:1rem;padding:1.25rem}.layered-year-field{flex-basis:auto}.layered-year-field select{max-width:100%}.layered-annual-focus,.layered-seasons>div{grid-template-columns:1fr}.layered-annual-focus>.layered-section{padding:1.2rem}.layered-annual-focus>.cms-locked{padding:0}.layered-annual-focus .layered-lock-row .access-unlock{margin-left:50px}.layered-seasons .layered-lock-row p{flex-basis:auto}}

.layered-annual-lead>[data-content-section="wb.personal-year.type"]:not(.cms-locked){display:inline-block;padding:.2rem .8rem;margin:0 0 1rem;border-radius:2rem;background:#e9efdf;color:#426246}.layered-annual-lead>[data-content-section="wb.personal-year.type"]:not(.cms-locked) p{font-size:.8rem;margin:0;line-height:1.8}

/* Preserve off-centre subjects and both relationship characters at every width. */
.layered-full-panorama .layered-art-frame,#chapter-relationships .layered-full-panorama .layered-art-frame{aspect-ratio:3/1;max-height:none}
