{
  "id": 15,
  "slug": "ubuweb-avant-archive",
  "name": "UbuWeb Raw Avant-Garde Archive",
  "kind": "style",
  "family": "Raw-Web & Archival",
  "sourceSite": {
    "name": "UbuWeb",
    "url": "https://www.ubu.com",
    "verifiedStatus": 200
  },
  "tagline": "Calm anti-algorithmic avant-garde archive: stark chalk white, 1px hairline block cells, and open-index markers.",
  "whyUnique": "Replaces noisy algorithmic feeds with a meditative, utilitarian archival index: crisp 1px-bordered blocks of sound poetry, film notes, and diagrams organized into open collections with zero commercial clutter.",
  "theme": "light",
  "mobileStrength": "high",
  "tags": [
    "raw-web",
    "avant-garde",
    "anti-algorithmic",
    "minimal-grid",
    "archival",
    "utilitarian"
  ],
  "bestFor": [
    "Avant-garde sound & film archives",
    "Research repositories & digital libraries",
    "Academic & art reference catalogs",
    "Calm collaborative knowledge gardens"
  ],
  "palette": [
    {
      "role": "canvas",
      "hex": "#FFFFFF",
      "name": "Chalk White"
    },
    {
      "role": "surface",
      "hex": "#F7F7F7",
      "name": "Block Matte"
    },
    {
      "role": "ink",
      "hex": "#1A1A1A",
      "name": "Graphite Ink"
    },
    {
      "role": "accent",
      "hex": "#17AC10",
      "name": "Open Archive Green"
    },
    {
      "role": "muted",
      "hex": "#6D6D6D",
      "name": "Catalog Meta Gray"
    }
  ],
  "typography": {
    "display": "Inter, -apple-system, BlinkMacSystemFont, sans-serif",
    "body": "Inter, -apple-system, BlinkMacSystemFont, sans-serif",
    "mono": "IBM Plex Mono, ui-monospace, monospace",
    "googleFontsUrl": "https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Inter:wght@400;500;600&display=swap",
    "scaleNotes": "Restrained, uniform sans scale (13-18px) with zero oversized hero theatrics; monospace reserved for catalog IDs, counts, and timestamps."
  },
  "layoutNotes": "Single-row utilitarian breadcrumb header with search input, collection metadata bar, and a clean 4-column square archival block grid mixing text notes, inline SVG diagrams, and linked dossiers.",
  "interactionNotes": "Live catalog/block search filter, block-type filter pills (All, Text, Diagram, Channel), interactive '+ Connect Block' composer modal that appends a real new archival block to the grid, and detail inspector.",
  "mobileNotes": "4-column block grid adapts cleanly to 1-column or 2-column square cards on 390px viewports with >=44px connect and filter controls.",
  "agentGuardrails": {
    "do": [
      "Keep every archival block in a disciplined 1px #D8D8D8 frame with generous inner breathing room",
      "Use Open Archive Green (#17AC10) sparingly to signal open public collections",
      "Avoid vanity metrics, likes, or algorithmic recommendation banners"
    ],
    "dont": [
      "Do not add loud hero sections, promotional popups, or heavy drop shadows",
      "Do not use decorative color gradients"
    ]
  },
  "demoFile": "demos/ubuweb-avant-archive.html",
  "thumbDesktop": "thumbs/ubuweb-avant-archive-desktop.webp",
  "thumbMobile": "thumbs/ubuweb-avant-archive-mobile.webp",
  "urls": {
    "page": "https://templates.michaelpitts.net/t/ubuweb-avant-archive",
    "markdown": "https://templates.michaelpitts.net/t/ubuweb-avant-archive.md",
    "api": "https://templates.michaelpitts.net/api/templates/ubuweb-avant-archive",
    "demo": "https://templates.michaelpitts.net/demos/ubuweb-avant-archive.html",
    "thumbDesktop": "https://templates.michaelpitts.net/thumbs/ubuweb-avant-archive-desktop.webp",
    "thumbMobile": "https://templates.michaelpitts.net/thumbs/ubuweb-avant-archive-mobile.webp"
  },
  "agentPrompt": "Design & build using template #015 \"UbuWeb Raw Avant-Garde Archive\" (style / Raw-Web & Archival, light theme).\nFull AI blueprint & standalone starter code: https://templates.michaelpitts.net/t/ubuweb-avant-archive.md\nLive demo: https://templates.michaelpitts.net/demos/ubuweb-avant-archive.html\nReal-world inspiration: UbuWeb (https://www.ubu.com)\n\nCore aesthetic: Replaces noisy algorithmic feeds with a meditative, utilitarian archival index: crisp 1px-bordered blocks of sound poetry, film notes, and diagrams organized into open collections with zero commercial clutter.\nPalette: canvas: #FFFFFF (Chalk White), surface: #F7F7F7 (Block Matte), ink: #1A1A1A (Graphite Ink), accent: #17AC10 (Open Archive Green), muted: #6D6D6D (Catalog Meta Gray)\nTypography: Display=\"Inter, -apple-system, BlinkMacSystemFont, sans-serif\", Body=\"Inter, -apple-system, BlinkMacSystemFont, sans-serif\", Mono=\"IBM Plex Mono, ui-monospace, monospace\"\nLayout: Single-row utilitarian breadcrumb header with search input, collection metadata bar, and a clean 4-column square archival block grid mixing text notes, inline SVG diagrams, and linked dossiers.\nInteractions: Live catalog/block search filter, block-type filter pills (All, Text, Diagram, Channel), interactive '+ Connect Block' composer modal that appends a real new archival block to the grid, and detail inspector.\nMobile: 4-column block grid adapts cleanly to 1-column or 2-column square cards on 390px viewports with >=44px connect and filter controls.\n\nGuardrails:\n- DO: Keep every archival block in a disciplined 1px #D8D8D8 frame with generous inner breathing room\n- DO: Use Open Archive Green (#17AC10) sparingly to signal open public collections\n- DO: Avoid vanity metrics, likes, or algorithmic recommendation banners\n- DON'T: Do not add loud hero sections, promotional popups, or heavy drop shadows\n- DON'T: Do not use decorative color gradients",
  "sourceCode": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <title>INDEX.NA — Quiet Research Channels &amp; Archival Blocks</title>\n  <link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n  <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n  <link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap\" rel=\"stylesheet\">\n  <style>\n    :root {\n      --canvas: #FFFFFF;\n      --surface: #F7F7F7;\n      --ink: #1A1A1A;\n      --accent: #17AC10;\n      --muted: #6D6D6D;\n      --line: #D8D8D8;\n      --line-hover: #999999;\n      --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n      --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;\n    }\n\n    *, *::before, *::after {\n      box-sizing: border-box;\n    }\n\n    html, body {\n      margin: 0;\n      padding: 0;\n      background: var(--canvas);\n      color: var(--ink);\n      font-family: var(--font-sans);\n      font-size: 14px;\n      line-height: 1.5;\n      overflow-x: hidden;\n      -webkit-font-smoothing: antialiased;\n    }\n\n    /* Quiet Header Bar */\n    .topbar {\n      position: sticky;\n      top: 0;\n      z-index: 40;\n      background: var(--canvas);\n      border-bottom: 1px solid var(--line);\n    }\n\n    .topbar-inner {\n      max-width: 1280px;\n      margin: 0 auto;\n      padding: 0.75rem 1.25rem;\n      display: flex;\n      flex-wrap: wrap;\n      align-items: center;\n      gap: 0.85rem;\n    }\n\n    .wordmark {\n      display: inline-flex;\n      align-items: center;\n      gap: 0.5rem;\n      font-weight: 600;\n      font-size: 0.98rem;\n      letter-spacing: -0.01em;\n      color: var(--ink);\n      text-decoration: none;\n    }\n\n    .dots-mark {\n      display: inline-grid;\n      grid-template-columns: repeat(2, 6px);\n      gap: 3px;\n    }\n\n    .dots-mark span {\n      width: 6px;\n      height: 6px;\n      border-radius: 50%;\n      background: var(--ink);\n    }\n\n    .search-wrap {\n      flex: 1;\n      min-width: 180px;\n      max-width: 440px;\n    }\n\n    .search-field {\n      width: 100%;\n      min-height: 44px;\n      padding: 0.5rem 0.8rem;\n      background: var(--surface);\n      border: 1px solid var(--line);\n      font-family: var(--font-sans);\n      font-size: 0.9rem;\n      color: var(--ink);\n    }\n\n    .search-field:focus {\n      outline: none;\n      border-color: var(--ink);\n      background: var(--canvas);\n    }\n\n    .connect-btn {\n      margin-left: auto;\n      min-height: 44px;\n      padding: 0.5rem 1rem;\n      background: var(--canvas);\n      border: 1px solid var(--ink);\n      color: var(--ink);\n      font-family: var(--font-sans);\n      font-weight: 500;\n      font-size: 0.88rem;\n      cursor: pointer;\n      transition: background-color 0.12s ease, color 0.12s ease;\n    }\n\n    .connect-btn:hover {\n      background: var(--ink);\n      color: var(--canvas);\n    }\n\n    /* Main Container */\n    .container {\n      max-width: 1280px;\n      margin: 0 auto;\n      padding: 2rem 1.25rem 4rem;\n    }\n\n    .channel-header {\n      display: flex;\n      flex-wrap: wrap;\n      align-items: baseline;\n      justify-content: space-between;\n      gap: 1rem;\n      padding-bottom: 1.25rem;\n      border-bottom: 1px solid var(--line);\n      margin-bottom: 1.5rem;\n    }\n\n    .channel-header h1 {\n      margin: 0;\n      font-size: 1.35rem;\n      font-weight: 500;\n      letter-spacing: -0.02em;\n    }\n\n    .channel-sub {\n      margin: 0.3rem 0 0;\n      color: var(--muted);\n      font-size: 0.88rem;\n      max-width: 62ch;\n    }\n\n    .meta-mono {\n      font-family: var(--font-mono);\n      font-size: 0.78rem;\n      color: var(--muted);\n    }\n\n    /* Channel Filter Strip */\n    .channel-strip {\n      display: flex;\n      flex-wrap: wrap;\n      gap: 0.5rem;\n      margin-bottom: 2rem;\n    }\n\n    .chan-pill {\n      min-height: 44px;\n      padding: 0.45rem 0.85rem;\n      background: var(--canvas);\n      border: 1px solid var(--line);\n      color: var(--ink);\n      font-family: var(--font-sans);\n      font-size: 0.86rem;\n      cursor: pointer;\n      display: inline-flex;\n      align-items: center;\n      gap: 0.45rem;\n    }\n\n    .chan-pill:hover {\n      border-color: var(--line-hover);\n      background: var(--surface);\n    }\n\n    .chan-pill.active {\n      border-color: var(--ink);\n      background: var(--surface);\n      font-weight: 600;\n    }\n\n    .status-dot {\n      width: 7px;\n      height: 7px;\n      border-radius: 50%;\n      background: var(--accent);\n      flex-shrink: 0;\n    }\n\n    .status-dot.closed {\n      background: var(--ink);\n    }\n\n    .pill-count {\n      font-family: var(--font-mono);\n      font-size: 0.74rem;\n      color: var(--muted);\n    }\n\n    /* Structural Block Grid */\n    .blocks-grid {\n      display: grid;\n      grid-template-columns: repeat(4, minmax(0, 1fr));\n      gap: 1.35rem;\n    }\n\n    .block-card {\n      display: flex;\n      flex-direction: column;\n      gap: 0.55rem;\n      cursor: pointer;\n    }\n\n    .block-frame {\n      aspect-ratio: 1 / 1;\n      border: 1px solid var(--line);\n      background: var(--surface);\n      padding: 1rem;\n      display: flex;\n      flex-direction: column;\n      justify-content: space-between;\n      overflow: hidden;\n      transition: border-color 0.14s ease, background-color 0.14s ease;\n    }\n\n    .block-card:hover .block-frame {\n      border-color: var(--ink);\n      background: var(--canvas);\n    }\n\n    .block-frame.channel-card-frame {\n      border-color: var(--accent);\n      background: var(--canvas);\n      justify-content: center;\n      align-items: flex-start;\n      gap: 0.4rem;\n    }\n\n    .block-frame.channel-card-frame:hover {\n      background: #F4FBF3;\n    }\n\n    .block-quote {\n      margin: 0;\n      font-size: 0.92rem;\n      line-height: 1.55;\n      color: var(--ink);\n      overflow: hidden;\n      display: -webkit-box;\n      -webkit-line-clamp: 7;\n      -webkit-box-orient: vertical;\n    }\n\n    .block-link-url {\n      font-family: var(--font-mono);\n      font-size: 0.74rem;\n      color: var(--muted);\n      word-break: break-all;\n    }\n\n    .block-svg-wrap {\n      flex: 1;\n      display: grid;\n      place-items: center;\n    }\n\n    .block-svg-wrap svg {\n      width: 100%;\n      height: 100%;\n      max-height: 190px;\n      display: block;\n    }\n\n    .block-caption {\n      display: flex;\n      flex-direction: column;\n      gap: 0.15rem;\n    }\n\n    .block-title {\n      font-size: 0.86rem;\n      font-weight: 500;\n      color: var(--ink);\n      white-space: nowrap;\n      overflow: hidden;\n      text-overflow: ellipsis;\n    }\n\n    .block-meta {\n      display: flex;\n      justify-content: space-between;\n      align-items: center;\n      font-family: var(--font-mono);\n      font-size: 0.72rem;\n      color: var(--muted);\n    }\n\n    .conn-badge {\n      color: var(--accent);\n    }\n\n    .empty-msg {\n      padding: 3rem 1rem;\n      text-align: center;\n      border: 1px solid var(--line);\n      background: var(--surface);\n      color: var(--muted);\n      font-family: var(--font-mono);\n      font-size: 0.84rem;\n    }\n\n    /* Modals (Connect Composer & Block Reader) */\n    .modal-overlay {\n      position: fixed;\n      inset: 0;\n      background: rgba(255, 255, 255, 0.88);\n      z-index: 70;\n      display: none;\n      align-items: center;\n      justify-content: center;\n      padding: 1rem;\n    }\n\n    .modal-overlay.open {\n      display: flex;\n    }\n\n    .modal-panel {\n      width: min(520px, 100%);\n      max-height: 88vh;\n      overflow-y: auto;\n      background: var(--canvas);\n      border: 1px solid var(--ink);\n      padding: 1.35rem;\n    }\n\n    .modal-head {\n      display: flex;\n      justify-content: space-between;\n      align-items: center;\n      padding-bottom: 0.85rem;\n      border-bottom: 1px solid var(--line);\n      margin-bottom: 1rem;\n    }\n\n    .modal-head h2 {\n      margin: 0;\n      font-size: 1.05rem;\n      font-weight: 600;\n    }\n\n    .icon-close {\n      min-width: 44px;\n      min-height: 44px;\n      background: var(--canvas);\n      border: 1px solid var(--line);\n      font-size: 1.15rem;\n      cursor: pointer;\n      color: var(--ink);\n    }\n\n    .form-field {\n      margin-bottom: 0.9rem;\n    }\n\n    .form-field label {\n      display: block;\n      font-family: var(--font-mono);\n      font-size: 0.76rem;\n      color: var(--muted);\n      margin-bottom: 0.3rem;\n      text-transform: uppercase;\n    }\n\n    .form-field input,\n    .form-field select,\n    .form-field textarea {\n      width: 100%;\n      min-height: 44px;\n      padding: 0.55rem 0.7rem;\n      border: 1px solid var(--line);\n      background: var(--surface);\n      font-family: var(--font-sans);\n      font-size: 0.9rem;\n      color: var(--ink);\n    }\n\n    .form-field textarea {\n      min-height: 110px;\n      resize: vertical;\n    }\n\n    .form-actions {\n      display: flex;\n      justify-content: flex-end;\n      gap: 0.6rem;\n      margin-top: 1rem;\n    }\n\n    .btn-quiet {\n      min-height: 44px;\n      padding: 0 1rem;\n      background: var(--canvas);\n      border: 1px solid var(--line);\n      color: var(--ink);\n      font-size: 0.88rem;\n      cursor: pointer;\n    }\n\n    .btn-quiet.primary {\n      border-color: var(--accent);\n      color: var(--accent);\n      font-weight: 600;\n    }\n\n    .btn-quiet.primary:hover {\n      background: var(--accent);\n      color: var(--canvas);\n    }\n\n    .reader-content {\n      border: 1px solid var(--line);\n      background: var(--surface);\n      padding: 1rem;\n      margin-bottom: 1rem;\n      white-space: pre-wrap;\n      font-size: 0.94rem;\n      line-height: 1.6;\n    }\n\n    footer {\n      max-width: 1280px;\n      margin: 0 auto;\n      border-top: 1px solid var(--line);\n      padding: 1.25rem;\n      display: flex;\n      flex-wrap: wrap;\n      justify-content: space-between;\n      gap: 0.75rem;\n      font-family: var(--font-mono);\n      font-size: 0.76rem;\n      color: var(--muted);\n    }\n\n    /* Responsive */\n    @media (max-width: 1024px) {\n      .blocks-grid {\n        grid-template-columns: repeat(3, minmax(0, 1fr));\n      }\n    }\n\n    @media (max-width: 720px) {\n      .blocks-grid {\n        grid-template-columns: repeat(2, minmax(0, 1fr));\n        gap: 1rem;\n      }\n      .topbar-inner {\n        padding: 0.65rem 1rem;\n      }\n      .connect-btn {\n        margin-left: 0;\n        width: 100%;\n      }\n      .search-wrap {\n        max-width: none;\n        width: 100%;\n      }\n    }\n\n    @media (max-width: 460px) {\n      .blocks-grid {\n        grid-template-columns: 1fr;\n      }\n      .block-frame {\n        aspect-ratio: 4 / 3;\n      }\n    }\n  </style>\n</head>\n<body>\n  <header class=\"topbar\">\n    <div class=\"topbar-inner\">\n      <a href=\"#top\" class=\"wordmark\">\n        <span class=\"dots-mark\" aria-hidden=\"true\"><span></span><span></span><span></span><span></span></span>\n        <span>INDEX.NA</span>\n      </a>\n      <div class=\"search-wrap\">\n        <input type=\"search\" id=\"searchInput\" class=\"search-field\" placeholder=\"Filter blocks, notes, diagrams, channels...\" aria-label=\"Filter archival blocks\">\n      </div>\n      <button type=\"button\" class=\"connect-btn\" id=\"openComposerBtn\">+ Connect Block</button>\n    </div>\n  </header>\n\n  <main class=\"container\" id=\"top\">\n    <section class=\"channel-header\">\n      <div>\n        <h1 id=\"activeChannelTitle\">All Research Channels</h1>\n        <p class=\"channel-sub\" id=\"activeChannelDesc\">A calm, ad-free index of connected ideas, architectural sketches, reading excerpts, and slow-web references.</p>\n      </div>\n      <div class=\"meta-mono\" id=\"totalStats\">4 channels &bull; 10 blocks</div>\n    </section>\n\n    <div class=\"channel-strip\" id=\"channelStrip\" role=\"tablist\" aria-label=\"Filter by channel\"></div>\n\n    <section class=\"blocks-grid\" id=\"blocksGrid\" aria-label=\"Archival blocks\"></section>\n    <div class=\"empty-msg\" id=\"emptyMsg\" hidden>0 blocks found for this query. Try another keyword or connect a new block.</div>\n  </main>\n\n  <footer>\n    <span>INDEX.NA &mdash; CALM ARCHIVAL NETWORK</span>\n    <span>NO ALGORITHMIC FEED &bull; CHRONOLOGICAL CONNECTIONS</span>\n  </footer>\n\n  <!-- Connect Block Composer Modal -->\n  <div class=\"modal-overlay\" id=\"composerModal\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"composerHeading\">\n    <div class=\"modal-panel\">\n      <div class=\"modal-head\">\n        <h2 id=\"composerHeading\">Connect a New Block</h2>\n        <button type=\"button\" class=\"icon-close\" id=\"closeComposerBtn\" aria-label=\"Close composer\">&times;</button>\n      </div>\n      <form id=\"composerForm\">\n        <div class=\"form-field\">\n          <label for=\"blockChannel\">Target Channel</label>\n          <select id=\"blockChannel\" required></select>\n        </div>\n        <div class=\"form-field\">\n          <label for=\"blockKind\">Block Type</label>\n          <select id=\"blockKind\">\n            <option value=\"text\">Text Excerpt / Note</option>\n            <option value=\"link\">Web Reference / Link</option>\n          </select>\n        </div>\n        <div class=\"form-field\">\n          <label for=\"blockTitleInput\">Title</label>\n          <input type=\"text\" id=\"blockTitleInput\" placeholder=\"e.g. Pattern Language Note #159\" required maxlength=\"80\">\n        </div>\n        <div class=\"form-field\">\n          <label for=\"blockBodyInput\">Content or URL</label>\n          <textarea id=\"blockBodyInput\" placeholder=\"Write a quiet note, quote, or reference URL...\" required></textarea>\n        </div>\n        <div class=\"form-actions\">\n          <button type=\"button\" class=\"btn-quiet\" id=\"cancelComposerBtn\">Cancel</button>\n          <button type=\"submit\" class=\"btn-quiet primary\">Connect Block</button>\n        </div>\n      </form>\n    </div>\n  </div>\n\n  <!-- Block Reader Modal -->\n  <div class=\"modal-overlay\" id=\"readerModal\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"readerTitle\">\n    <div class=\"modal-panel\">\n      <div class=\"modal-head\">\n        <h2 id=\"readerTitle\">Block</h2>\n        <button type=\"button\" class=\"icon-close\" id=\"closeReaderBtn\" aria-label=\"Close block reader\">&times;</button>\n      </div>\n      <div class=\"meta-mono\" id=\"readerMeta\" style=\"margin-bottom:0.85rem;\"></div>\n      <div class=\"reader-content\" id=\"readerContent\"></div>\n      <div class=\"form-actions\">\n        <button type=\"button\" class=\"btn-quiet\" id=\"closeReaderFootBtn\">Done</button>\n      </div>\n    </div>\n  </div>\n\n  <script>\n    (function () {\n      const CHANNELS = [\n        {\n          id: 'quiet-interfaces',\n          name: 'Quiet Interfaces',\n          open: true,\n          author: 'Mina Sato',\n          desc: 'Software that respects attention: hairline grids, restrained ink, and predictable state.'\n        },\n        {\n          id: 'civic-signage',\n          name: 'Civic Signage & Maps',\n          open: true,\n          author: 'Lukas Meyer',\n          desc: 'Wayfinding systems, railway timetables, and architectural diagrams built to last decades.'\n        },\n        {\n          id: 'reading-notes',\n          name: 'Marginalia & Quotes',\n          open: false,\n          author: 'Clara Vance',\n          desc: 'Excerpts on craft, cybernetics, slow publishing, and vernacular architecture.'\n        },\n        {\n          id: 'paper-systems',\n          name: 'Paper & Print Systems',\n          open: true,\n          author: 'Otis Reid',\n          desc: 'Index cards, ring binders, archival folders, and tactile filing methods.'\n        }\n      ];\n\n      const BLOCKS = [\n        {\n          id: 'b1',\n          channel: 'quiet-interfaces',\n          kind: 'text',\n          title: 'On Calm Tools',\n          body: 'A good research tool feels like an empty wooden desk with good north light. It never asks you to celebrate a streak or chase a notification badge.',\n          connections: 14,\n          updated: '2h ago'\n        },\n        {\n          id: 'b2',\n          channel: 'civic-signage',\n          kind: 'diagram',\n          title: 'Basel Transit Grid Diagram',\n          body: 'Orthogonal transfer diagram drawn on a 12-unit hairline grid with single-accent interchange markers.',\n          connections: 9,\n          updated: '5h ago',\n          svg: `<svg viewBox=\"0 0 220 180\" fill=\"none\" stroke=\"#1A1A1A\" stroke-width=\"1.2\" aria-hidden=\"true\">\n            <line x1=\"20\" y1=\"45\" x2=\"200\" y2=\"45\"/>\n            <line x1=\"20\" y1=\"90\" x2=\"200\" y2=\"90\"/>\n            <line x1=\"20\" y1=\"135\" x2=\"200\" y2=\"135\"/>\n            <line x1=\"75\" y1=\"20\" x2=\"75\" y2=\"160\"/>\n            <line x1=\"145\" y1=\"20\" x2=\"145\" y2=\"160\"/>\n            <circle cx=\"75\" cy=\"90\" r=\"7\" fill=\"#FFFFFF\" stroke=\"#17AC10\" stroke-width=\"2.2\"/>\n            <circle cx=\"145\" cy=\"45\" r=\"7\" fill=\"#FFFFFF\" stroke=\"#1A1A1A\" stroke-width=\"2\"/>\n            <circle cx=\"145\" cy=\"135\" r=\"5\" fill=\"#1A1A1A\"/>\n            <text x=\"20\" y=\"168\" fill=\"#6D6D6D\" stroke=\"none\" font-family=\"monospace\" font-size=\"10\">FIG 02 — TRANSFER NODE</text>\n          </svg>`\n        },\n        {\n          id: 'b3',\n          channel: 'reading-notes',\n          kind: 'text',\n          title: 'Christopher Alexander — Light on Two Sides',\n          body: 'When they have a choice, people will always gravitate to those rooms which have light on two sides, and leave the rooms which are lit only from one side unused and empty.',\n          connections: 27,\n          updated: '1d ago'\n        },\n        {\n          id: 'b4',\n          channel: 'paper-systems',\n          kind: 'diagram',\n          title: 'A6 Zettelkasten Slip Geometry',\n          body: 'Standard 105x148mm index card proportions with top-right alphanumeric address and bottom cross-reference footer.',\n          connections: 18,\n          updated: '1d ago',\n          svg: `<svg viewBox=\"0 0 220 180\" fill=\"none\" stroke=\"#1A1A1A\" stroke-width=\"1.1\" aria-hidden=\"true\">\n            <rect x=\"26\" y=\"24\" width=\"168\" height=\"122\" fill=\"#FFFFFF\"/>\n            <line x1=\"26\" y1=\"50\" x2=\"194\" y2=\"50\" stroke=\"#D8D8D8\"/>\n            <line x1=\"26\" y1=\"74\" x2=\"194\" y2=\"74\" stroke=\"#D8D8D8\"/>\n            <line x1=\"26\" y1=\"98\" x2=\"194\" y2=\"98\" stroke=\"#D8D8D8\"/>\n            <line x1=\"26\" y1=\"122\" x2=\"194\" y2=\"122\" stroke=\"#D8D8D8\"/>\n            <text x=\"148\" y=\"42\" fill=\"#17AC10\" stroke=\"none\" font-family=\"monospace\" font-size=\"10\">14b/3a</text>\n            <text x=\"36\" y=\"42\" fill=\"#1A1A1A\" stroke=\"none\" font-family=\"monospace\" font-size=\"10\">SLIP NOTE</text>\n            <text x=\"36\" y=\"164\" fill=\"#6D6D6D\" stroke=\"none\" font-family=\"monospace\" font-size=\"10\">105 x 148 MM</text>\n          </svg>`\n        },\n        {\n          id: 'b5',\n          channel: 'quiet-interfaces',\n          kind: 'link',\n          title: 'Low-Tech Magazine Solar Server Notes',\n          body: 'https://solar.lowtechmagazine.com/about/the-solar-website — Static HTML, dithered graphics, and a live battery meter for the hosting server.',\n          connections: 31,\n          updated: '2d ago'\n        },\n        {\n          id: 'b6',\n          channel: 'civic-signage',\n          kind: 'diagram',\n          title: 'Proportion Study: Swiss Poster Grid',\n          body: '4x4 modular field study with 1px structural dividers and asymmetric negative space.',\n          connections: 11,\n          updated: '3d ago',\n          svg: `<svg viewBox=\"0 0 220 180\" fill=\"none\" stroke=\"#1A1A1A\" stroke-width=\"1\" aria-hidden=\"true\">\n            <rect x=\"30\" y=\"16\" width=\"160\" height=\"148\" fill=\"#FFFFFF\"/>\n            <line x1=\"70\" y1=\"16\" x2=\"70\" y2=\"164\" stroke=\"#D8D8D8\"/>\n            <line x1=\"110\" y1=\"16\" x2=\"110\" y2=\"164\" stroke=\"#D8D8D8\"/>\n            <line x1=\"150\" y1=\"16\" x2=\"150\" y2=\"164\" stroke=\"#D8D8D8\"/>\n            <line x1=\"30\" y1=\"53\" x2=\"190\" y2=\"53\" stroke=\"#D8D8D8\"/>\n            <line x1=\"30\" y1=\"90\" x2=\"190\" y2=\"90\" stroke=\"#D8D8D8\"/>\n            <line x1=\"30\" y1=\"127\" x2=\"190\" y2=\"127\" stroke=\"#D8D8D8\"/>\n            <rect x=\"70\" y=\"53\" width=\"80\" height=\"37\" fill=\"#1A1A1A\"/>\n            <rect x=\"110\" y=\"90\" width=\"40\" height=\"37\" fill=\"#17AC10\"/>\n          </svg>`\n        },\n        {\n          id: 'b7',\n          channel: 'reading-notes',\n          kind: 'text',\n          title: 'Ursula K. Le Guin — Carrier Bag Theory',\n          body: 'Before the tool that forces energy outward, we made the tool that brings energy home: a leaf, a gourd, a net, a bag, a sling, a folder.',\n          connections: 42,\n          updated: '4d ago'\n        },\n        {\n          id: 'b8',\n          channel: 'paper-systems',\n          kind: 'link',\n          title: 'ISO 216 Paper Ratio Reference',\n          body: 'https://clagnut.com/blog/2362 — Why the square root of 2 allows any sheet to fold in half while preserving identical aspect ratio.',\n          connections: 8,\n          updated: '5d ago'\n        }\n      ];\n\n      let activeChannel = 'ALL';\n      let query = '';\n\n      const channelStrip = document.getElementById('channelStrip');\n      const blocksGrid = document.getElementById('blocksGrid');\n      const emptyMsg = document.getElementById('emptyMsg');\n      const totalStats = document.getElementById('totalStats');\n      const activeChannelTitle = document.getElementById('activeChannelTitle');\n      const activeChannelDesc = document.getElementById('activeChannelDesc');\n      const searchInput = document.getElementById('searchInput');\n\n      const composerModal = document.getElementById('composerModal');\n      const blockChannelSelect = document.getElementById('blockChannel');\n      const composerForm = document.getElementById('composerForm');\n      const readerModal = document.getElementById('readerModal');\n      const readerTitle = document.getElementById('readerTitle');\n      const readerMeta = document.getElementById('readerMeta');\n      const readerContent = document.getElementById('readerContent');\n\n      function populateChannelSelect() {\n        blockChannelSelect.innerHTML = CHANNELS.map(c => `<option value=\"${c.id}\">${c.name}</option>`).join('');\n      }\n\n      function renderChannelStrip() {\n        const allBtn = `\n          <button type=\"button\" class=\"chan-pill ${activeChannel === 'ALL' ? 'active' : ''}\" data-chan=\"ALL\" role=\"tab\" aria-selected=\"${activeChannel === 'ALL'}\">\n            <span>All Channels</span>\n            <span class=\"pill-count\">${BLOCKS.length}</span>\n          </button>\n        `;\n        const pills = CHANNELS.map(ch => {\n          const count = BLOCKS.filter(b => b.channel === ch.id).length;\n          const isAct = activeChannel === ch.id;\n          return `\n            <button type=\"button\" class=\"chan-pill ${isAct ? 'active' : ''}\" data-chan=\"${ch.id}\" role=\"tab\" aria-selected=\"${isAct}\">\n              <span class=\"status-dot ${ch.open ? '' : 'closed'}\" aria-hidden=\"true\"></span>\n              <span>${ch.name}</span>\n              <span class=\"pill-count\">${count}</span>\n            </button>\n          `;\n        }).join('');\n        channelStrip.innerHTML = allBtn + pills;\n      }\n\n      function renderBlocks() {\n        const q = query.trim().toLowerCase();\n        const filtered = BLOCKS.filter(b => {\n          const chOk = activeChannel === 'ALL' || b.channel === activeChannel;\n          const chObj = CHANNELS.find(c => c.id === b.channel);\n          const hay = `${b.title} ${b.body} ${b.kind} ${chObj ? chObj.name : ''}`.toLowerCase();\n          return chOk && (!q || hay.includes(q));\n        });\n\n        if (activeChannel === 'ALL') {\n          activeChannelTitle.textContent = 'All Research Channels';\n          activeChannelDesc.textContent = 'A calm, ad-free index of connected ideas, architectural sketches, reading excerpts, and slow-web references.';\n        } else {\n          const ch = CHANNELS.find(c => c.id === activeChannel);\n          activeChannelTitle.textContent = ch.name;\n          activeChannelDesc.textContent = `${ch.desc} Curated by ${ch.author}.`;\n        }\n\n        totalStats.textContent = `${CHANNELS.length} channels \\u2022 ${filtered.length} ${filtered.length === 1 ? 'block' : 'blocks'}`;\n\n        if (filtered.length === 0) {\n          blocksGrid.innerHTML = '';\n          emptyMsg.hidden = false;\n          return;\n        }\n        emptyMsg.hidden = true;\n\n        blocksGrid.innerHTML = filtered.map(b => {\n          const ch = CHANNELS.find(c => c.id === b.channel);\n          let inner = '';\n          if (b.kind === 'diagram' && b.svg) {\n            inner = `<div class=\"block-svg-wrap\">${b.svg}</div>`;\n          } else if (b.kind === 'link') {\n            inner = `\n              <p class=\"block-quote\">${b.body}</p>\n              <span class=\"block-link-url\">LINK &nearr;</span>\n            `;\n          } else {\n            inner = `\n              <p class=\"block-quote\">${b.body}</p>\n              <span class=\"meta-mono\">TEXT BLOCK</span>\n            `;\n          }\n\n          return `\n            <article class=\"block-card\" data-read=\"${b.id}\" tabindex=\"0\" role=\"button\" aria-label=\"Open block: ${b.title}\">\n              <div class=\"block-frame\">${inner}</div>\n              <div class=\"block-caption\">\n                <span class=\"block-title\">${b.title}</span>\n                <div class=\"block-meta\">\n                  <span>${ch ? ch.name : b.channel}</span>\n                  <span class=\"conn-badge\">${b.connections} conn</span>\n                </div>\n              </div>\n            </article>\n          `;\n        }).join('');\n      }\n\n      function openReader(id) {\n        const b = BLOCKS.find(item => item.id === id);\n        if (!b) return;\n        const ch = CHANNELS.find(c => c.id === b.channel);\n        readerTitle.textContent = b.title;\n        readerMeta.textContent = `CHANNEL: ${ch ? ch.name : b.channel}  |  TYPE: ${b.kind.toUpperCase()}  |  ${b.connections} CONNECTIONS  |  ${b.updated}`;\n        if (b.kind === 'diagram' && b.svg) {\n          readerContent.innerHTML = `${b.svg}<p style=\"margin:0.85rem 0 0;\">${b.body}</p>`;\n        } else {\n          readerContent.textContent = b.body;\n        }\n        readerModal.classList.add('open');\n      }\n\n      channelStrip.addEventListener('click', e => {\n        const btn = e.target.closest('[data-chan]');\n        if (!btn) return;\n        activeChannel = btn.dataset.chan;\n        renderChannelStrip();\n        renderBlocks();\n      });\n\n      searchInput.addEventListener('input', e => {\n        query = e.target.value;\n        renderBlocks();\n      });\n\n      blocksGrid.addEventListener('click', e => {\n        const card = e.target.closest('[data-read]');\n        if (card) openReader(card.dataset.read);\n      });\n\n      blocksGrid.addEventListener('keydown', e => {\n        if (e.key === 'Enter' || e.key === ' ') {\n          const card = e.target.closest('[data-read]');\n          if (card) {\n            e.preventDefault();\n            openReader(card.dataset.read);\n          }\n        }\n      });\n\n      function openComposer() {\n        if (activeChannel !== 'ALL') blockChannelSelect.value = activeChannel;\n        composerModal.classList.add('open');\n        document.getElementById('blockTitleInput').focus();\n      }\n\n      function closeComposer() {\n        composerModal.classList.remove('open');\n      }\n\n      function closeReader() {\n        readerModal.classList.remove('open');\n      }\n\n      document.getElementById('openComposerBtn').addEventListener('click', openComposer);\n      document.getElementById('closeComposerBtn').addEventListener('click', closeComposer);\n      document.getElementById('cancelComposerBtn').addEventListener('click', closeComposer);\n      document.getElementById('closeReaderBtn').addEventListener('click', closeReader);\n      document.getElementById('closeReaderFootBtn').addEventListener('click', closeReader);\n\n      composerModal.addEventListener('click', e => { if (e.target === composerModal) closeComposer(); });\n      readerModal.addEventListener('click', e => { if (e.target === readerModal) closeReader(); });\n\n      composerForm.addEventListener('submit', e => {\n        e.preventDefault();\n        const channel = blockChannelSelect.value;\n        const kind = document.getElementById('blockKind').value;\n        const title = document.getElementById('blockTitleInput').value.trim();\n        const body = document.getElementById('blockBodyInput').value.trim();\n        if (!title || !body) return;\n\n        BLOCKS.unshift({\n          id: 'b-' + Date.now(),\n          channel,\n          kind,\n          title,\n          body,\n          connections: 1,\n          updated: 'just now'\n        });\n        composerForm.reset();\n        closeComposer();\n        renderChannelStrip();\n        renderBlocks();\n      });\n\n      document.addEventListener('keydown', e => {\n        if (e.key === 'Escape') {\n          closeComposer();\n          closeReader();\n        }\n      });\n\n      populateChannelSelect();\n      renderChannelStrip();\n      renderBlocks();\n    })();\n  </script>\n</body>\n</html>\n"
}
