diff --git a/PlotLine.Tests/Browser/manuscript-import-theme.cjs b/PlotLine.Tests/Browser/manuscript-import-theme.cjs
new file mode 100644
index 00000000..de73434a
--- /dev/null
+++ b/PlotLine.Tests/Browser/manuscript-import-theme.cjs
@@ -0,0 +1,84 @@
+// Render real component markup with synthetic model values; never starts an import.
+// node PlotLine.Tests/Browser/manuscript-import-theme.cjs
+// PD_THEME_RAZOR=http://127.0.0.1:5238 uses the compiled Razor fixture host.
+// PD_THEME_BEFORE=/absolute/original-css captures and compares the pre-change styles.
+const {chromium}=require('playwright');
+const fs=require('node:fs'),path=require('node:path'),assert=require('node:assert/strict');
+const root=path.resolve(__dirname,'../../PlotLine');
+const read=p=>fs.readFileSync(path.join(root, /^(css|js|lib)\//.test(p)?'wwwroot':'',p),'utf8');
+const output=process.env.PD_THEME_SCREENSHOTS || '/tmp/pd-manuscript-import-theme';
+fs.mkdirSync(output,{recursive:true});
+const view=read('Views/Onboarding/Index.cshtml');
+const details=view.match(/
[\s\S]*?<\/dl>/)[0]
+ .replace(/@\(Model.CompanionPresence.CompanionVersion[^\n]+/,'Waiting')
+ .replace(/@\(Model.CompanionPresence.CurrentDocumentName[^\n]+/,'No document reported yet');
+const counts=view.match(/[\s\S]*?<\/section>/)[0].replace(/<\/section>$/,'')
+ .replace(/@Model.ScanState.TotalWordCount.ToString\("N0"\)/g,'0').replace(/@Model.ScanState.\w+/g,'0');
+const layout=read('Views/Shared/_Layout.cshtml');
+let banner=layout.slice(layout.indexOf('
'));
+banner=banner.replace(/\s+data-core-import="[^\n]+/,'').replace(/\s+hidden="[^\n]+/,'>')
+ .replace(/@\([^\n]+\)/g,'42').replace(/@storyIntelligenceProgress\.[\w.]+/g,'42')
+ .replace(/@primaryBook\?\.\w+/g,'10').replace(/@progressUpdatedUtc/g,'')
+ .replace(/
[\s\S]*?<\/strong>/,'Theme verification · Scanning manuscript')
+ .replace(/[\s\S]*?<\/a>/,'Reading manuscript paragraphs')
+ .replace(/href="[^"]*"/g,'href="/onboarding"')+'';
+const html=`${banner}
Scan Manuscript
Open your manuscript in Word and start the Companion.
Word Companion
Waiting for Word Companion...
Open your manuscript in Word.
${details}
`;
+const baseStyles=['lib/bootstrap/dist/css/bootstrap.min.css','css/site.css','css/plotline-theme.css'];
+const components=['onboarding.css','story-intelligence-global-progress.css'];
+(async()=>{const browser=await chromium.launch();try{
+ const page=await browser.newPage({viewport:{width:1440,height:1000}});
+ let renderedHtml=html;
+ if(process.env.PD_THEME_RAZOR){
+ const response=await page.goto(process.env.PD_THEME_RAZOR+'/fixture?desktop=ManuscriptImport');
+ assert.equal(response.status(),200);
+ renderedHtml=banner+await page.locator('.onboarding-shell').evaluate(el=>el.outerHTML);
+ }
+ const errors=[];page.on('pageerror',e=>errors.push(e.message));
+ async function render(before,theme){
+ await page.goto('about:blank');await page.setContent(`${before?renderedHtml.replace('btn-outline-primary btn-sm" data-story-intelligence-global-action','btn-outline-secondary btn-sm" data-story-intelligence-global-action'):renderedHtml}`);
+ for(const p of baseStyles)await page.addStyleTag({content:read(p)});
+ for(const p of components)await page.addStyleTag({content:before?fs.readFileSync(path.join(process.env.PD_THEME_BEFORE,p),'utf8'):read('css/'+p)});
+ await page.addStyleTag({content:read('css/application-shell.css')});
+ await page.waitForTimeout(300);
+ }
+ async function capture(name){await page.locator('.story-intelligence-global-strip').screenshot({path:path.join(output,name+'-banner.png')});await page.locator('.onboarding-panel').screenshot({path:path.join(output,name+'-scan.png')});}
+ async function inspect(){return page.evaluate(()=>{
+ const canvas=document.createElement('canvas');canvas.width=canvas.height=1;const ctx=canvas.getContext('2d');
+ function pixel(color){ctx.clearRect(0,0,1,1);ctx.fillStyle=color;ctx.fillRect(0,0,1,1);return [...ctx.getImageData(0,0,1,1).data];}
+ function background(el){if(!el)return [255,255,255];const b=background(el.parentElement),c=pixel(getComputedStyle(el).backgroundColor),a=c[3]/255;return c.slice(0,3).map((v,i)=>v*a+b[i]*(1-a));}
+ function lum(c){return c.map(v=>v/255).map(v=>v<=.04045?v/12.92:((v+.055)/1.055)**2.4).reduce((s,v,i)=>s+v*[.2126,.7152,.0722][i],0);}
+ return [...document.querySelectorAll('.onboarding-companion-details dt,.onboarding-companion-details dd,.onboarding-scan-counts span,.onboarding-scan-counts strong,.story-intelligence-global-strip__copy strong,[data-story-intelligence-global-detail],[data-story-intelligence-global-action]')].map(el=>{const fg=lum(pixel(getComputedStyle(el).color).slice(0,3)),bg=lum(background(el));return {text:el.textContent.trim(),ratio:(Math.max(fg,bg)+.05)/(Math.min(fg,bg)+.05)};});
+ });}
+ let originalMobileWidth,originalGeometry;
+ async function geometry(){return Promise.all(['.story-intelligence-global-strip','.onboarding-panel','.onboarding-companion-details','.onboarding-scan-counts'].map(selector=>page.locator(selector).boundingBox()));}
+ if(process.env.PD_THEME_BEFORE){
+ await render(true,'warm-dark');await capture('before-dark');originalGeometry=await geometry();
+ await page.setViewportSize({width:390,height:1000});originalMobileWidth=await page.evaluate(()=>document.documentElement.scrollWidth);
+ await page.setViewportSize({width:1440,height:1000});
+ }
+ for(const theme of ['plotdirector','warm-light','warm-dark','modern-light','modern-dark','rose-light','blue-light']){
+ await render(false,theme);
+ if(theme==='warm-dark'||theme==='warm-light')await capture('after-'+theme);
+ if(theme==='warm-dark'&&originalGeometry)assert.deepEqual(await geometry(),originalGeometry,'Colour changes preserve original component geometry');
+ await page.evaluate(()=>{window.handlers={};window.signalR={HubConnectionBuilder:class{withUrl(){return this}withAutomaticReconnect(){return this}build(){return{state:'Connected',on(n,f){handlers[n]=f},onreconnected(){},onreconnecting(){},onclose(){},start:async()=>{},invoke:async()=>({status:'NotStarted',isConnected:false})}}}};});
+ await page.addScriptTag({content:read('js/word-companion-presence.js')});
+ await page.waitForFunction(()=>!!handlers.WordCompanionPresenceChanged);
+ for(const state of ['waiting','disconnected','connected','populated','failed']){
+ await page.evaluate(state=>{
+ if(state!=='waiting')handlers.WordCompanionPresenceChanged({isConnected:state==='connected'||state==='populated',documentOpen:true,companionVersion:'1.0.0.18',currentDocumentName:'Theme verification.docx'});
+ if(state==='populated'||state==='failed')handlers.OnboardingScanStateChanged({status:state==='failed'?'Failed':'Complete',chapterCount:12,sceneCount:48,characterCandidateCount:17,totalWordCount:82500,percentComplete:100});
+ },state);
+ for(const c of await inspect())assert(c.ratio>=4.5,`${theme}/${state}: ${c.text} contrast ${c.ratio.toFixed(2)}`);
+ if(state==='populated'&&(theme==='warm-dark'||theme==='warm-light'))await capture('populated-'+theme);
+ }
+ const dimensions=await page.locator('.onboarding-scan-counts').boundingBox();
+ await page.evaluate(()=>{const h=document.documentElement;h.dataset.appTheme='warm-dark';h.dataset.theme=h.dataset.bsTheme='dark';});
+ await page.waitForTimeout(300);
+ for(const c of await inspect())assert(c.ratio>=4.5,`switched theme: ${c.text} ${c.ratio}`);
+ assert.deepEqual(await page.locator('.onboarding-scan-counts').boundingBox(),dimensions,'Theme switch preserves metric geometry');
+ await page.setViewportSize({width:390,height:1000});
+ if(originalMobileWidth)assert.equal(await page.evaluate(()=>document.documentElement.scrollWidth),originalMobileWidth,'Preserve original mobile geometry');
+ await page.setViewportSize({width:1440,height:1000});
+ }
+ assert.deepEqual(errors,[]);console.log('PASS import components: seven themes, waiting/disconnected/connected/populated/failed states, real presence updates, contrast >=4.5, live theme switching, unchanged desktop/mobile geometry. Screenshots: '+output);
+}finally{await browser.close();}})().catch(e=>{console.error(e);process.exitCode=1;});
diff --git a/PlotLine/Views/Shared/_Layout.cshtml b/PlotLine/Views/Shared/_Layout.cshtml
index fce28734..d174a8db 100644
--- a/PlotLine/Views/Shared/_Layout.cshtml
+++ b/PlotLine/Views/Shared/_Layout.cshtml
@@ -237,7 +237,7 @@
-
Book
+
Book
@foreach (var book in storyIntelligenceProgress.Books)
diff --git a/PlotLine/wwwroot/css/onboarding.css b/PlotLine/wwwroot/css/onboarding.css
index 4579d0d3..fcc35b2a 100644
--- a/PlotLine/wwwroot/css/onboarding.css
+++ b/PlotLine/wwwroot/css/onboarding.css
@@ -8,7 +8,7 @@
.onboarding-panel {
width: min(920px, 100%);
background: var(--bs-body-bg);
- border: 1px solid rgba(31, 42, 68, .12);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
box-shadow: 0 18px 50px rgba(31, 42, 68, .08);
padding: clamp(1.25rem, 3vw, 2.5rem);
@@ -26,7 +26,7 @@
height: .55rem;
overflow: hidden;
border-radius: 999px;
- background: rgba(31, 42, 68, .12);
+ background: var(--plotline-line);
}
.onboarding-progress-track span {
@@ -60,7 +60,7 @@
left: calc(-50% + .7rem);
width: calc(100% - .45rem);
height: 2px;
- background: rgba(31, 42, 68, .14);
+ background: var(--plotline-line);
}
.onboarding-stepper li:first-child::before {
@@ -74,7 +74,7 @@
place-items: center;
width: 1.45rem;
aspect-ratio: 1;
- border: 1px solid rgba(31, 42, 68, .18);
+ border: 1px solid var(--plotline-line);
border-radius: 50%;
background: var(--bs-body-bg);
color: var(--bs-secondary-color);
@@ -95,13 +95,13 @@
.onboarding-stepper .is-complete::before,
.onboarding-stepper .is-current::before {
- background: rgba(47, 111, 99, .38);
+ background: color-mix(in srgb, var(--plotline-secondary) 38%, var(--plotline-panel));
}
.onboarding-stepper .is-complete span {
- border-color: #2f6f63;
- background: #2f6f63;
- color: #fff;
+ border-color: var(--plotline-accent-dark);
+ background: var(--plotline-accent-dark);
+ color: var(--pd-on-accent, var(--plotline-bg));
}
.onboarding-stepper .is-complete span::before {
@@ -118,14 +118,14 @@
}
.onboarding-stepper .is-current span {
- border-color: #b68a46;
+ border-color: var(--plotline-warning);
box-shadow: 0 0 0 .22rem rgba(182, 138, 70, .18);
- color: #755624;
+ color: var(--plotline-accent-dark);
}
.onboarding-stepper--complete .is-complete:last-child span {
- border-color: #b68a46;
- background: #b68a46;
+ border-color: var(--plotline-warning);
+ background: var(--plotline-warning);
}
.onboarding-copy {
@@ -175,9 +175,9 @@
gap: .35rem;
min-height: 100%;
padding: 1rem 1.1rem;
- border: 1px solid rgba(31, 42, 68, .16);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
- background: rgba(255, 255, 255, .72);
+ background: var(--plotline-surface-elevated);
transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
@@ -197,8 +197,8 @@
.onboarding-option-card em {
flex: 0 0 auto;
border-radius: 999px;
- background: rgba(47, 111, 99, .12);
- color: #2f6f63;
+ background: color-mix(in srgb, var(--plotline-secondary) 12%, var(--plotline-panel));
+ color: var(--plotline-accent-dark);
font-size: .72rem;
font-style: normal;
padding: .2rem .55rem;
@@ -236,13 +236,13 @@
gap: .75rem;
margin-top: 1rem;
padding: 1rem;
- border: 1px solid rgba(31, 42, 68, .12);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
- background: rgba(255, 255, 255, .45);
+ background: var(--plotline-surface-elevated);
}
.onboarding-form-section--quiet {
- background: rgba(255, 255, 255, .58);
+ background: var(--plotline-surface-elevated);
}
.onboarding-form-section h2 {
@@ -263,9 +263,9 @@
align-items: center;
margin: 1rem 0 1.25rem;
padding: 1.1rem;
- border: 1px solid rgba(31, 42, 68, .12);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
- background: linear-gradient(135deg, rgba(47, 111, 99, .1), rgba(182, 138, 70, .12));
+ background: linear-gradient(135deg, color-mix(in srgb, var(--plotline-secondary) 10%, var(--plotline-panel)), color-mix(in srgb, var(--plotline-warning) 12%, var(--plotline-panel)));
}
.onboarding-companion-card--compact {
@@ -278,7 +278,7 @@
width: 4.25rem;
aspect-ratio: 1;
border-radius: 50%;
- background: rgba(47, 111, 99, .12);
+ background: color-mix(in srgb, var(--plotline-secondary) 12%, var(--plotline-panel));
display: grid;
place-items: center;
}
@@ -288,7 +288,7 @@
content: "";
position: absolute;
inset: .55rem;
- border: 2px solid rgba(47, 111, 99, .28);
+ border: 2px solid color-mix(in srgb, var(--plotline-secondary) 28%, var(--plotline-panel));
border-radius: 50%;
animation: onboardingPulse 1.8s ease-out infinite;
}
@@ -301,19 +301,19 @@
width: 1.25rem;
aspect-ratio: 1;
border-radius: 50%;
- background: #b68a46;
+ background: var(--plotline-warning);
box-shadow: 0 0 0 .45rem rgba(182, 138, 70, .18);
}
.onboarding-companion-card.is-connected .onboarding-companion-mark span,
.word-companion-presence-pill.is-connected .word-companion-presence-dot {
- background: #2f6f63;
+ background: var(--plotline-accent-dark);
}
.onboarding-companion-card.is-connected .onboarding-companion-mark::before,
.onboarding-companion-card.is-connected .onboarding-companion-mark::after {
animation-play-state: paused;
- border-color: rgba(47, 111, 99, .18);
+ border-color: color-mix(in srgb, var(--plotline-secondary) 18%, var(--plotline-panel));
}
.onboarding-companion-body h2 {
@@ -334,11 +334,12 @@
}
.onboarding-companion-details div {
+ color: var(--plotline-text);
min-width: 0;
- border: 1px solid rgba(31, 42, 68, .1);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
padding: .75rem;
- background: rgba(255, 255, 255, .56);
+ background: var(--plotline-surface-elevated);
}
.onboarding-companion-details dt {
@@ -357,7 +358,7 @@
display: grid;
gap: .85rem;
margin-top: 1rem;
- border-top: 1px solid rgba(31, 42, 68, .1);
+ border-top: 1px solid var(--plotline-line);
padding-top: 1rem;
}
@@ -373,7 +374,7 @@
height: .5rem;
overflow: hidden;
border-radius: 999px;
- background: rgba(31, 42, 68, .12);
+ background: var(--plotline-line);
}
.onboarding-scan-progress span {
@@ -381,7 +382,7 @@
width: 0;
height: 100%;
border-radius: inherit;
- background: #2f6f63;
+ background: var(--plotline-accent-dark);
transition: width .18s ease;
}
@@ -392,11 +393,12 @@
}
.onboarding-scan-counts div {
+ color: var(--plotline-text);
min-width: 0;
- border: 1px solid rgba(31, 42, 68, .1);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
padding: .75rem;
- background: rgba(255, 255, 255, .62);
+ background: var(--plotline-surface-elevated);
}
.onboarding-scan-counts span {
@@ -446,9 +448,9 @@
gap: .55rem .85rem;
align-items: center;
padding: .85rem;
- border: 1px solid rgba(47, 111, 99, .18);
+ border: 1px solid color-mix(in srgb, var(--plotline-secondary) 18%, var(--plotline-panel));
border-radius: 8px;
- background: rgba(47, 111, 99, .07);
+ background: color-mix(in srgb, var(--plotline-secondary) 7%, var(--plotline-panel));
}
.onboarding-build-panel .onboarding-scan-progress {
@@ -461,17 +463,17 @@
}
.onboarding-build-panel > strong {
- color: #2f6f63;
+ color: var(--plotline-accent-dark);
font-size: 1.1rem;
}
.onboarding-build-panel.is-running {
- border-color: rgba(47, 111, 99, .34);
+ border-color: color-mix(in srgb, var(--plotline-secondary) 34%, var(--plotline-panel));
}
.onboarding-build-panel.is-manual-save {
- border-color: rgba(182, 138, 70, .5);
- background: rgba(182, 138, 70, .12);
+ border-color: color-mix(in srgb, var(--plotline-warning) 50%, var(--plotline-panel));
+ background: color-mix(in srgb, var(--plotline-warning) 12%, var(--plotline-panel));
}
.onboarding-marker-resync-panel {
@@ -509,9 +511,9 @@
gap: .7rem;
margin: 0 0 1rem;
padding: .8rem .9rem;
- border: 1px solid rgba(31, 42, 68, .12);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
- background: rgba(255, 255, 255, .58);
+ background: var(--plotline-surface-elevated);
}
.onboarding-inline-choice input {
@@ -557,10 +559,10 @@
display: grid;
align-content: start;
gap: .8rem;
- border: 1px solid rgba(31, 42, 68, .1);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
padding: 1rem;
- background: rgba(255, 255, 255, .42);
+ background: var(--plotline-surface-elevated);
}
.onboarding-review-section h2 {
@@ -583,10 +585,10 @@
.onboarding-subprogress {
display: grid;
gap: .55rem;
- border: 1px solid rgba(47, 111, 99, .16);
+ border: 1px solid color-mix(in srgb, var(--plotline-secondary) 16%, var(--plotline-panel));
border-radius: 8px;
padding: .8rem;
- background: rgba(47, 111, 99, .06);
+ background: color-mix(in srgb, var(--plotline-secondary) 6%, var(--plotline-panel));
}
.onboarding-subprogress div:first-child {
@@ -614,16 +616,16 @@
.onboarding-empty-state {
margin: 0;
padding: .8rem;
- border: 1px dashed rgba(31, 42, 68, .2);
+ border: 1px dashed var(--plotline-line);
border-radius: 8px;
color: var(--bs-secondary-color);
- background: rgba(255, 255, 255, .55);
+ background: var(--plotline-surface-elevated);
}
.onboarding-empty-state--error {
- border-color: rgba(176, 54, 54, .38);
- color: #8f2f2f;
- background: rgba(176, 54, 54, .08);
+ border-color: color-mix(in srgb, var(--plotline-danger) 38%, var(--plotline-panel));
+ color: var(--plotline-danger);
+ background: color-mix(in srgb, var(--plotline-danger) 8%, var(--plotline-panel));
}
.onboarding-review-chapters {
@@ -638,21 +640,21 @@
gap: .65rem;
min-height: 2.55rem;
margin: 0;
- border: 1px solid rgba(31, 42, 68, .1);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
padding: .45rem .65rem;
- background: rgba(255, 255, 255, .58);
+ background: var(--plotline-surface-elevated);
cursor: pointer;
}
.onboarding-review-chapter-row:hover {
- border-color: rgba(47, 111, 99, .28);
- background: rgba(47, 111, 99, .055);
+ border-color: color-mix(in srgb, var(--plotline-secondary) 28%, var(--plotline-panel));
+ background: color-mix(in srgb, var(--plotline-secondary) 5.5%, var(--plotline-panel));
}
.onboarding-review-chapter-row:has(input[type="checkbox"]:checked) {
- border-color: rgba(47, 111, 99, .34);
- background: rgba(47, 111, 99, .08);
+ border-color: color-mix(in srgb, var(--plotline-secondary) 34%, var(--plotline-panel));
+ background: color-mix(in srgb, var(--plotline-secondary) 8%, var(--plotline-panel));
}
.onboarding-review-chapter-row input[type="checkbox"] {
@@ -693,10 +695,10 @@
}
.onboarding-review-chapter {
- border: 1px solid rgba(31, 42, 68, .12);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
padding: 1rem;
- background: rgba(255, 255, 255, .58);
+ background: var(--plotline-surface-elevated);
}
.onboarding-review-chapter summary {
@@ -725,16 +727,16 @@
.onboarding-review-chapter li,
.onboarding-character-candidates li {
- border: 1px solid rgba(31, 42, 68, .1);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
padding: .75rem;
- background: rgba(255, 255, 255, .64);
+ background: var(--plotline-surface-elevated);
}
.onboarding-character-candidates li.is-invalid {
- border-color: rgba(176, 54, 54, .48);
+ border-color: color-mix(in srgb, var(--plotline-danger) 48%, var(--plotline-panel));
box-shadow: inset 0 0 0 1px rgba(176, 54, 54, .16);
- background: rgba(176, 54, 54, .06);
+ background: color-mix(in srgb, var(--plotline-danger) 6%, var(--plotline-panel));
}
.onboarding-review-chapter li {
@@ -762,9 +764,9 @@
display: grid;
gap: .15rem;
padding: .85rem 1rem;
- border: 1px solid rgba(31, 42, 68, .1);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
- background: rgba(255, 255, 255, .58);
+ background: var(--plotline-surface-elevated);
}
.onboarding-location-review-panel .metric-label {
@@ -789,10 +791,10 @@
grid-template-columns: minmax(18rem, .95fr) minmax(28rem, 1.35fr);
gap: 1rem;
align-items: start;
- border: 1px solid rgba(31, 42, 68, .12);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
padding: 1rem;
- background: rgba(255, 255, 255, .62);
+ background: var(--plotline-surface-elevated);
}
.location-review-title-row {
@@ -831,10 +833,10 @@
display: grid;
gap: .25rem;
margin: 0;
- border-left: 3px solid rgba(47, 111, 99, .34);
+ border-left: 3px solid color-mix(in srgb, var(--plotline-secondary) 34%, var(--plotline-panel));
border-radius: 6px;
padding: .55rem .65rem;
- background: rgba(47, 111, 99, .06);
+ background: color-mix(in srgb, var(--plotline-secondary) 6%, var(--plotline-panel));
}
.location-evidence strong {
@@ -867,7 +869,7 @@
.location-review-controls select {
width: 100%;
min-height: 2.35rem;
- border: 1px solid rgba(31, 42, 68, .18);
+ border: 1px solid var(--plotline-line);
border-radius: 6px;
padding: .45rem .6rem;
background-color: var(--bs-body-bg);
@@ -888,9 +890,9 @@
bottom: 0;
z-index: 2;
margin: 1rem calc(clamp(1.25rem, 3vw, 2.5rem) * -1) calc(clamp(1.25rem, 3vw, 2.5rem) * -1);
- border-top: 1px solid rgba(31, 42, 68, .1);
+ border-top: 1px solid var(--plotline-line);
padding: 1rem clamp(1.25rem, 3vw, 2.5rem);
- background: rgba(255, 255, 255, .92);
+ background: var(--plotline-surface-elevated);
backdrop-filter: blur(10px);
}
@@ -939,10 +941,10 @@
[data-story-latest-summary] {
margin: 0;
padding: 1rem;
- border-left: 4px solid #2f6f63;
+ border-left: 4px solid var(--plotline-accent);
border-radius: 8px;
- background: rgba(47, 111, 99, .08);
- color: #1f2a44;
+ background: color-mix(in srgb, var(--plotline-secondary) 8%, var(--plotline-panel));
+ color: var(--plotline-text);
}
.story-live-progress {
@@ -984,9 +986,9 @@
.story-live-feed-grid,
.story-review-summary,
.story-review-chapter-card {
- border: 1px solid rgba(31, 42, 68, .12);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
- background: rgba(255, 255, 255, .62);
+ background: var(--plotline-surface-elevated);
}
.story-live-progress-card {
@@ -1025,8 +1027,8 @@ summary.story-review-chapter-heading {
min-height: 2rem;
border-radius: 999px;
padding: .25rem .7rem;
- background: rgba(47, 111, 99, .12);
- color: #2f6f63;
+ background: color-mix(in srgb, var(--plotline-secondary) 12%, var(--plotline-panel));
+ color: var(--plotline-accent-dark);
font-weight: 800;
white-space: nowrap;
}
@@ -1047,10 +1049,10 @@ summary.story-review-chapter-heading {
.story-review-summary div,
.story-review-scene-panel div {
min-width: 0;
- border: 1px solid rgba(31, 42, 68, .1);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
padding: .65rem .75rem;
- background: rgba(255, 255, 255, .58);
+ background: var(--plotline-surface-elevated);
}
.story-live-stats span,
@@ -1133,7 +1135,7 @@ summary.story-review-chapter-heading {
.story-latest-scene-title {
margin: 0 0 .45rem;
- color: #2f6f63;
+ color: var(--plotline-accent-dark);
font-size: 1rem;
font-weight: 800;
}
@@ -1148,9 +1150,9 @@ summary.story-review-chapter-heading {
.story-live-feed-grid [data-story-latest-empty] {
margin: 0;
padding: 1rem 1.1rem;
- border-left: 6px solid #2f6f63;
+ border-left: 6px solid var(--plotline-accent);
border-radius: 8px;
- background: rgba(47, 111, 99, .08);
+ background: color-mix(in srgb, var(--plotline-secondary) 8%, var(--plotline-panel));
}
.story-live-discoveries {
@@ -1208,25 +1210,25 @@ summary.story-review-chapter-heading {
align-content: start;
gap: .45rem;
min-width: 0;
- border: 1px solid rgba(31, 42, 68, .12);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
padding: .85rem;
- background: rgba(255, 255, 255, .58);
+ background: var(--plotline-surface-elevated);
}
.story-pipeline-phase-list > li.is-current {
- border-color: rgba(47, 111, 99, .42);
- background: rgba(47, 111, 99, .08);
+ border-color: color-mix(in srgb, var(--plotline-secondary) 42%, var(--plotline-panel));
+ background: color-mix(in srgb, var(--plotline-secondary) 8%, var(--plotline-panel));
box-shadow: inset 0 0 0 1px rgba(47, 111, 99, .12);
}
.story-pipeline-phase-list > li.is-complete {
- background: rgba(47, 111, 99, .06);
+ background: color-mix(in srgb, var(--plotline-secondary) 6%, var(--plotline-panel));
}
.story-pipeline-phase-list > li.is-complete > strong::before {
content: "✓ ";
- color: #2f6f63;
+ color: var(--plotline-accent-dark);
}
.story-pipeline-phase-list > li > strong {
@@ -1266,7 +1268,7 @@ summary.story-review-chapter-heading {
}
.story-pipeline-review-list li.is-complete span {
- color: #2f6f63;
+ color: var(--plotline-accent-dark);
}
.story-pipeline-review-list li.is-current {
@@ -1309,10 +1311,10 @@ summary.story-review-chapter-heading {
.story-database-build {
display: grid;
gap: .8rem;
- border: 1px solid rgba(47, 111, 99, .18);
+ border: 1px solid color-mix(in srgb, var(--plotline-secondary) 18%, var(--plotline-panel));
border-radius: 8px;
padding: 1rem;
- background: rgba(47, 111, 99, .07);
+ background: color-mix(in srgb, var(--plotline-secondary) 7%, var(--plotline-panel));
}
.story-database-build h2 {
@@ -1337,7 +1339,7 @@ summary.story-review-chapter-heading {
}
.story-database-build li span {
- color: #2f6f63;
+ color: var(--plotline-accent-dark);
font-weight: 900;
}
@@ -1373,27 +1375,27 @@ summary.story-review-chapter-heading {
}
.story-review-status--created {
- background: rgba(47, 111, 99, .16);
+ background: color-mix(in srgb, var(--plotline-secondary) 16%, var(--plotline-panel));
}
.story-review-status--ready {
- background: rgba(47, 111, 99, .12);
+ background: color-mix(in srgb, var(--plotline-secondary) 12%, var(--plotline-panel));
}
.story-review-status--active {
- background: rgba(182, 138, 70, .14);
- color: #755624;
+ background: color-mix(in srgb, var(--plotline-warning) 14%, var(--plotline-panel));
+ color: var(--plotline-accent-dark);
}
.story-review-status--warning {
background: rgba(176, 58, 46, .12);
- color: #8a2f25;
+ color: var(--plotline-danger);
}
.story-review-note {
margin: 0;
- border: 1px solid color-mix(in srgb, var(--plotline-line, rgba(31, 42, 68, .12)) 72%, transparent);
- border-left: 3px solid color-mix(in srgb, var(--plotline-accent, #2f6f63) 38%, var(--plotline-line, rgba(31, 42, 68, .12)));
+ border: 1px solid color-mix(in srgb, var(--plotline-line) 72%, transparent);
+ border-left: 3px solid color-mix(in srgb, var(--plotline-accent, #2f6f63) 38%, var(--plotline-line));
border-radius: 6px;
padding: .65rem .8rem;
background: color-mix(in srgb, var(--plotline-panel, var(--bs-body-bg)) 92%, var(--plotline-accent, #2f6f63));
@@ -1417,7 +1419,7 @@ summary.story-review-chapter-heading {
}
.story-review-note--warning {
- border-left-color: color-mix(in srgb, var(--plotline-danger, #b03a2e) 58%, var(--plotline-line, rgba(31, 42, 68, .12)));
+ border-left-color: color-mix(in srgb, var(--plotline-danger, #b03a2e) 58%, var(--plotline-line));
background: color-mix(in srgb, var(--plotline-panel, var(--bs-body-bg)) 92%, var(--plotline-danger, #b03a2e));
}
@@ -1478,7 +1480,7 @@ summary.story-review-chapter-heading {
}
.story-character-card {
- border: 1px solid color-mix(in srgb, var(--plotline-line, rgba(31, 42, 68, .12)) 82%, var(--plotline-accent, #2f6f63));
+ border: 1px solid color-mix(in srgb, var(--plotline-line) 82%, var(--plotline-accent, #2f6f63));
border-radius: 8px;
background: var(--plotline-panel, var(--bs-body-bg));
box-shadow: var(--plotline-shadow-subtle, 0 8px 20px rgba(31, 42, 68, .06));
@@ -1488,7 +1490,7 @@ summary.story-review-chapter-heading {
.story-review-card-header {
align-items: center;
background: linear-gradient(180deg, color-mix(in srgb, var(--plotline-accent, #2f6f63) 18%, var(--plotline-panel, var(--bs-body-bg))), color-mix(in srgb, var(--plotline-accent, #2f6f63) 10%, var(--plotline-panel, var(--bs-body-bg))));
- border-bottom: 1px solid color-mix(in srgb, var(--plotline-accent, #2f6f63) 34%, var(--plotline-line, rgba(31, 42, 68, .12)));
+ border-bottom: 1px solid color-mix(in srgb, var(--plotline-accent, #2f6f63) 34%, var(--plotline-line));
cursor: pointer;
display: flex;
flex-wrap: wrap;
@@ -1554,11 +1556,11 @@ summary.story-review-chapter-heading {
display: flex;
flex-wrap: wrap;
gap: .75rem;
- border: 1px solid color-mix(in srgb, var(--plotline-line, rgba(31, 42, 68, .12)) 75%, transparent);
+ border: 1px solid color-mix(in srgb, var(--plotline-line) 75%, transparent);
border-radius: 6px;
padding: .7rem .8rem;
margin: .1rem 0 0;
- background: color-mix(in srgb, var(--plotline-panel, var(--bs-body-bg)) 96%, var(--plotline-line, rgba(31, 42, 68, .12)));
+ background: color-mix(in srgb, var(--plotline-panel, var(--bs-body-bg)) 96%, var(--plotline-line));
}
.story-character-actions legend {
@@ -1579,7 +1581,7 @@ summary.story-review-chapter-heading {
.story-character-card__body .form-control,
.story-character-card__body .form-select {
background-color: var(--app-input-bg, var(--bs-body-bg));
- border-color: color-mix(in srgb, var(--plotline-line, rgba(31, 42, 68, .12)) 86%, var(--plotline-ink, var(--bs-body-color)));
+ border-color: color-mix(in srgb, var(--plotline-line) 86%, var(--plotline-ink, var(--bs-body-color)));
color: var(--app-input-text, var(--bs-body-color));
}
@@ -1595,10 +1597,10 @@ summary.story-review-chapter-heading {
}
.story-future-stage {
- border: 1px dashed rgba(31, 42, 68, .22);
+ border: 1px dashed var(--plotline-line);
border-radius: 8px;
padding: .85rem;
- background: rgba(255, 255, 255, .45);
+ background: var(--plotline-surface-elevated);
}
.story-future-stage strong,
@@ -1651,7 +1653,7 @@ summary.story-review-chapter-heading {
flex-direction: column;
justify-content: space-between;
gap: .85rem;
- border: 1px solid color-mix(in srgb, var(--plotline-line, rgba(31, 42, 68, .12)) 82%, var(--plotline-accent, #2f6f63));
+ border: 1px solid color-mix(in srgb, var(--plotline-line) 82%, var(--plotline-accent, #2f6f63));
border-radius: 8px;
padding: 1rem;
background: var(--plotline-panel, var(--bs-body-bg));
@@ -1659,12 +1661,12 @@ summary.story-review-chapter-heading {
}
.story-review-centre-tile--primary {
- border-color: color-mix(in srgb, var(--plotline-accent, #7a4a27) 46%, var(--plotline-line, rgba(31, 42, 68, .12)));
+ border-color: color-mix(in srgb, var(--plotline-accent, #7a4a27) 46%, var(--plotline-line));
box-shadow: 0 10px 24px color-mix(in srgb, var(--plotline-accent, #7a4a27) 16%, transparent);
}
.story-review-centre-tile--locked {
- background: color-mix(in srgb, var(--plotline-panel, var(--bs-body-bg)) 88%, var(--plotline-line, rgba(31, 42, 68, .12)));
+ background: color-mix(in srgb, var(--plotline-panel, var(--bs-body-bg)) 88%, var(--plotline-line));
}
.story-review-centre-tile h2 {
@@ -1706,8 +1708,8 @@ summary.story-review-chapter-heading {
.story-review-centre-tile .btn.disabled {
pointer-events: none;
color: var(--bs-secondary-color);
- border-color: color-mix(in srgb, var(--plotline-line, rgba(31, 42, 68, .12)) 80%, transparent);
- background: color-mix(in srgb, var(--plotline-panel, var(--bs-body-bg)) 94%, var(--plotline-line, rgba(31, 42, 68, .12)));
+ border-color: color-mix(in srgb, var(--plotline-line) 80%, transparent);
+ background: color-mix(in srgb, var(--plotline-panel, var(--bs-body-bg)) 94%, var(--plotline-line));
}
.story-review-centre-progress {
@@ -1717,7 +1719,7 @@ summary.story-review-chapter-heading {
.story-review-centre-progress__bar {
height: .5rem;
overflow: hidden;
- background: rgba(31, 42, 68, .12);
+ background: var(--plotline-line);
border-radius: 999px;
}
@@ -1790,10 +1792,10 @@ summary.story-review-chapter-heading {
.story-scene-preview {
display: grid;
gap: .45rem;
- border: 1px solid rgba(31, 42, 68, .1);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
padding: .75rem;
- background: rgba(255, 255, 255, .58);
+ background: var(--plotline-surface-elevated);
}
.story-scene-preview > div:first-child {
@@ -1826,7 +1828,7 @@ summary.story-review-chapter-heading {
}
.story-review-admin {
- border-top: 1px solid rgba(31, 42, 68, .1);
+ border-top: 1px solid var(--plotline-line);
padding-top: .75rem;
}
@@ -1845,7 +1847,7 @@ summary.story-review-chapter-heading {
.story-review-admin div {
min-width: 0;
- border: 1px solid rgba(31, 42, 68, .1);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
padding: .65rem;
}
@@ -1912,7 +1914,7 @@ summary.story-review-chapter-heading {
}
.onboarding-character-evidence {
- border-top: 1px solid rgba(31, 42, 68, .08);
+ border-top: 1px solid var(--plotline-line);
padding-top: .45rem;
}
@@ -1971,10 +1973,10 @@ summary.story-review-chapter-heading {
.onboarding-character-step-summary div {
min-width: 0;
- border: 1px solid rgba(31, 42, 68, .1);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
padding: .7rem;
- background: rgba(255, 255, 255, .62);
+ background: var(--plotline-surface-elevated);
}
.onboarding-character-step-summary span {
@@ -1996,7 +1998,7 @@ summary.story-review-chapter-heading {
justify-content: space-between;
gap: 1rem;
padding: .9rem 1rem;
- border: 1px solid rgba(31, 42, 68, .12);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
}
@@ -2022,8 +2024,8 @@ summary.story-review-chapter-heading {
width: 3rem;
aspect-ratio: 1;
border-radius: 50%;
- background: #2f6f63;
- color: #fff;
+ background: var(--plotline-accent-dark);
+ color: var(--pd-on-accent, var(--plotline-bg));
font-size: 1.55rem;
font-weight: 800;
box-shadow: 0 0 0 .38rem rgba(47, 111, 99, .12);
@@ -2036,9 +2038,9 @@ summary.story-review-chapter-heading {
.onboarding-complete-next {
margin-top: 1.25rem;
padding: 1rem;
- border: 1px solid rgba(31, 42, 68, .12);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
- background: rgba(255, 255, 255, .58);
+ background: var(--plotline-surface-elevated);
}
.onboarding-complete-next h2 {
@@ -2061,7 +2063,7 @@ summary.story-review-chapter-heading {
.onboarding-story-facts div,
.onboarding-story-card,
.story-intelligence-dashboard-card {
- border: 1px solid color-mix(in srgb, var(--plotline-line, rgba(31, 42, 68, .12)) 82%, var(--plotline-accent, #2f6f63));
+ border: 1px solid color-mix(in srgb, var(--plotline-line) 82%, var(--plotline-accent, #2f6f63));
border-radius: 8px;
background: var(--plotline-panel, var(--bs-body-bg));
box-shadow: var(--plotline-shadow-subtle, 0 8px 20px rgba(31, 42, 68, .06));
@@ -2074,7 +2076,7 @@ summary.story-review-chapter-heading {
}
.onboarding-story-facts span {
- color: #2f6f63;
+ color: var(--plotline-accent-dark);
font-size: .78rem;
font-weight: 800;
text-transform: uppercase;
@@ -2105,9 +2107,9 @@ summary.story-review-chapter-heading {
display: grid;
gap: .9rem;
padding: 1rem;
- border: 1px solid rgba(47, 111, 99, .18);
+ border: 1px solid color-mix(in srgb, var(--plotline-secondary) 18%, var(--plotline-panel));
border-radius: 8px;
- background: rgba(47, 111, 99, .07);
+ background: color-mix(in srgb, var(--plotline-secondary) 7%, var(--plotline-panel));
}
.onboarding-analysis-panel {
@@ -2118,10 +2120,10 @@ summary.story-review-chapter-heading {
display: grid;
gap: 1rem;
margin-top: 1rem;
- border: 1px solid rgba(47, 111, 99, .28);
+ border: 1px solid color-mix(in srgb, var(--plotline-secondary) 28%, var(--plotline-panel));
border-radius: 8px;
padding: clamp(1rem, 2vw, 1.35rem);
- background: linear-gradient(135deg, rgba(47, 111, 99, .1), rgba(255, 255, 255, .72) 52%, rgba(182, 138, 70, .12));
+ background: linear-gradient(135deg, color-mix(in srgb, var(--plotline-secondary) 10%, var(--plotline-panel)), var(--plotline-surface-elevated) 52%, color-mix(in srgb, var(--plotline-warning) 12%, var(--plotline-panel)));
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .54);
}
@@ -2144,11 +2146,11 @@ summary.story-review-chapter-heading {
.onboarding-analysis-setup__header > strong {
flex: 0 0 auto;
- border: 1px solid rgba(47, 111, 99, .22);
+ border: 1px solid color-mix(in srgb, var(--plotline-secondary) 22%, var(--plotline-panel));
border-radius: 999px;
padding: .35rem .7rem;
- background: rgba(255, 255, 255, .72);
- color: #2f6f63;
+ background: var(--plotline-surface-elevated);
+ color: var(--plotline-accent-dark);
font-size: .82rem;
white-space: nowrap;
}
@@ -2169,8 +2171,8 @@ summary.story-review-chapter-heading {
.onboarding-analysis-controls select {
min-height: 3rem;
- border-color: rgba(31, 42, 68, .22);
- background-color: #fff;
+ border-color: var(--plotline-line);
+ background-color: var(--app-input-bg);
font-weight: 700;
}
@@ -2186,10 +2188,10 @@ summary.story-review-chapter-heading {
align-items: center;
gap: .55rem;
min-width: 0;
- border: 1px solid rgba(31, 42, 68, .1);
+ border: 1px solid var(--plotline-line);
border-radius: 8px;
padding: .7rem;
- background: rgba(255, 255, 255, .64);
+ background: var(--plotline-surface-elevated);
}
.onboarding-analysis-flow span {
@@ -2198,8 +2200,8 @@ summary.story-review-chapter-heading {
width: 1.45rem;
aspect-ratio: 1;
border-radius: 50%;
- background: #2f6f63;
- color: #fff;
+ background: var(--plotline-accent-dark);
+ color: var(--pd-on-accent, var(--plotline-bg));
font-size: .8rem;
font-weight: 900;
}
@@ -2294,9 +2296,9 @@ summary.story-review-chapter-heading {
gap: 1rem;
margin-bottom: 1.25rem;
padding: 1.15rem 1.25rem;
- border: 1px solid rgba(47, 111, 99, .18);
+ border: 1px solid color-mix(in srgb, var(--plotline-secondary) 18%, var(--plotline-panel));
border-radius: 8px;
- background: rgba(47, 111, 99, .08);
+ background: color-mix(in srgb, var(--plotline-secondary) 8%, var(--plotline-panel));
}
.onboarding-dashboard-nudge h2 {
@@ -2310,8 +2312,8 @@ summary.story-review-chapter-heading {
}
.onboarding-dashboard-nudge.is-connected {
- border-color: rgba(47, 111, 99, .28);
- background: rgba(47, 111, 99, .12);
+ border-color: color-mix(in srgb, var(--plotline-secondary) 28%, var(--plotline-panel));
+ background: color-mix(in srgb, var(--plotline-secondary) 12%, var(--plotline-panel));
}
.word-companion-presence-pill {
@@ -2319,10 +2321,10 @@ summary.story-review-chapter-heading {
align-items: center;
gap: .45rem;
min-height: 31px;
- border: 1px solid rgba(31, 42, 68, .16);
+ border: 1px solid var(--plotline-line);
border-radius: 999px;
padding: .25rem .7rem;
- background: rgba(255, 255, 255, .72);
+ background: var(--plotline-surface-elevated);
color: var(--bs-body-color);
font-size: .875rem;
font-weight: 700;
@@ -2332,11 +2334,11 @@ summary.story-review-chapter-heading {
width: .58rem;
aspect-ratio: 1;
border-radius: 50%;
- background: #b68a46;
+ background: var(--plotline-warning);
}
.word-companion-presence-pill.is-offline .word-companion-presence-dot {
- background: #8b949e;
+ background: var(--plotline-text-muted);
}
@keyframes onboardingPulse {
diff --git a/PlotLine/wwwroot/css/story-intelligence-global-progress.css b/PlotLine/wwwroot/css/story-intelligence-global-progress.css
index b4d0fa3e..74092126 100644
--- a/PlotLine/wwwroot/css/story-intelligence-global-progress.css
+++ b/PlotLine/wwwroot/css/story-intelligence-global-progress.css
@@ -1,8 +1,9 @@
.story-intelligence-global-strip {
margin: -0.65rem 0 0.85rem;
- border-bottom: 1px solid rgba(84, 68, 48, 0.14);
- background: rgba(251, 248, 240, 0.96);
- box-shadow: 0 8px 20px rgba(62, 45, 28, 0.05);
+ border-bottom: 1px solid var(--plotline-line);
+ background: color-mix(in srgb, var(--plotline-panel) 94%, var(--plotline-secondary));
+ box-shadow: var(--plotline-shadow-subtle);
+ color: var(--plotline-text);
}
.story-intelligence-global-strip__inner {
@@ -45,7 +46,7 @@
height: 0.62rem;
border-radius: 50%;
background: var(--plotline-secondary);
- box-shadow: 0 0 0 0.22rem rgba(49, 95, 103, 0.14);
+ box-shadow: 0 0 0 0.22rem color-mix(in srgb, var(--plotline-secondary) 14%, transparent);
}
.story-intelligence-global-strip__meter {
@@ -53,7 +54,7 @@
width: 100%;
height: 0.44rem;
border-radius: 999px;
- background: rgba(84, 68, 48, 0.14);
+ background: var(--plotline-line);
}
.story-intelligence-global-strip__meter span {