/* The enclosing panel remains opaque. Only its semantic contents use presence. */
#scene .ark-page[hidden] { display:none !important; }
#scene .continuity-host {
 position:absolute; z-index:5; box-sizing:border-box; margin:0;
 padding:0; min-width:0; max-width:none; max-height:none;
 border:1px solid hsl(var(--border-default)); border-radius:8px;
 background:hsl(var(--canvas) / .97); opacity:1;
 overflow:hidden; box-shadow:0 14px 50px hsl(var(--canvas) / .14);
 transform:none; backdrop-filter:none; align-self:auto;
}
#scene .continuity-host::before,#scene .continuity-host::after { content:none; }
#scene .continuity-host[data-panel-mode="compact"] { padding:0; }
#scene .continuity-placeholder { visibility:hidden; }

.story-depth {display:flex;gap:5px;flex:0 0 auto;padding-top:4px;}

.lifecycle-boundary {margin-top:auto;flex:0 0 auto;padding:10px 12px;border:1px solid hsl(var(--warning) / .18);border-left:2px solid hsl(var(--warning));border-radius:7px;background:hsl(var(--warning) / .025);}
.lifecycle-boundary strong {font:500 10px/1.3 var(--font-mono,monospace);color:hsl(var(--warning));letter-spacing:.03em;}

.lifecycle-object {display:flex;flex-direction:column;gap:12px;min-width:0;min-height:0;}
.lifecycle-fabric-top,.lifecycle-fabric-foot {display:flex;align-items:center;justify-content:space-between;gap:10px;font:500 12px/1.4 var(--font-mono,monospace);letter-spacing:.05em;color:hsl(var(--text-muted));}
.lifecycle-fabric-count {display:block;font:400 70px/.9 var(--font-sans,"Albert Sans",sans-serif);letter-spacing:-.07em;color:hsl(var(--text-strong));}
.lifecycle-fabric-unit {display:block;margin-top:-6px;font:500 12px/1.4 var(--font-mono,monospace);letter-spacing:.05em;text-transform:uppercase;color:hsl(var(--text-muted));}
.lifecycle-fabric-mesh {display:block;width:100%;height:150px;min-height:80px;flex:1 1 150px;border-radius:5px;pointer-events:none;}

.lifecycle-fabric-foot {padding-top:12px;border-top:1px solid hsl(var(--border-subtle));}

.lifecycle-next {display:flex;align-items:center;justify-content:flex-end;gap:16px;flex:0 0 auto;}
#scene .lifecycle-next a {display:inline-flex;align-items:center;min-height:40px;padding:8px 12px;border-radius:6px;color:hsl(var(--text-muted));font:500 13px/1.3 var(--font-sans,"Albert Sans",sans-serif);text-decoration:none;}

#scene .story-reference {display:inline-flex;align-items:center;min-height:40px;color:hsl(var(--reference));font:500 13px var(--font-sans,"Albert Sans",sans-serif);}

@media(min-width:901px) and (max-height:780px) {
 .lifecycle-object {gap:9px;}
 .lifecycle-fabric-count {font-size:48px;}
 .lifecycle-fabric-mesh {height:100px;flex-basis:100px;}

}
.hero-alive[data-page="lifecycle"] .lattice-activity,
.hero-alive[data-page^="lifecycle/"] .lattice-activity { opacity:0; pointer-events:none; }
.hero-alive.is-lifecycle-transition .lattice-activity { opacity:0; pointer-events:none; }
.hero-alive[data-page="lifecycle"] .lattice-field,
.hero-alive[data-page^="lifecycle/"] .lattice-field { opacity:.16; }

/* The shell crops atmosphere but is never a focus-scroll container. */
#scene .hero-alive {overflow:clip;}

#scene .continuity-origin {min-height:0;pointer-events:none;}

/* /explore's three-box story (js/pages/explorer.js), sharing only the soft frame and mesh language. */

#scene .how-work-card {position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:18px;min-height:0;padding:24px;border:1px solid hsl(var(--border-default));border-radius:9px;background:linear-gradient(145deg,hsl(var(--primary-100)),hsl(var(--canvas)));text-decoration:none;color:hsl(var(--text));overflow:hidden;transition:border-color 180ms,background-color 180ms;}
#scene .how-work-card:is(:hover,:focus-visible,[data-active="true"]) {border-color:hsl(var(--reference-400));background-color:hsl(var(--reference-100));}
.how-work-number {font:500 11px/1.4 var(--font-mono,monospace);color:hsl(var(--primary));}
#scene .how-work-card h2 {margin:0;font:500 clamp(22px,2vw,28px)/1.12 var(--font-sans,sans-serif);letter-spacing:-.025em;color:hsl(var(--text-strong));}

.how-work-mesh {display:block;width:100%;height:100px;min-height:44px;flex:1 1 100px;margin-top:auto;border-radius:5px;pointer-events:none;}

