================================================================================
PRODUCTION_SAFE_TEMPLATE_SYSTEM_5_12_26.txt
CollabORhythm / Collabtunes — Production Acceleration Prep Phase
Generated: 5.12.26
STATUS: AUTHORITATIVE template specification for AIO page generation
================================================================================

PURPOSE: Define the exact safe template structure before mass production begins.
Every generated page must follow this spec. Deviation = regenerate, not patch.

================================================================================
SECTION 1 — TEMPLATE IDENTITY
================================================================================

TEMPLATE NAME:     COLLABTUNES_AIO_15_BLOCK_V1
SOURCE FILE:       HTML_TESTER_NUMBER_TWO_FIXED_COLOR_HTML.txt
PALETTE SOURCE:    FIXED_COLOR_CODING_README.txt
LOCKED:            After SL1 test approved by Tom
APPLIES TO:        All 34 AIO album pages (10 Song Lists + 24 Set Lists)
DOES NOT APPLY TO: Universe pages (separate template — Phase 6)

================================================================================
SECTION 2 — REQUIRED PAGE COMPONENTS (Must appear on every generated page)
================================================================================

COMPONENT               | LOCATION      | CONTENT SOURCE            | SAFE TO SKIP?
------------------------|---------------|---------------------------|---------------
Social media bar        | Top of page   | Fixed 10 platforms        | NO
Brand header            | Block 1       | CANON_AUTHORITY_REGISTRY  | NO
Rating badge            | Block 1/2     | RATINGS_INDEX             | NO — use PENDING if unconfirmed
GX score badge          | Block 2       | mood_settings file        | NO — use PENDING if unconfirmed
Collection title        | Block 1       | CANON_AUTHORITY_REGISTRY  | NO — LOCKED, do not invent
Content flags           | Block 4/11    | RATINGS_INDEX             | NO for R+, optional for G/PG
Track list              | Block 7       | AIO .md source            | NO — SOURCE_PULL badge if missing
Fast scroll nav         | Top + mid     | Template structure        | NO — navigation requirement
Back to Switchboard btn | Top + bottom  | /switchboard-quicklinks/  | NO — navigation requirement
Canon notes block       | Block 14      | Canon files               | NO — always include
Reconstruction flags    | Block 15      | Pipeline status           | NO — always include
Footer                  | Bottom        | Standard footer text      | NO

OPTIONAL (include when data exists):
  RS-style review (Block 6) — generate editorially if source pull complete
  One sentence summary (Block 5) — source pull required
  Category tags (Block 9) — source pull required
  Mood tags (Block 10) — confirmed for SL1, source pull for others

================================================================================
SECTION 3 — 15-BLOCK STRUCTURE SPECIFICATION
================================================================================

BLOCK | NAME                      | DATA SOURCE                    | PLACEHOLDER IF MISSING
------|---------------------------|--------------------------------|------------------------
1     | Title Header              | CANON title + rating badge     | Never missing — always have title
2     | Collection Identity       | GX score, catalog data         | [GX PENDING — SOURCE PULL]
3     | Core Themes               | AIO .md source                 | [THEMES PENDING — SOURCE PULL]
4     | GX / Content Flags        | RATINGS_INDEX + mood_settings  | [FLAGS PENDING — SOURCE PULL]
5     | One Sentence Summary      | AIO .md source                 | [SUMMARY PENDING — SOURCE PULL]
6     | Rolling Stone Style Review| AIO .md source / editorial     | [REVIEW PENDING — SOURCE PULL]
7     | Track List                | AIO .md source                 | [TRACK LIST PENDING — SOURCE PULL]
8     | Track Notes               | AIO .md source                 | [NOTES PENDING — SOURCE PULL]
9     | Category Tags             | revised_category_list + AIO    | [CATEGORIES PENDING — SOURCE PULL]
10    | Mood Tags                 | AIO .md source                 | [MOOD TAGS PENDING — SOURCE PULL]
11    | Profanity / Adult Flags   | RATINGS_INDEX                  | [FLAGS PENDING — SOURCE PULL]
12    | Related Material          | WEBSITE_LINK_MAP + themes      | [LINKS PENDING]
13    | Internal Connections      | LadyWeaver registry + themes   | [CONNECTIONS PENDING]
14    | Canon Notes               | CANON_AUTHORITY_REGISTRY       | Always populated — admin data
15    | Reconstruction Status     | Pipeline flags                 | Always populated — status flags

================================================================================
SECTION 4 — PLACEHOLDER SYSTEM RULES
================================================================================

RULE 1: Never leave a block empty. Empty blocks look broken.
         Use a styled SOURCE_PULL_REQUIRED badge instead.

