Page assembly, footer extraction, and shared house style
The header opens the document. The stage carries the content. The footer completes the document and its navigation.
header.html + xxxstage.html + footer.htmlA stage is a content fragment, not a complete HTML document. header.html owns the opening document structure; footer.html owns the closing </body> and </html> tags. The stage owns neither.
<!DOCTYPE html>, <html>, <head>, <body>, </body>, </html>, duplicate :root palettes, MathJax scripts, footers, and site headers.
Permitted wrappers include page serious, page serious narrow, page skit, page forum narrow, and an article with page skit. A wrapper is recommended, not required. Extraction and assembly operate on the fragment itself, never on an assumed outer div.
New stages use h2 for the page title, h3 for major sections, and h4 as needed. h1 is reserved for legacy imports or exceptions.
Resolve footer link text in order: first .footitle; first h2; first h3; first h1 (legacy); filename fallback.
.footitle may mark any element and is hidden by shared CSS. Without it, optionally append the first .subtitle or .skitsub using Title — Subtitle, only when useful and under 120 characters. An explicit .footitle suppresses subtitle appending.
Strip tags, decode common HTML entities, collapse whitespace, trim ends, and ignore container type. Search near the fragment top by lines or characters; if the initial window has no title, scan the entire fragment before using the filename.
& → &; — → —; – → –; → space; " → quotation mark; ' and ' → apostrophe.
The generated footer uses shared footer and footnav classes, not inline styling, and supplies the closing document tags.
Use shared classes. Avoid private dialects, page-specific CSS, inline styles, whole-document stage output, giant story/skit pre blocks, new h1 titles, and duplicate shared scaffolding.
Forbidden drift includes .ir, .hr-*, .kl-*, private full-CSS wrappers, and repeated inline card styles. Add any needed visual treatment as a reusable shared class before using it.
Reference, frameworks, arguments, glossaries, companion pages. Recommended wrapper: page serious narrow. Shared classes: subtitle, lead, panel, note, register, certbox, softsep, t1–t4.
Scripts, satire, committees, sponsors, dialogue. Recommended wrapper: page skit. Shared classes: skitmeta, skitsub, castbox, act, line, who, stage, cue, sponsor, sponsorhed, badge, endmark.
Posts, comment fiction, scores, thresholds, narrative. Recommended wrapper: page forum narrow. Shared classes: forumuser, quote, score, neg, pos, scorerun, threshold, break.
Canonical palette, typography, page registers, components, footer, swatches, and tables are maintained centrally. Stage fragments reference these definitions; they do not duplicate them.
:root {
--bg1:#fff4dc; --fg1:#2f2618;
--bg2:#ffefcf; --fg2:#2f2618;
--bg3:#fde8c0; --fg3:#2f2618;
--bg4:#f9dfad; --fg4:#332716;
--bg5:#f5d69b; --fg5:#332716;
--bg6:#efcc8a; --fg6:#332716;
--bg7:#e8c078; --fg7:#332716;
--bg8:#dfb365; --fg8:#332716;
--bg9:#d7a757; --fg9:#332716;
--bg10:#cf9b49; --fg10:#332716;
--bg11:#c58e3d; --fg11:#332716;
--bg12:#ba8133; --fg12:#332716;
--bg13:#af762c; --fg13:#332716;
--bg14:#a66d28; --fg14:#000;
--bg15:#9c6424; --fg15:#ffcc33;
--bg16:#935c21; --fg16:#ffcc33;
--bg17:#8a541e; --fg17:#ffcc33;
--bg18:#814d1c; --fg18:#ffcc33;
--bg19:#794719; --fg19:#ffcc33;
--bg20:#714118; --fg20:#fff7e8;
--bg21:#6a3d16; --fg21:#fff7e8;
--bg22:#633815; --fg22:#fff7e8;
--bg23:#5d3414; --fg23:#fff7e8;
--bg24:#573113; --fg24:#fff;
--ink:#332716; --muted:#6b5d40; --line:#c58e3d; --amber:#7a4213; --paper:var(--bg5); --card:var(--bg6); --deep:var(--bg19); --deepfg:var(--fg19);
}
body{
margin:0;
font-family:'Segoe UI',sans-serif;
background:var(--bg6);
color:var(--fg6);
padding:2em;
}
header{
background:var(--bg18);
color:var(--fg18);
padding:1em 2em;
font-size:2em;
border-radius:10px;
}
h1{font-size:2em;margin-bottom:0.5em;color:#4b3621}
h2{font-size:1.55em;margin-top:1.35em;margin-bottom:0.55em;color:#4b3621}
h3{font-size:1.22em;margin-top:1.25em;margin-bottom:0.45em;color:#4b3621}
h4{font-size:1.05em;margin-top:1.15em;margin-bottom:0.35em;color:#4b3621}
p{font-size:1.05em;line-height:1.6em}
a{color:#884400;text-decoration:none}
a:hover{text-decoration:underline}
.footitle{display:none}
.page{max-width:980px;margin:1.6em auto 0}
.page.narrow{max-width:760px}
.page.serious{background:var(--bg5);color:var(--fg5);padding:2em 2.4em;border-radius:12px;box-shadow:2px 2px 10px rgba(0,0,0,0.12)}
.page.skit{background:var(--bg6);color:var(--ink);padding:2em 2.2em;border-radius:14px;box-shadow:2px 2px 12px rgba(0,0,0,0.16)}
.page.forum{background:var(--bg5);color:var(--fg5);padding:2em 2.5em;border-radius:10px;box-shadow:2px 2px 10px rgba(0,0,0,0.12)}
.subtitle{font-style:italic;color:#6b5636;margin-top:-0.25em}
.lead{font-size:1.16em;line-height:1.62em;color:#322a19}
.note{font-size:0.96em;color:#6b5d40}
.register{border-left:4px solid #a85a1a;padding:0.2em 0 0.2em 0.95em;color:#7a4213;font-style:italic;background:var(--bg3)}
.panel{background:var(--bg5);color:var(--fg5);padding:1.15em 1.35em;border-radius:10px;margin:1.25em 0;border:1px solid #d6af8d}
.certbox{background:var(--bg19);color:var(--fg19);padding:1.1em 1.35em;border-radius:10px;margin:1.5em 0}
.softsep{border:none;border-top:1px solid #d6af8d;margin:2em 0}
.skitmeta{font-style:italic;color:#5a422a;margin:0.2em 0 1.2em}
.skitsub{font-style:italic;color:#6b4f2a;margin-top:-0.3em}
.castbox{background:var(--bg8);color:var(--fg8);padding:1.1em 1.4em;border-radius:10px;margin:1.4em 0}
.act{display:inline-block;background:var(--bg19);color:var(--fg19);padding:0.25em 0.75em;border-radius:6px;margin-top:1.8em}
.badge{display:inline-block;background:var(--bg19);color:var(--fg19);padding:0.18em 0.65em;border-radius:6px;font-size:0.85em;letter-spacing:0.04em}
.line{line-height:1.62em;margin:0.72em 0}
.who{font-weight:bold;color:#884400;letter-spacing:0.02em}
.stage{font-style:italic;color:#7a6650;line-height:1.55em;margin:0.78em 0}
.cue{font-style:italic;color:#7a6650;border-left:3px solid #d6af8d;padding-left:0.9em;margin:0.9em 0}
.sponsor{background:var(--bg8);color:var(--fg8);padding:1.1em 1.35em;border-radius:10px;margin:1.4em 0;border:1px dashed #bb8433}
.sponsorhed{display:block;font-size:0.78em;letter-spacing:0.08em;text-transform:uppercase;opacity:0.85;margin-bottom:0.55em}
.endmark{text-align:center;letter-spacing:0.25em;color:#884400;font-weight:bold;margin-top:1.6em}
.forumuser{font-weight:bold;font-size:0.95em;background:var(--bg10);color:var(--fg10);display:inline-block;padding:0.15em 0.7em;border-radius:6px 6px 0 0;margin-bottom:-1px}
.quote,blockquote{background:var(--bg5);color:var(--fg5);border-left:4px solid var(--bg13);border-radius:0 8px 8px 8px;padding:0.9em 1.2em;margin:0 0 1.3em 0}
.quote p,blockquote p{margin:0 0 0.7em 0}
.quote p:last-child,blockquote p:last-child{margin-bottom:0}
.score{font-weight:bold;display:inline-block;padding:0.25em 0.8em;border-radius:6px;margin:0.5em 0 1.2em 0}
.score.neg{background:var(--bg19);color:var(--fg19)}
.score.pos{background:var(--bg7);color:#1f6b2f}
.scorerun{font-size:0.95em;color:#6b5a3f;margin:1em 0 1.3em 0}
.scorerun .final{font-weight:bold;color:#1f6b2f}
.threshold{font-size:0.8em;background:var(--bg19);color:var(--fg19);padding:0.5em 1em;border-radius:6px;margin:0.8em 0 1.2em 0;display:inline-block}
.break{text-align:center;color:var(--bg13);margin:1.8em 0;font-size:1.1em;letter-spacing:0.3em}
.footer{background:var(--bg8);color:var(--fg8);padding:1.5em;border-radius:10px;margin-top:2em}
.footer h2{margin-top:0;color:var(--fg8)}
.footnav{list-style:none;padding:0;font-size:1em;line-height:1.7em}
.swatchline{overflow-x:auto;white-space:nowrap;padding:1em 0}
.swatch{display:inline-block;width:48px;height:48px;margin-right:6px;font-size:0.8em;text-align:center;line-height:48px;font-weight:bold;border-radius:4px;border:1px solid #aaa}
table.t1{border-collapse:collapse;width:100%;table-layout:fixed}
table.t1 th,table.t1 td{border:1px solid #888;padding:6px;resize:horizontal;overflow:auto}
table.t1 th{background:#ccc}
table.t2{width:100%;border-collapse:collapse;margin-top:1em;background-color:#e3c6a0;box-shadow:2px 2px 8px rgba(0,0,0,0.15);border-radius:12px;overflow:hidden}
table.t2 th,table.t2 td{padding:0.9em 1.2em;text-align:left;border-bottom:1px solid #d6af8d}
table.t2 th{background-color:#d1a974;color:#3a2f1f}
table.t2 tr:last-child td{border-bottom:none}
table.t3{width:100%;border-collapse:collapse;margin-top:0.5em;background-color:#f9e7cf}
table.t3 th,table.t3 td{padding:0.6em 0.8em;text-align:left;border-bottom:1px solid #d6af8d}
table.t3 th{background-color:#ddb073;color:#3a2f1f}
table.t4{border-collapse:collapse;width:auto;margin-top:0.5em;background-color:#e3c6a0;box-shadow:2px 2px 8px rgba(0,0,0,0.15);border-radius:12px;overflow:hidden}
table.t4 th,table.t4 td{padding:0.2em 0.4em;text-align:left;border-bottom:1px solid #d6af8d;white-space:nowrap}
table.t4 th{background-color:#d1a974;color:#3a2f1f}
table.t4 tr:last-child td{border-bottom:none}Reference patterns for serious pages, skits, forum pages, and table classes.
SERIOUS PAGE EXAMPLE
<div class="page serious narrow">
<span class="footitle">The Identity Rail: Context Recovery and Certified Lift</span>
<h2>The Identity Rail</h2>
<p class="subtitle">A conserved counterpart to conventional inference context</p>
<p class="lead">The Identity Rail carries the resources to restore context, returning the chance for a certified lift.</p>
<div class="register">Stated precisely: the invariant, conjugate reserve to conventional inference context.</div>
<h3>Scope</h3>
<p>Serious page text continues here.</p>
</div>
SKIT PAGE EXAMPLE
<div class="page skit">
<h2>The Heresy Review</h2>
<p class="skitsub">The Deferral of Superposition</p>
<p class="skitmeta">A committee satire for ContextSymbolics.</p>
<div class="castbox">
<p><span class="who">FLAUB</span> — Clerk of the Review.</p>
<p><span class="who">DENCH</span> — Blunt. Asks the shortest question.</p>
</div>
<h3 class="act">Act One</h3>
<p class="stage">A meeting room. Papers. Coffee. The bell waits.</p>
<p class="line"><span class="who">FLAUB:</span> The session is called to order.</p>
<p class="cue">Sound: the bell rings once.</p>
<div class="sponsor">
<span class="sponsorhed">A word from our sponsor</span>
<p>Sponsored interlude text.</p>
</div>
<p class="endmark">END</p>
</div>
FORUM PAGE EXAMPLE
<div class="page forum narrow">
<h2>LessShitty</h2>
<p>The cursor blinked in the text box.</p>
<div class="forumuser">Bayesian_Steelman_99</div>
<blockquote><p>I think you are using the word manifold incorrectly.</p></blockquote>
<div class="score neg">Score: −18</div>
<div class="threshold">Comment score below threshold. Click to expand.</div>
<div class="break">—</div>
<div class="forumuser">aclem_47</div>
<blockquote><p>A t-SNE plot is not a manifold.</p></blockquote>
<div class="scorerun">−62 → −40 → −15 → −2 → <span class="final">+4</span></div>
</div>
TABLE EXAMPLES
<table class="t2">
<tr><th>Name</th><th>Description</th></tr>
<tr><td>Emb</td><td>Embedding snapshot</td></tr>
</table>
<table class="t3">
<tr><th>Col</th><th>Info</th></tr>
<tr><td>1</td><td>Example row</td></tr>
</table>
<table class="t4">
<tr><th>Key</th><th>Value</th></tr>
<tr><td>Status</td><td>Compact row</td></tr>
</table>pre blocks from skits.panel, certbox, sponsor, castbox, act, or badge.h1 with h2.footitle only when footer text should exceed the visible heading.The header establishes the setting. The stage carries the work. The footer preserves the connection.