/* Reading functionality layered onto the approved live reader stylesheet. */
[hidden]{display:none!important}
.chapter-text{white-space:normal;overflow-wrap:break-word}
.chapter-text p{margin:0 0 1.1em}
.chapter{scroll-margin-top:100px;outline:none}
.scene-break{border:0;text-align:center;margin:2em auto}
.scene-break:after{content:'✦';color:var(--red)}
#sample-ending,#sample-preview-end{border-top:1px solid #ecd7ce;padding:32px 0 12px;margin-top:28px}
#sample-ending h2,#sample-preview-end h2{font-size:28px}
#sample-ending .secondary,#sample-preview-end .secondary{display:inline-block;white-space:normal;text-align:center}
.reader-progress-chapter[aria-current="location"]{color:var(--red);font-weight:700}
@media(prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
/* Sample collection proposal — local preview only. */
@font-face{font-family:NIR Editorial;src:url('/media/cormorant-garamond-latin.woff2') format('woff2');font-weight:600;font-display:swap}
@font-face{font-family:NIR Script;src:url('/media/allura-latin.woff2') format('woff2');font-weight:400;font-display:swap}
body{background:#fcf9f5}
.story-header{position:relative;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 100% 0%,#e8ddf2 0,transparent 62%),linear-gradient(145deg,#fffaf3 0%,#f5edf5 100%);border:1px solid #e4d7e9;box-shadow:0 18px 60px #4324520c;border-radius:24px;padding:clamp(28px,3.5vw,52px)}
.story-header:before{content:'';position:absolute;inset:14px;border:1px solid #754b8220;border-radius:15px;z-index:-1;pointer-events:none}
.story-header:after{content:'❦';position:absolute;right:-10px;top:12px;font:240px Georgia,serif;color:#74427a0a;z-index:-1;pointer-events:none}
.story-header .story-brand-wordmark{max-width:220px;margin-bottom:28px}
.story-header .eyebrow{color:#794a73;letter-spacing:.19em;font-size:11px}
.story-header h1{font-family:NIR Editorial,Georgia,serif;font-weight:600;font-size:clamp(46px,5.5vw,82px);letter-spacing:-.035em;line-height:.99;color:#302039;margin:18px 0 24px}
.story-header .story-id{font:16px/1.75 Arial,sans-serif;color:#665767;max-width:620px}
.sample-create{margin:26px 0 18px}
.sample-cta{display:inline-flex;align-items:center;justify-content:center;gap:14px;max-width:100%;padding:17px 24px;background:#f20d1b;border:1px solid #f20d1b;border-radius:999px;color:#fff!important;font:700 15px/1.35 Arial,sans-serif;text-align:center;text-decoration:none!important;box-shadow:0 7px 20px #ce0f2320;transition:background .15s,transform .15s}
.sample-cta:hover{background:#d60014;transform:translateY(-1px)}
.sample-cta:focus-visible{outline:3px solid #7a51a1;outline-offset:5px}
.sample-cta span{font-size:21px;line-height:1;flex-shrink:0}
.story-header .status{font:12px/1.6 Arial,sans-serif;color:#706176}
.story-highlights{background:transparent;border:0;border-top:1px solid #8a668c30;padding:24px 0 0;margin-top:28px}
.story-highlights h2{color:#684971;font:600 26px NIR Editorial,Georgia,serif;text-transform:none;letter-spacing:0;margin:0 0 15px}
.highlight-chip{background:#ffffff80;border-color:#e6d9e7;border-radius:12px}
.highlight-label{font:10px/1.4 Arial,sans-serif;letter-spacing:.13em;color:#78577c}
.highlight-chip strong{font:600 20px/1.15 NIR Editorial,Georgia,serif;color:#34263b}
.story-card-rail-header h2{font:600 27px/1.08 NIR Editorial,Georgia,serif}
.story-card-rail-header h2 em{font-family:NIR Script,Georgia,serif;font-size:1.35em;font-weight:400;font-style:normal;color:#775178}
.sample-art-placeholder{box-sizing:border-box;position:relative;overflow:hidden;min-height:370px;aspect-ratio:2/3;padding:36px 22px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border-radius:12px;background:linear-gradient(145deg,#301536,#593166 60%,#9b719c);color:#fff8e9;box-shadow:0 16px 28px #39253b21;margin-bottom:28px}
.sample-art-placeholder:before{content:'';position:absolute;inset:12px;border:1px solid #ead5b46b;pointer-events:none}
.sample-art-placeholder.dna{background:linear-gradient(145deg,#234746,#527672);color:#fff7e8}
.sample-art-placeholder.chemistry{background:linear-gradient(145deg,#986d5d,#d0a58c);color:#fffaf1}
.edition-label{font:9px/1.6 Arial,sans-serif;letter-spacing:.16em;max-width:150px}
.edition-ornament{font-size:25px;margin:28px 0 16px;color:#e6c8a1}
.sample-art-placeholder h3{font:600 38px/.98 NIR Editorial,Georgia,serif;margin:0 0 18px}
.sample-art-placeholder p{font:italic 16px Georgia,serif;margin:0 0 8px}
.sample-art-placeholder small{font:10px Arial,sans-serif;opacity:.85}
.edition-number{margin-top:22px;font:15px NIR Editorial,Georgia,serif}
.saved-artwork figure{margin:0 0 28px}.saved-artwork img{display:block;width:100%;height:auto;border-radius:12px;box-shadow:0 16px 28px #39253b21}.saved-artwork figcaption{text-align:center;font:13px Arial,sans-serif;padding:12px;color:#67566b}
#sample-ending{position:relative;overflow:hidden;isolation:isolate;text-align:center;border:1px solid #ffffff33;border-radius:26px;margin:60px 0 0;padding:64px 30px;background:radial-gradient(ellipse at 100% 100%,#a173cc 0,transparent 65%),radial-gradient(ellipse at 0 0,#6c377c 0,transparent 65%),linear-gradient(135deg,#2f143f,#6c4394);color:#fff;box-shadow:0 22px 55px #41225224}
#sample-ending:before{content:'';position:absolute;inset:13px;border:1px solid #ffffff24;border-radius:17px;pointer-events:none;z-index:-1}
#sample-ending .ending-ornament{display:block;color:#e3c4a5;font-size:30px;margin-bottom:20px}
#sample-ending .ending-eyebrow{font:10px/1.7 Arial,sans-serif;letter-spacing:.22em;color:#eddbf4;margin:0 0 20px}
#sample-ending h2{font:600 clamp(37px,4vw,58px)/1.05 NIR Editorial,Georgia,serif;letter-spacing:-.025em;color:#fff;margin:0 0 24px}
#sample-ending h2 em{font:400 1.28em/.95 NIR Script,Georgia,serif;color:#edd0e9;letter-spacing:0}
#sample-ending .ending-description{font:16px/1.65 Arial,sans-serif;color:#f1e6f4;margin:0 0 28px}
#sample-ending .ending-note{font:11px/1.6 Arial,sans-serif;color:#eedcf7;margin:18px 0 0}
.reader-progress-chapter:focus-visible{outline:2px solid #a41924;outline-offset:3px}
@media(max-width:600px){.story-header{padding:32px 24px;margin-bottom:24px}.story-header .story-brand-wordmark{max-width:180px}.story-header h1{font-size:49px}.story-header .story-id{font-size:15px;line-height:1.65}.sample-cta{width:100%;padding:15px 16px;font-size:14px;gap:8px}.story-header .status{font-size:11px}.reader-dna-top{margin-bottom:36px}.sample-art-placeholder{min-height:0;height:330px;aspect-ratio:auto}.reader-dna-placement-track .story-card-item{width:220px;min-width:220px}.sample-art-placeholder h3{font-size:34px}#sample-ending{padding:44px 24px;margin-top:36px}#sample-ending h2{font-size:40px}#sample-ending .ending-description{font-size:14px}#sample-ending .ending-note{font-size:10px}.highlight-chip strong{font-size:19px}}
@media(prefers-reduced-motion:reduce){.sample-cta{transition:none}.sample-cta:hover{transform:none}}
.story-card-rail .story-card-item{width:100%;min-width:0;max-width:100%}
.story-card-rail .sample-art-placeholder{width:100%;min-height:340px}
.story-card-rail .sample-art-placeholder h3{font-size:clamp(29px,2.6vw,38px)}
body.footer-in-view .story-card-rail{opacity:0;pointer-events:none}
/* Approved neutral editions: forest and midnight. Brand CTAs stay red. */
body[data-sample-theme="forest"]{--edition-tint:#d4e2d8;--edition-soft:#edf2eb;--edition-border:#c6d5c9;--edition-ink:#1e3930;--edition-accent:#416653;--edition-deep:#102d26;--edition-mid:#245244;--edition-glow:#578675;--edition-pale:#e0ede2}
body[data-sample-theme="midnight"]{--edition-tint:#d5e1ee;--edition-soft:#edf1f5;--edition-border:#c6d2df;--edition-ink:#1c3049;--edition-accent:#466381;--edition-deep:#10243e;--edition-mid:#254968;--edition-glow:#527d9e;--edition-pale:#dce8f2}
body:is([data-sample-theme="forest"],[data-sample-theme="midnight"]) .story-header{background:radial-gradient(ellipse at 100% 0,var(--edition-tint),transparent 65%),linear-gradient(145deg,#fffaf3,var(--edition-soft));border-color:var(--edition-border)}
body:is([data-sample-theme="forest"],[data-sample-theme="midnight"]) .story-header:before{border-color:var(--edition-border)}
body:is([data-sample-theme="forest"],[data-sample-theme="midnight"]) .story-header:after{content:'”';font:360px/.8 Georgia,serif;top:50px;right:12px;color:var(--edition-accent);opacity:.065}
body:is([data-sample-theme="forest"],[data-sample-theme="midnight"]) .story-header h1{color:var(--edition-ink)}
body:is([data-sample-theme="forest"],[data-sample-theme="midnight"]) :is(.story-header .eyebrow,.story-highlights h2,.highlight-label,.story-card-rail-header h2 em){color:var(--edition-accent)}
body:is([data-sample-theme="forest"],[data-sample-theme="midnight"]) :is(.story-header .story-id,.story-header .status){color:#526065}
body:is([data-sample-theme="forest"],[data-sample-theme="midnight"]) :is(.story-highlights,.highlight-chip){border-color:var(--edition-border)}
body:is([data-sample-theme="forest"],[data-sample-theme="midnight"]) .highlight-chip strong{color:var(--edition-ink)}
body:is([data-sample-theme="forest"],[data-sample-theme="midnight"]) .sample-art-placeholder.cover{background:linear-gradient(140deg,var(--edition-deep),var(--edition-mid) 58%,var(--edition-glow))}
body:is([data-sample-theme="forest"],[data-sample-theme="midnight"]) .sample-art-placeholder.chemistry{background:linear-gradient(140deg,#4a514d,#79877b)}
body:is([data-sample-theme="forest"],[data-sample-theme="midnight"]) .sample-art-placeholder.dna{background:linear-gradient(140deg,#43505b,#7c909a)}
body:is([data-sample-theme="forest"],[data-sample-theme="midnight"]) #sample-ending{background:radial-gradient(ellipse at 100% 100%,var(--edition-glow),transparent 68%),radial-gradient(ellipse at 0 0,var(--edition-mid),transparent 65%),var(--edition-deep);box-shadow:0 22px 55px #15283324}
body:is([data-sample-theme="forest"],[data-sample-theme="midnight"]) #sample-ending h2 em{font:italic 600 1.1em/1.12 NIR Editorial,Georgia,serif;color:var(--edition-pale)}
body:is([data-sample-theme="forest"],[data-sample-theme="midnight"]) #sample-ending :is(.ending-description,.ending-note,.ending-eyebrow){color:var(--edition-pale)}
body:is([data-sample-theme="forest"],[data-sample-theme="midnight"]) .story-card-rail-header h2 em{font:italic 600 1.1em/1.2 NIR Editorial,Georgia,serif}
/* Let long book titles fit the temporary artwork cards without clipping. */
.story-card-rail .sample-art-placeholder{aspect-ratio:auto;height:auto;min-height:460px}
.sample-art-placeholder>*{flex-shrink:0}
@media(max-width:600px){.sample-art-placeholder{aspect-ratio:auto;height:auto;min-height:430px}}
.saved-artwork .artwork-view{display:block;border-radius:12px;cursor:zoom-in}.saved-artwork a:focus-visible{outline:3px solid #a41924;outline-offset:4px}.saved-artwork figcaption a{color:inherit;text-underline-offset:3px}