.hero-alive[data-page="deployment"] .lattice-activity {opacity:0;pointer-events:none;}
.hero-alive[data-page="deployment"] .lattice-field {opacity:.16;}
@media(min-width:901px) and (max-height:780px){#scene .how-work-card {padding:20px;gap:14px;}#scene .how-work-card h2 {font-size:24px;} .how-work-mesh {height:70px;flex-basis:70px;}}
@media(max-width:900px){#scene .how-work-card {min-height:250px;}}
@media(prefers-reduced-motion:reduce){#scene .how-work-card {transition:none;}}

/* The story pages' own drawings (js/pages/story.js): each sits in Ark's figure frame, which draws
   the border, the "Illustration -- not live data" label and the caption; only their insides are
   styled here. Labels marked data-ark-label are held at 12px or more by the frame.
   /lifecycle/<stage>: five distinct objects -- a brief, a reply, a commitment, a package, a ledger. */
.stage-scene {display:flex;flex-direction:column;gap:14px;min-width:0;min-height:0;}

.stage-scene-object {display:flex;flex-direction:column;gap:10px;}
.stage-object-label {display:block;font:500 12px/1.4 var(--font-mono,monospace);letter-spacing:.04em;color:hsl(var(--text-muted));}
#scene .stage-scene-object p {margin:6px 0 0;font:400 13px/1.4 var(--font-sans,sans-serif);color:hsl(var(--text));}
.stage-object-row {border-top:1px solid hsl(var(--border-subtle));padding-top:10px;}
.stage-brief-job {padding:14px;border:1px solid hsl(var(--primary-300));border-radius:6px;}
#scene .stage-brief-job p {font-size:20px;}
.stage-offer-request {padding:10px 14px;border-left:2px solid hsl(var(--text-muted) / .3);}
.stage-offer-reply {padding:16px;margin-left:22px;border:1px solid hsl(var(--primary-300));border-radius:7px;background:hsl(var(--primary-100));}
.stage-scene-agreement .stage-scene-object {display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.stage-party {padding:20px 12px;border:1px solid hsl(var(--border-default));border-radius:6px;text-align:center;}
.stage-party:last-of-type {border-color:hsl(var(--primary-300));}
.stage-common-terms {grid-column:1/-1;text-align:center;border-top:1px solid hsl(var(--primary-400));padding-top:16px;}
.stage-package-result,.stage-package-evidence {padding:14px;border:1px solid hsl(var(--border-default));border-radius:7px;}
.stage-package-result {margin-right:18px;border-color:hsl(var(--primary-300));}
.stage-package-evidence {margin-left:18px;background:hsl(var(--nested) / .2);}
.stage-ledger-row {display:grid;grid-template-columns:70px 1fr;gap:12px;align-items:center;border-bottom:1px solid hsl(var(--border-subtle));padding:12px 0;}
#scene .stage-ledger-row p {margin:0;}
.stage-scene-mesh {width:100%;height:90px;min-height:36px;flex:1 1 90px;border-radius:5px;pointer-events:none;}
.stage-scene-choices {display:flex;flex-wrap:wrap;gap:6px;}
#scene .stage-scene-choices button {padding:6px 9px;min-height:30px;border:1px solid hsl(var(--border-subtle));border-radius:5px;color:hsl(var(--text-muted));background:transparent;font:500 12px/1.3 var(--font-sans,sans-serif);cursor:pointer;}
#scene .stage-scene-choices button:is(:hover,[aria-pressed="true"]) {color:hsl(var(--text-strong));border-color:hsl(var(--reference-400));background:hsl(var(--reference-100));}
#scene .stage-scene-detail {margin:0;min-height:34px;font:400 12px/1.4 var(--font-sans,sans-serif);color:hsl(var(--text-muted));}
@media(min-width:901px) and (max-height:780px){.stage-scene {gap:9px;}.stage-scene-object {gap:7px;}#scene .stage-scene-object p {font-size:12px;margin-top:4px;}.stage-brief-job,.stage-offer-reply,.stage-package-result,.stage-package-evidence {padding:10px;}.stage-party {padding:14px 8px;}.stage-common-terms {padding-top:10px;}.stage-ledger-row {padding:9px 0;}.stage-scene-mesh {height:50px;min-height:26px;flex-basis:50px;}#scene .stage-scene-detail {font-size:12px;min-height:30px;}}

@media(max-width:900px) {
 .stage-scene-mesh {flex:none;}
 .lifecycle-fabric-mesh {flex:none;}
}

/* /download's record card and step list (js/pages/download.js); the agreement chapters that shared it are on the story template since 2026-10-19. */

.how-chapter-mesh {display:block;width:100%;height:auto;flex:1 1 40px;min-height:0;border-radius:5px;pointer-events:none;}

.hero-alive[data-page^="how/"] .lattice-activity {opacity:0;pointer-events:none;}.hero-alive[data-page^="how/"] .lattice-field {opacity:.16;}

@media(max-width:900px){.how-chapter-mesh {flex:none;height:90px;}}

.stage-scene {box-sizing:border-box;opacity:1;}
.stage-scene-slot {min-width:0;min-height:0;visibility:hidden;}

/* Plain-language action cues stay with the mesh, including reduced-motion endpoints. */
#scene .mesh-story-cue {font-size:12px;line-height:1.4;color:hsl(var(--text-muted));margin:0;min-height:2.8em;flex:none;max-width:48ch;}

/* /how-deployment-works/<chapter>: the record the chapter produces (its fields are Ark facts). */
.how-record {display:grid;gap:12px;}
.how-record-title {margin:0;font:500 22px/1.2 var(--font-sans,sans-serif);letter-spacing:-.02em;color:hsl(var(--text-strong));}
.how-record .how-chapter-mesh {height:96px;flex:none;}
/* /how-deployment-works: each stage keeps its own mesh; the stage pointed at is named in full colour. */
.how-deploy-meshes {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
.how-deploy-mesh {display:grid;gap:6px;min-width:0;}
.how-deploy-mesh .how-work-mesh {height:84px;flex:none;margin:0;}
.how-deploy-mesh-name {font:500 12px/1.4 var(--font-mono,monospace);color:hsl(var(--text-muted));}
.how-deploy-mesh[data-active="true"] .how-deploy-mesh-name {color:hsl(var(--text-strong));}
.how-deploy-mesh-signal {font:500 12px/1.4 var(--font-mono,monospace);letter-spacing:.04em;color:hsl(var(--text-muted));}
