<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>{{TITLE}} — {{COLLECTION_TYPE}} — Collaborhythm AIO</title>
  <style>
    @import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Barlow+Condensed:wght@300;500;700;900&display=swap');

    :root {
      --bg:        #0a0a0c;
      --surface:   #111116;
      --border:    #222228;
      --accent:    #c8ff00;
      --accent2:   #ff4444;
      --text:      #e8e8e8;
      --muted:     #666672;
      --mono:      'Space Mono', monospace;
      --display:   'Barlow Condensed', sans-serif;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    html { scroll-behavior: smooth; }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: var(--mono);
      font-size: 13px;
      line-height: 1.6;
      min-height: 100vh;
    }

    /* ── NAV ── */
    nav {
      position: sticky;
      top: 0;
      z-index: 100;
      background: rgba(10,10,12,0.95);
      backdrop-filter: blur(8px);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 0;
      padding: 0 24px;
      height: 48px;
    }

    .nav-brand {
      font-family: var(--display);
      font-weight: 900;
      font-size: 11px;
      letter-spacing: 0.2em;
      color: var(--accent);
      text-transform: uppercase;
      margin-right: auto;
    }

    nav a {
      color: var(--muted);
      text-decoration: none;
      font-size: 10px;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      padding: 0 16px;
      height: 48px;
      display: flex;
      align-items: center;
      border-left: 1px solid var(--border);
      transition: color 0.15s;
    }
    nav a:hover { color: var(--accent); }

    /* ── HERO ── */
    .hero {
      padding: 64px 24px 48px;
      border-bottom: 1px solid var(--border);
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 32px;
      align-items: end;
    }

    .hero-collection-type {
      font-family: var(--display);
      font-weight: 300;
      font-size: 11px;
      letter-spacing: 0.3em;
      color: var(--muted);
      text-transform: uppercase;
      margin-bottom: 8px;
    }

    .hero-title {
      font-family: var(--display);
      font-weight: 900;
      font-size: clamp(48px, 8vw, 96px);
      line-height: 0.9;
      letter-spacing: -0.02em;
      text-transform: uppercase;
      color: var(--text);
    }

    .hero-artist {
      font-family: var(--display);
      font-weight: 500;
      font-size: 18px;
      letter-spacing: 0.1em;
      color: var(--muted);
      margin-top: 12px;
    }

    .hero-short-summary {
      margin-top: 20px;
      max-width: 560px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.7;
    }

    .hero-badges {
      display: flex;
      flex-direction: column;
      gap: 12px;
      align-items: flex-end;
    }

    /* ── RATING BADGE ── */
    .rating-badge {
      background: var(--accent);
      color: #000;
      padding: 16px 20px;
      text-align: center;
      min-width: 100px;
    }

    .rating-score {
      font-family: var(--display);
      font-weight: 900;
      font-size: 42px;
      line-height: 1;
      letter-spacing: -0.03em;
    }

    .rating-max {
      font-family: var(--display);
      font-weight: 300;
      font-size: 11px;
      color: rgba(0,0,0,0.5);
      letter-spacing: 0.1em;
    }

    .rating-label {
      font-family: var(--display);
      font-weight: 900;
      font-size: 10px;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      margin-top: 4px;
      border-top: 1px solid rgba(0,0,0,0.2);
      padding-top: 4px;
    }

    /* ── GX BADGE ── */
    .gx-badge {
      border: 1px solid var(--border);
      padding: 12px 16px;
      text-align: center;
      min-width: 100px;
    }

    .gx-value {
      font-family: var(--display);
      font-weight: 900;
      font-size: 32px;
      color: var(--accent2);
      line-height: 1;
    }

    .gx-label {
      font-family: var(--display);
      font-weight: 700;
      font-size: 9px;
      letter-spacing: 0.25em;
      color: var(--muted);
      margin-top: 2px;
    }

    /* ── SECTION BASE ── */
    section {
      border-bottom: 1px solid var(--border);
    }

    .section-inner {
      max-width: 900px;
      margin: 0 auto;
      padding: 40px 24px;
    }

    .section-label {
      font-family: var(--display);
      font-weight: 700;
      font-size: 9px;
      letter-spacing: 0.3em;
      color: var(--accent);
      text-transform: uppercase;
      margin-bottom: 24px;
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .section-label::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border);
    }

    /* ── TRACKS ── */
    #tracks .section-inner { padding-bottom: 24px; }

    .track-row {
      display: grid;
      grid-template-columns: 32px 1fr auto;
      gap: 16px;
      align-items: start;
      padding: 16px 0;
      border-bottom: 1px solid var(--border);
    }
    .track-row:last-child { border-bottom: none; }

    .track-num {
      font-family: var(--display);
      font-weight: 700;
      font-size: 20px;
      color: var(--muted);
      line-height: 1.2;
    }

    .track-title {
      font-family: var(--display);
      font-weight: 900;
      font-size: 22px;
      letter-spacing: 0.03em;
      text-transform: uppercase;
      line-height: 1.1;
    }

    .track-meta {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 4px;
    }

    .track-meta-item {
      font-size: 10px;
      color: var(--muted);
      letter-spacing: 0.08em;
    }

    .track-note {
      margin-top: 6px;
      font-size: 11px;
      color: var(--muted);
      font-style: italic;
    }

    .track-tags {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-top: 6px;
    }

    .tag {
      font-size: 9px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      border: 1px solid var(--border);
      padding: 2px 6px;
      color: var(--muted);
    }

    .track-duration {
      font-family: var(--display);
      font-weight: 700;
      font-size: 18px;
      color: var(--muted);
      white-space: nowrap;
    }

    /* ── CRITICAL NOTES / LONG SUMMARY ── */
    .prose {
      font-size: 13px;
      line-height: 1.9;
      color: var(--text);
      max-width: 680px;
    }

    .critical-note-block {
      margin-top: 24px;
      border-left: 3px solid var(--accent2);
      padding-left: 16px;
    }

    .critical-note-label {
      font-family: var(--display);
      font-weight: 700;
      font-size: 9px;
      letter-spacing: 0.25em;
      color: var(--accent2);
      text-transform: uppercase;
      margin-bottom: 6px;
    }

    .critical-note-text {
      font-size: 12px;
      color: var(--muted);
      font-style: italic;
    }

    /* ── SCORES / GX BREAKDOWN ── */
    .score-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      gap: 1px;
      background: var(--border);
    }

    .score-cell {
      background: var(--surface);
      padding: 20px;
    }

    .score-cell-label {
      font-family: var(--display);
      font-size: 9px;
      letter-spacing: 0.2em;
      color: var(--muted);
      text-transform: uppercase;
      margin-bottom: 8px;
    }

    .score-cell-value {
      font-family: var(--display);
      font-weight: 900;
      font-size: 36px;
      color: var(--accent);
      line-height: 1;
    }

    .score-bar-wrap {
      margin-top: 8px;
      height: 2px;
      background: var(--border);
    }

    .score-bar-fill {
      height: 2px;
      background: var(--accent);
    }

    /* ── WARNINGS ── */
    .warning-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .warning-item {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 12px 16px;
      border: 1px solid rgba(255,68,68,0.3);
      background: rgba(255,68,68,0.04);
    }

    .warning-icon {
      color: var(--accent2);
      font-size: 11px;
      flex-shrink: 0;
      margin-top: 1px;
    }

    .warning-text {
      font-size: 11px;
      color: var(--text);
    }

    /* ── METADATA ── */
    .meta-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 16px 32px;
    }

    .meta-item {}

    .meta-key {
      font-size: 9px;
      letter-spacing: 0.2em;
      color: var(--muted);
      text-transform: uppercase;
      margin-bottom: 4px;
    }

    .meta-val {
      font-family: var(--display);
      font-weight: 700;
      font-size: 14px;
      letter-spacing: 0.03em;
      color: var(--text);
    }

    /* ── TAGS CLOUD ── */
    .tags-cloud {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .tag-cloud-item {
      font-family: var(--display);
      font-weight: 700;
      font-size: 11px;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      border: 1px solid var(--border);
      padding: 6px 12px;
      color: var(--text);
      transition: border-color 0.15s, color 0.15s;
    }
    .tag-cloud-item:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    /* ── FOOTER ── */
    footer {
      padding: 32px 24px;
      text-align: center;
    }

    .footer-engine {
      font-size: 9px;
      letter-spacing: 0.2em;
      color: var(--muted);
      text-transform: uppercase;
    }

    /* ── MOBILE ── */
    @media (max-width: 600px) {
      .hero {
        grid-template-columns: 1fr;
        gap: 24px;
      }
      .hero-badges {
        flex-direction: row;
        align-items: flex-start;
      }
      nav a { display: none; }
      nav a:last-child { display: flex; }
      .track-row { grid-template-columns: 24px 1fr; }
      .track-duration { display: none; }
    }
  </style>
</head>
<body>

  <!-- NAV -->
  <nav>
    <span class="nav-brand">COLLABORHYTHM AIO</span>
    {{NAV_LINKS}}
  </nav>

  <!-- HERO -->
  <header class="hero">
    <div class="hero-left">
      <div class="hero-collection-type">{{COLLECTION_TYPE}}</div>
      <h1 class="hero-title">{{TITLE}}</h1>
      <div class="hero-artist">{{ARTIST}}</div>
      <p class="hero-short-summary">{{SHORT_SUMMARY}}</p>
    </div>
    <div class="hero-badges">
      <div class="rating-badge">
        <div class="rating-score">{{RATING_SCORE}}</div>
        <div class="rating-max">/ {{RATING_MAX}}</div>
        <div class="rating-label">{{RATING_LABEL}}</div>
      </div>
      <div class="gx-badge">
        <div class="gx-value">{{GX_VALUE}}</div>
        <div class="gx-label">{{GX_LABEL}}</div>
      </div>
    </div>
  </header>

  <!-- TRACKS -->
  <section id="tracks">
    <div class="section-inner">
      <div class="section-label">Tracks</div>
      {{TRACKS}}
    </div>
  </section>

  <!-- CRITICAL NOTES -->
  <section id="notes">
    <div class="section-inner">
      <div class="section-label">Critical Notes</div>
      <p class="prose">{{LONG_SUMMARY}}</p>
      {{CRITICAL_NOTE}}
    </div>
  </section>

  <!-- SCORES -->
  <section id="scores">
    <div class="section-inner">
      <div class="section-label">GX Breakdown</div>
      {{GX_BREAKDOWN}}
    </div>
  </section>

  <!-- WARNINGS -->
  {{WARNINGS_SECTION}}

  <!-- TAGS -->
  <section id="tags">
    <div class="section-inner">
      <div class="section-label">Tags</div>
      {{TAGS_CLOUD}}
    </div>
  </section>

  <!-- METADATA -->
  <section id="metadata">
    <div class="section-inner">
      <div class="section-label">Metadata</div>
      {{METADATA_GRID}}
    </div>
  </section>

  <!-- FOOTER -->
  <footer>
    <p class="footer-engine">Generated by COLLABTUNES_JSON_TO_AIO_RENDER_ENGINE_5_13_26 &mdash; Collaborhythm System &mdash; {{CATALOG_ID}}</p>
  </footer>

</body>
</html>