RULE 2: Placeholder badge CSS class:
  .pending-badge {
    display: inline-block;
    background: #ffd21f;
    color: #070911;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 3px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

RULE 3: Placeholder text options (use the most specific):
  [SOURCE PULL REQUIRED]
  [GX PENDING — TOM VERIFICATION]
  [RATING PENDING — MOOD_SETTINGS FILE NEEDED]
  [TRACK TITLES PENDING — SOURCE PULL]
  [REVIEW PENDING — EDITORIAL GENERATION NEEDED]

RULE 4: SOURCE_PULL_REQUIRED badges must never appear in:
  Block 1 (title — always known)
  Block 14 (canon notes — always have something)
  Block 15 (reconstruction flags — always have something)
  Footer (always standard)

RULE 5: A page with SOURCE_PULL badges is acceptable for staging.
         A page with SOURCE_PULL badges must NOT be promoted as complete.

================================================================================
SECTION 5 — RATING GATE INTEGRATION PER PAGE
================================================================================

EVERY GENERATED PAGE must include rating gate logic:

G/PG pages:       No gate needed. Show all content.
PG-13 pages:      Check rating selection ≥ PG-13 before showing content.
                  If below PG-13: redirect to bouncer with message.
R pages:          Check rating selection ≥ R before showing content.
NC-17 pages:      Check rating selection ≥ NC-17 before showing content.
X pages:          Check rating selection = X/No Limits only.

IMPLEMENTATION NOTE:
  Rating check uses localStorage key: collabtunes_selected_rating
  Values: 'gpg' | 'pg13' | 'r' | 'nc17' | 'x'
  Default on new session: 'gpg'
  If key not set or below required: redirect to /
  (Bouncer sets this key — pages read it)

NEVER hard-code a rating into page logic.
Rating level is DATA — stored in the key.
Page logic is SYSTEM — checks the key against page's required minimum.

================================================================================
SECTION 6 — VISUAL PALETTE (Non-negotiable — apply to every generated page)
================================================================================

VARIABLE          | VALUE     | USE FOR
------------------|-----------|----------------------------------------
--bg-primary      | #070911   | Main page background (Gotham Navy)
--bg-panel        | #0b0a08   | Card/panel backgrounds (Whiskey Bat)
--bg-soft         | #111111   | Secondary panels (Soft Industrial)
--text-main       | #d8d0bd   | All body/reading text (warm parchment)
--text-strong     | #e7d7b8   | Headings, emphasis text
--text-muted      | #8f96a8   | Secondary/metadata text
--accent-gold     | #ffd21f   | Primary accent — buttons, borders, highlights
--accent-oldgold  | #d4af37   | Secondary gold — decorative
--accent-chrome   | #a3a3a3   | Neutral accent
--accent-danger   | #ff3131   | Warnings, critical flags

ABSOLUTE RULES:
  NO #ffffff as reading text — ever
  NO green (#00ff00 family) anywhere
  NO red gradients or lava effects
  NO RGB gamer-style color cycling
  Use --text-main for all paragraph/body text
  Use --accent-gold for all primary interactive elements

================================================================================
SECTION 7 — TEMPLATE VERSION CONTROL
================================================================================

TEMPLATE VERSION:  V1 (current — not yet locked)
LOCK TRIGGER:      Tom approves SL1 test output
LOCKED FILENAME:   AIO_TEMPLATE_15_BLOCK_LOCKED_V1_[DATE].html

AFTER LOCKING:
  Do not edit the locked template for any reason.
  If a fix is needed: create V2. Document what changed. Regenerate affected pages.
  V1 stays in archive. V2 is the new locked template.
  Every version bump = full re-documentation of what changed and why.

VERSION HISTORY LOG (add entry for each version):
  V1: Initial fixed-color 15-block structure. Source: HTML_TESTER_NUMBER_TWO_FIXED_COLOR.
      Lock date: [PENDING Tom approval of SL1 test]

================================================================================
SECTION 8 — PRE-GENERATION CHECKLIST (Run before generating any page)
================================================================================

[ ] Template version is locked (Tom has approved SL1 test)
[ ] Collection title confirmed in CANON_AUTHORITY_REGISTRY
[ ] Collection URL confirmed in MASTER_URL_AUTHORITY_REGISTRY
[ ] Rating confirmed (or PENDING badge planned for that block)
[ ] GX score available (or PENDING badge planned)
[ ] Lady Weaver URL conflict resolved (if this collection has LW crosslinks)
[ ] Chapter drift resolved (if linking to any Songbook chapters)
[ ] No defamation-flagged content included without Tom clearance
[ ] Palette variables used — no hardcoded hex values in generated output
[ ] Rating gate JS included and targeting correct minimum rating level
[ ] All internal links pulled from URL_AUTHORITY_REGISTRY (never from memory)
[ ] SOURCE_PULL badges styled (not raw text) for any missing blocks

================================================================================
END PRODUCTION_SAFE_TEMPLATE_SYSTEM_5_12_26.txt
================================================================================
