/* Shared public identity. Never matches application/PWA-auth roots without data-site-theme. */
html[data-site-theme="public"] {
    .public-header { background:#fcf3e5f5; }
    .marketing-btn--primary,.public-site a.marketing-btn--primary { background:var(--plum); border-color:var(--plum); color:#fff9f0; }
    .marketing-btn--primary:hover { background:#6a3153; border-color:#6a3153; color:#fff9f0; }
    .writer-problems,.story-problems { background:#f3e7d6; }
    .public-links { gap:22px; }
    #publicMenu { margin-left:38px; }
    .public-footer { background:#f0e5d4; }
    .public-scene-host { --public-scene-reading-edge:max(32px,calc((100vw - var(--public-content-width)) / 2)); position:relative; isolation:isolate; background:var(--paper); }
    .public-scene-host>.marketing-container { position:relative; z-index:1; }
    .public-scene { position:absolute; inset:0; overflow:hidden; pointer-events:none; z-index:0; }
    .public-scene picture,.public-scene img { display:block; width:100%; height:100%; }
    .public-scene img { object-fit:cover; object-position:center 42%; }
    .public-scene::after { content:""; position:absolute; inset:0; background:linear-gradient(0deg,var(--paper),#fcf3e500 35%),linear-gradient(90deg,#fcf3e50a,#fcf3e5f5 var(--public-scene-reading-edge),#fcf3e5ed 50%,#fcf3e5f5 calc(100% - var(--public-scene-reading-edge)),#fcf3e50a); }
    .public-scene-host--pricing .public-scene::after { background:linear-gradient(0deg,var(--paper),#fcf3e522 75%),linear-gradient(90deg,#fcf3e580,#fcf3e5f9 var(--public-scene-reading-edge),#fcf3e5fa 50%,#fcf3e5f9 calc(100% - var(--public-scene-reading-edge)),#fcf3e580); }
    .public-scene-host--home .public-scene img { object-position:center 40%; }
    .writer-home :is(.writer-problems,.bring-manuscript,.writer-philosophy),.writer-tour .tour-stop { border-top:1px solid var(--line); }
    .writer-home .product-print,.writer-tour .product-print { background:#fffaf2; border-color:var(--line); box-shadow:0 8px 25px #573b2712; }
    .tour-jump { background:var(--paper-deep); border-block:1px solid var(--line); }
    .writer-tour .tour-stop:nth-of-type(even) { background:#f6ecdd; }
    .writer-tour .tour-paper-note { background:var(--sage); border-color:var(--line); }
    .pricing-card { border-radius:10px 6px 10px 6px; background:#fffaf2; border-color:var(--line); box-shadow:0 4px 15px #573b270b; }
    .pricing-card--featured { border-color:#75816a; background:#edf0e3; box-shadow:0 5px 20px #536b4814; }
    .pricing-card--trial { background:#f6ead6; }
    .pricing-card__heading { border-bottom:0; }
    .pricing-badge { background:#dfe5d3; color:#405238; }
    .public-info-page .public-hero { background:radial-gradient(ellipse at 0 0,#e8eadc80,transparent 65%),var(--paper); border-bottom:1px solid var(--line); }
    .public-info-page :is(.public-card,.plain-card),.public-auth-main .auth-card { background:#fffaf2; border-color:var(--line); box-shadow:0 4px 18px #573b2709; }
    .marketing-shell>:is(.plain-card,.edit-panel,.list-section) { background:#fffaf2; border-color:var(--line); }
    .marketing-shell>.page-heading { border-bottom:1px solid var(--line); padding-bottom:24px; }
    .public-site :is(.btn-primary,button.btn-primary) { background:var(--plum); border-color:var(--plum); color:#fff9f0; }
    .public-site :is(.btn-primary,button.btn-primary):hover { background:#6a3153; border-color:#6a3153; }
    .public-site .form-control:focus { border-color:#94718a; box-shadow:0 0 0 .2rem #54223f1c; }
}
@media(max-width:1000px) { html[data-site-theme="public"] { .public-links { gap:14px; } #publicMenu { margin-left:20px; } } }
@media(max-width:600px) {
 html[data-site-theme="public"] .public-scene img { object-position:left top; }
 html[data-site-theme="public"] .public-scene::after,html[data-site-theme="public"] .public-scene-host--pricing .public-scene::after { background:linear-gradient(0deg,var(--paper) 25%,#fcf3e5dc 70%,#fcf3e5c9),linear-gradient(90deg,#fcf3e540,#fcf3e5cc); }
}

/* Home offers a problem-first path after the familiar frustrations, before the product tour. */
html[data-site-theme="public"] {
 .writer-solver-invitation { padding:48px 0; border-block:1px solid var(--line); background:linear-gradient(110deg,#e8eadcbb,var(--paper) 75%); }
 .writer-solver-grid { display:grid; grid-template-columns:1fr 1.05fr; align-items:center; gap:56px; }
 .writer-solver-invitation h2 { color:var(--plum); font-size:clamp(2.3rem,3.4vw,3.5rem); margin-bottom:20px; }
 .writer-solver-invitation p:not(.marketing-eyebrow) { line-height:1.65; }
 .writer-solver-note { font-size:.9rem; color:var(--muted); margin:10px 0 0; }
 .writer-solver-examples { position:relative; }
 .writer-solver-mark { position:absolute; right:25px; top:-105px; font:italic 12rem/1 Georgia,serif; color:var(--plum); opacity:.07; pointer-events:none; }
 .writer-solver-examples ul { position:relative; display:grid; grid-template-columns:1fr 1fr; gap:16px; list-style:none; padding:0; margin:0; }
 .writer-solver-examples li { display:flex; align-items:center; min-height:112px; padding:22px; border:1px solid var(--line); border-left:3px solid #94718a; border-radius:7px; background:#fffaf2; color:var(--ink); font:1.12rem/1.5 Georgia,serif; box-shadow:0 3px 10px #573b2709; }
 .writer-solver-examples li:nth-child(2),.writer-solver-examples li:nth-child(3) { background:#edf0e3; border-left-color:#75816a; }
}
@media(max-width:900px) { html[data-site-theme="public"] .writer-solver-grid { grid-template-columns:1fr; gap:28px; } html[data-site-theme="public"] .writer-solver-mark { display:none; } }
@media(max-width:600px) { html[data-site-theme="public"] .writer-solver-invitation { padding:34px 0; } html[data-site-theme="public"] .writer-solver-examples ul { grid-template-columns:1fr; gap:10px; } html[data-site-theme="public"] .writer-solver-examples li { min-height:0; padding:16px 18px; } }

/* The warm Tour backgrounds must use their matching foreground palette, including
   Plot Lines (formerly dark). Keep this together with the surface overrides. */
html[data-site-theme="public"] .writer-tour .tour-stop--weave {
 --ink:#30242b; --muted:#71625c; --line:#dfcdb9; color:var(--ink);
 background:#f6ecdd;
 h2 em,.composition-annotation { color:#6b6134; }
 .section-number { color:var(--muted); }
 .tour-capabilities li::before { color:#4e6846; }
 .large-product { background:#fffaf2; border-color:var(--line); }
}

/* Source crops now follow the current PWA panels; the surrounding angled compositions stay intact. */
html[data-site-theme="public"] {
 .product-preview picture { display:block; }
 .ui-crop picture { display:block; width:100%; height:100%; }
 .ui-crop picture img { position:static; width:100%; height:100%; max-width:100%; object-fit:cover; object-position:left top; }
}
/* Small section labels need normal-text contrast on cream and sage, not large-heading contrast. */
html[data-site-theme="public"] .writer-tour .section-number { color:#62664f; }
html[data-site-theme="public"] .application-reveal {
 .theme-demo-note { color:#c8cebd; font-size:12px; margin-top:26px; }
 .product-print figcaption { color:#62664f; }
}
