{
  "id": 127,
  "slug": "three-pane-inspector",
  "name": "Three-Pane Master-Detail-Inspector",
  "kind": "ui",
  "family": "Workspace & Editor",
  "sourceSite": {
    "name": "Ulysses",
    "url": "https://ulysses.app/",
    "verifiedStatus": 200
  },
  "tagline": "Four-column tag, list, live editor, and collapsible inspector workspace that flattens into a drill-down stack on mobile.",
  "whyUnique": "Balances broad taxonomy browsing, sibling document scanning, distraction-free serif editing, and live outline/backlink inspection while promoting each pane cleanly to a full-bleed mobile screen.",
  "theme": "light",
  "mobileStrength": "native-first",
  "tags": [
    "three-pane",
    "master-detail",
    "inspector",
    "notes-workspace",
    "drill-down",
    "editorial"
  ],
  "bestFor": [
    "Knowledge bases and Markdown note apps",
    "Technical documentation workspaces",
    "Editorial CMS and manuscript tools",
    "CRM or research libraries with metadata rails"
  ],
  "palette": [
    {
      "role": "canvas",
      "hex": "#FBFAF8",
      "name": "Warm Snow"
    },
    {
      "role": "surface",
      "hex": "#FFFFFF",
      "name": "Pure Paper"
    },
    {
      "role": "ink",
      "hex": "#23201D",
      "name": "Charcoal Ink"
    },
    {
      "role": "accent",
      "hex": "#D94141",
      "name": "Bear Crimson"
    },
    {
      "role": "muted",
      "hex": "#766F66",
      "name": "Warm Taupe"
    }
  ],
  "typography": {
    "display": "Newsreader",
    "body": "Inter",
    "mono": "JetBrains Mono",
    "googleFontsUrl": "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Newsreader:wght@600;700&display=swap",
    "scaleNotes": "26px serif document title, 16px/1.7 editorial prose measure, 13px sans navigation rails, 11px mono metadata counters."
  },
  "layoutNotes": "CSS Grid 220px tag rail + 280px note list + fluid editor + toggleable 250px inspector on desktop; deterministic single-pane state machine on viewports <=960px.",
  "interactionNotes": "Editing prose updates word count, read time, paragraph count, and clickable #heading outline anchors in real time; backlinks jump directly between related notes.",
  "mobileNotes": "Transforms the four horizontal panes into a native-feeling Tags -> Notes -> Editor -> Inspector drill-down stack with explicit >=44px Back buttons in the top bar.",
  "agentGuardrails": {
    "do": [
      "Collapse multi-pane layouts into a deterministic drill-down stack below 960px instead of squeezing columns.",
      "Keep the right inspector rail optional/toggleable so desktop editors can reclaim focus width.",
      "Update outline and word metrics synchronously as the user types."
    ],
    "dont": [
      "Never force horizontal scrolling across three panes on a 390px viewport.",
      "Avoid hiding the Back navigation button behind an ambiguous icon on mobile."
    ]
  },
  "demoFile": "demos/three-pane-inspector.html",
  "thumbDesktop": "thumbs/three-pane-inspector-desktop.webp",
  "thumbMobile": "thumbs/three-pane-inspector-mobile.webp",
  "urls": {
    "page": "https://templates.michaelpitts.net/t/three-pane-inspector",
    "markdown": "https://templates.michaelpitts.net/t/three-pane-inspector.md",
    "api": "https://templates.michaelpitts.net/api/templates/three-pane-inspector",
    "demo": "https://templates.michaelpitts.net/demos/three-pane-inspector.html",
    "thumbDesktop": "https://templates.michaelpitts.net/thumbs/three-pane-inspector-desktop.webp",
    "thumbMobile": "https://templates.michaelpitts.net/thumbs/three-pane-inspector-mobile.webp"
  },
  "agentPrompt": "Design & build using template #127 \"Three-Pane Master-Detail-Inspector\" (ui / Workspace & Editor, light theme).\nFull AI blueprint & standalone starter code: https://templates.michaelpitts.net/t/three-pane-inspector.md\nLive demo: https://templates.michaelpitts.net/demos/three-pane-inspector.html\nReal-world inspiration: Ulysses (https://ulysses.app/)\n\nCore aesthetic: Balances broad taxonomy browsing, sibling document scanning, distraction-free serif editing, and live outline/backlink inspection while promoting each pane cleanly to a full-bleed mobile screen.\nPalette: canvas: #FBFAF8 (Warm Snow), surface: #FFFFFF (Pure Paper), ink: #23201D (Charcoal Ink), accent: #D94141 (Bear Crimson), muted: #766F66 (Warm Taupe)\nTypography: Display=\"Newsreader\", Body=\"Inter\", Mono=\"JetBrains Mono\"\nLayout: CSS Grid 220px tag rail + 280px note list + fluid editor + toggleable 250px inspector on desktop; deterministic single-pane state machine on viewports <=960px.\nInteractions: Editing prose updates word count, read time, paragraph count, and clickable #heading outline anchors in real time; backlinks jump directly between related notes.\nMobile: Transforms the four horizontal panes into a native-feeling Tags -> Notes -> Editor -> Inspector drill-down stack with explicit >=44px Back buttons in the top bar.\n\nGuardrails:\n- DO: Collapse multi-pane layouts into a deterministic drill-down stack below 960px instead of squeezing columns.\n- DO: Keep the right inspector rail optional/toggleable so desktop editors can reclaim focus width.\n- DO: Update outline and word metrics synchronously as the user types.\n- DON'T: Never force horizontal scrolling across three panes on a 390px viewport.\n- DON'T: Avoid hiding the Back navigation button behind an ambiguous icon on mobile.",
  "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>Three-Pane Master-Detail-Inspector — Bear-Inspired Pattern</title>\n<style>\n  :root {\n    --canvas: #fbfaf8;\n    --sidebar: #f3f1ec;\n    --list: #f8f7f4;\n    --surface: #ffffff;\n    --border: #e5e1d8;\n    --ink: #23201d;\n    --muted: #766f66;\n    --accent: #d94141;\n    --accent-soft: rgba(217,65,65,0.1);\n    --font: -apple-system, BlinkMacSystemFont, \"Inter\", \"Segoe UI\", sans-serif;\n    --serif: Georgia, \"Iowan Old Style\", \"Palatino Linotype\", serif;\n    --mono: ui-monospace, \"SF Mono\", Menlo, monospace;\n  }\n  * { box-sizing: border-box; margin: 0; padding: 0; }\n  html, body { height: 100%; background: var(--canvas); color: var(--ink); font-family: var(--font); overflow-x: hidden; }\n  .app {\n    display: grid;\n    grid-template-columns: 220px 280px 1fr 250px;\n    height: 100vh;\n    min-height: 580px;\n  }\n  .app.inspector-hidden { grid-template-columns: 220px 280px 1fr 0px; }\n  .pane {\n    display: flex;\n    flex-direction: column;\n    min-width: 0;\n    border-right: 1px solid var(--border);\n    overflow: hidden;\n  }\n  .pane:last-child { border-right: none; }\n  .pane-tags { background: var(--sidebar); }\n  .pane-list { background: var(--list); }\n  .pane-editor { background: var(--surface); }\n  .pane-inspector { background: var(--sidebar); transition: opacity .15s; }\n  .app.inspector-hidden .pane-inspector { opacity: 0; pointer-events: none; border: none; }\n\n  .pane-head {\n    min-height: 52px;\n    padding: 8px 14px;\n    border-bottom: 1px solid var(--border);\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 8px;\n    flex-shrink: 0;\n  }\n  .pane-title { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: var(--muted); text-transform: uppercase; }\n  .icon-btn {\n    min-height: 40px; min-width: 40px;\n    padding: 0 10px;\n    border-radius: 9px;\n    border: 1px solid var(--border);\n    background: var(--surface);\n    color: var(--ink);\n    font: 600 13px var(--font);\n    cursor: pointer;\n    display: inline-flex; align-items: center; justify-content: center; gap: 6px;\n  }\n  .icon-btn:hover { border-color: var(--accent); color: var(--accent); }\n  .icon-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }\n  .mobile-back { display: none; }\n\n  .scroll { flex: 1; overflow-y: auto; padding: 10px; }\n  .tag-btn {\n    width: 100%;\n    min-height: 44px;\n    padding: 8px 12px;\n    border-radius: 9px;\n    border: none;\n    background: transparent;\n    color: var(--ink);\n    font: 500 14px var(--font);\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    cursor: pointer;\n    margin-bottom: 2px;\n  }\n  .tag-btn.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }\n  .tag-count { font: 600 11px var(--mono); color: var(--muted); }\n\n  .search-box {\n    width: 100%;\n    min-height: 38px;\n    padding: 6px 10px;\n    border-radius: 8px;\n    border: 1px solid var(--border);\n    background: var(--surface);\n    color: var(--ink);\n    font: 14px var(--font);\n    margin-bottom: 10px;\n  }\n  .note-card {\n    width: 100%;\n    text-align: left;\n    padding: 12px;\n    border-radius: 10px;\n    border: 1px solid transparent;\n    background: transparent;\n    cursor: pointer;\n    margin-bottom: 6px;\n    font-family: var(--font);\n  }\n  .note-card.active { background: var(--surface); border-color: var(--border); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }\n  .note-card-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }\n  .note-card-excerpt { font-size: 12px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }\n  .note-card-meta { margin-top: 6px; font: 500 11px var(--mono); color: var(--muted); display: flex; justify-content: space-between; }\n\n  .editor-wrap { flex: 1; overflow-y: auto; padding: 28px 34px; max-width: 720px; width: 100%; margin: 0 auto; }\n  .editor-title {\n    width: 100%;\n    border: none;\n    outline: none;\n    background: transparent;\n    font: 700 26px/1.25 var(--serif);\n    color: var(--ink);\n    margin-bottom: 14px;\n  }\n  .editor-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }\n  .pill { font: 600 12px var(--mono); padding: 4px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }\n  .editor-body {\n    width: 100%;\n    min-height: 360px;\n    border: none;\n    outline: none;\n    resize: none;\n    background: transparent;\n    font: 16px/1.7 var(--serif);\n    color: var(--ink);\n  }\n\n  .insp-section { margin-bottom: 18px; }\n  .insp-label { font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; }\n  .stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }\n  .stat { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 10px; }\n  .stat-n { font: 700 18px var(--mono); color: var(--ink); }\n  .stat-l { font-size: 11px; color: var(--muted); margin-top: 2px; }\n  .outline-item, .backlink-item {\n    display: block; width: 100%; text-align: left;\n    padding: 8px 10px; border-radius: 8px; border: none;\n    background: var(--surface); color: var(--ink); font-size: 13px;\n    margin-bottom: 6px; cursor: pointer; border: 1px solid var(--border);\n  }\n  .outline-item:hover, .backlink-item:hover { border-color: var(--accent); color: var(--accent); }\n\n  @media (max-width: 960px) {\n    .app, .app.inspector-hidden {\n      display: block;\n      position: relative;\n      height: 100vh;\n    }\n    .pane {\n      position: absolute;\n      inset: 0;\n      border-right: none;\n      display: none;\n    }\n    .app[data-mobile-view=\"tags\"] .pane-tags { display: flex; }\n    .app[data-mobile-view=\"list\"] .pane-list { display: flex; }\n    .app[data-mobile-view=\"editor\"] .pane-editor { display: flex; }\n    .app[data-mobile-view=\"inspector\"] .pane-inspector { display: flex; opacity: 1; pointer-events: auto; }\n    .mobile-back { display: inline-flex; }\n    .editor-wrap { padding: 18px 16px; }\n  }\n</style>\n</head>\n<body>\n<div class=\"app\" id=\"app\" data-mobile-view=\"list\">\n  <aside class=\"pane pane-tags\" aria-label=\"Notebooks and Tags\">\n    <div class=\"pane-head\">\n      <span class=\"pane-title\">Library</span>\n      <button class=\"icon-btn primary\" id=\"newNoteBtn1\" type=\"button\" title=\"New Note\">+ Note</button>\n    </div>\n    <div class=\"scroll\" id=\"tagList\"></div>\n  </aside>\n\n  <section class=\"pane pane-list\" aria-label=\"Notes List\">\n    <div class=\"pane-head\">\n      <button class=\"icon-btn mobile-back\" data-go=\"tags\" type=\"button\">← Tags</button>\n      <span class=\"pane-title\" id=\"listHeading\">All Notes</span>\n      <button class=\"icon-btn\" id=\"newNoteBtn2\" type=\"button\">+</button>\n    </div>\n    <div class=\"scroll\">\n      <input class=\"search-box\" id=\"noteSearch\" type=\"search\" placeholder=\"Filter notes...\">\n      <div id=\"noteList\"></div>\n    </div>\n  </section>\n\n  <main class=\"pane pane-editor\" aria-label=\"Note Editor\">\n    <div class=\"pane-head\">\n      <button class=\"icon-btn mobile-back\" data-go=\"list\" type=\"button\">← Notes</button>\n      <span class=\"pane-title\" id=\"saveStatus\">Saved locally</span>\n      <button class=\"icon-btn\" id=\"toggleInspectorBtn\" type=\"button\">Inspector ⓘ</button>\n    </div>\n    <div class=\"editor-wrap\">\n      <input class=\"editor-title\" id=\"edTitle\" type=\"text\" aria-label=\"Note title\">\n      <div class=\"editor-tags\" id=\"edTags\"></div>\n      <textarea class=\"editor-body\" id=\"edBody\" aria-label=\"Note body\"></textarea>\n    </div>\n  </main>\n\n  <aside class=\"pane pane-inspector\" aria-label=\"Document Inspector\">\n    <div class=\"pane-head\">\n      <button class=\"icon-btn mobile-back\" data-go=\"editor\" type=\"button\">← Editor</button>\n      <span class=\"pane-title\">Inspector</span>\n      <span style=\"width:24px;\"></span>\n    </div>\n    <div class=\"scroll\">\n      <div class=\"insp-section\">\n        <div class=\"insp-label\">Metrics</div>\n        <div class=\"stat-grid\">\n          <div class=\"stat\"><div class=\"stat-n\" id=\"stWords\">0</div><div class=\"stat-l\">Words</div></div>\n          <div class=\"stat\"><div class=\"stat-n\" id=\"stRead\">1m</div><div class=\"stat-l\">Read Time</div></div>\n          <div class=\"stat\"><div class=\"stat-n\" id=\"stChars\">0</div><div class=\"stat-l\">Chars</div></div>\n          <div class=\"stat\"><div class=\"stat-n\" id=\"stParas\">0</div><div class=\"stat-l\">Paragraphs</div></div>\n        </div>\n      </div>\n      <div class=\"insp-section\">\n        <div class=\"insp-label\">Document Outline</div>\n        <div id=\"outlineList\"></div>\n      </div>\n      <div class=\"insp-section\">\n        <div class=\"insp-label\">Backlinks</div>\n        <div id=\"backlinkList\"></div>\n      </div>\n    </div>\n  </aside>\n</div>\n\n<script>\nconst NOTES = [\n  {\n    id: 'n1',\n    title: 'Field Guide to Responsive Three-Pane Layouts',\n    tags: ['#architecture', '#design-systems'],\n    updated: 'Today 09:40',\n    backlinks: ['n2', 'n4'],\n    body: `# Core Spatial Contract\\nA three-pane workspace balances navigation breadth, scannable sibling context, and deep reading focus without modal interruptions.\\n\\n# Desktop Behavior\\nAt 1280px, the tag rail stays fixed at 220px, the note list holds 280px, and the editor claims fluid center space. The inspector rail collapses cleanly on demand.\\n\\n# Mobile Drill-Down Stack\\nBelow 960px, horizontal compression breaks legibility. Instead, each pane promotes to a full-bleed viewport layer with deterministic Back navigation and >=44px touch targets.`\n  },\n  {\n    id: 'n2',\n    title: 'Typography Scale for Long-Form Technical Notes',\n    tags: ['#design-systems', '#writing'],\n    updated: 'Yesterday',\n    backlinks: ['n1'],\n    body: `# Measure & Rhythm\\nKeep prose between 60 and 72 characters per line. Pairing a humanist serif for body prose with a crisp geometric sans for chrome creates instant figure-ground separation.\\n\\n# Heading Anchors\\nMarkdown-style # headings automatically populate the live Inspector outline so readers can scan structure in milliseconds.`\n  },\n  {\n    id: 'n3',\n    title: 'Q3 Sync Engine Latency Audit',\n    tags: ['#engineering', '#architecture'],\n    updated: 'Dec 02',\n    backlinks: ['n4'],\n    body: `# Observed Bottlenecks\\nCRDT merge payloads spiked during bulk tag renames across 12,000 notes.\\n\\n# Mitigation Plan\\nBatch tag index deltas into 250ms micro-frames and stream only dirty note headers to mobile clients.`\n  },\n  {\n    id: 'n4',\n    title: 'Offline-First Conflict Resolution Notes',\n    tags: ['#engineering', '#writing'],\n    updated: 'Nov 28',\n    backlinks: ['n1', 'n3'],\n    body: `# Local Truth\\nEvery keystroke commits to IndexedDB before hitting the sync worker. The status badge reflects local durability rather than network round-trips.\\n\\n# Conflict Merging\\nPrefer non-destructive side-by-side copies whenever two devices edit the same paragraph offline.`\n  }\n];\n\nlet activeTag = 'all';\nlet activeNoteId = 'n1';\n\nconst app = document.getElementById('app');\nconst tagList = document.getElementById('tagList');\nconst noteList = document.getElementById('noteList');\nconst noteSearch = document.getElementById('noteSearch');\nconst edTitle = document.getElementById('edTitle');\nconst edTags = document.getElementById('edTags');\nconst edBody = document.getElementById('edBody');\nconst listHeading = document.getElementById('listHeading');\n\nfunction renderTags() {\n  const counts = {};\n  NOTES.forEach(n => n.tags.forEach(t => counts[t] = (counts[t] || 0) + 1));\n  const items = [['all', 'All Notes', NOTES.length], ...Object.entries(counts).map(([t, c]) => [t, t, c])];\n  tagList.innerHTML = items.map(([k, label, c]) => `\n    <button type=\"button\" class=\"tag-btn ${activeTag === k ? 'active' : ''}\" data-tag=\"${k}\">\n      <span>${label}</span><span class=\"tag-count\">${c}</span>\n    </button>\n  `).join('');\n  tagList.querySelectorAll('.tag-btn').forEach(btn => {\n    btn.addEventListener('click', () => {\n      activeTag = btn.dataset.tag;\n      listHeading.textContent = activeTag === 'all' ? 'All Notes' : activeTag;\n      renderTags();\n      renderNotes();\n      if (window.innerWidth <= 960) app.dataset.mobileView = 'list';\n    });\n  });\n}\n\nfunction renderNotes() {\n  const q = noteSearch.value.trim().toLowerCase();\n  const visible = NOTES.filter(n =>\n    (activeTag === 'all' || n.tags.includes(activeTag)) &&\n    (!q || n.title.toLowerCase().includes(q) || n.body.toLowerCase().includes(q))\n  );\n  noteList.innerHTML = visible.map(n => `\n    <button type=\"button\" class=\"note-card ${n.id === activeNoteId ? 'active' : ''}\" data-id=\"${n.id}\">\n      <div class=\"note-card-title\">${n.title || 'Untitled Note'}</div>\n      <div class=\"note-card-excerpt\">${n.body.replace(/^#+\\s*/gm, '')}</div>\n      <div class=\"note-card-meta\"><span>${n.tags[0] || '#inbox'}</span><span>${n.updated}</span></div>\n    </button>\n  `).join('') || `<div style=\"padding:20px;color:var(--muted);font-size:13px;\">No matching notes.</div>`;\n\n  noteList.querySelectorAll('.note-card').forEach(card => {\n    card.addEventListener('click', () => {\n      activeNoteId = card.dataset.id;\n      renderNotes();\n      loadEditor();\n      if (window.innerWidth <= 960) app.dataset.mobileView = 'editor';\n    });\n  });\n}\n\nfunction loadEditor() {\n  const note = NOTES.find(n => n.id === activeNoteId) || NOTES[0];\n  if (!note) return;\n  edTitle.value = note.title;\n  edBody.value = note.body;\n  edTags.innerHTML = note.tags.map(t => `<span class=\"pill\">${t}</span>`).join('');\n  updateInspector(note);\n}\n\nfunction updateInspector(note) {\n  const text = `${note.title}\\n${note.body}`.trim();\n  const words = text ? text.split(/\\s+/).length : 0;\n  document.getElementById('stWords').textContent = words;\n  document.getElementById('stChars').textContent = note.body.length;\n  document.getElementById('stRead').textContent = `${Math.max(1, Math.ceil(words / 220))}m`;\n  document.getElementById('stParas').textContent = note.body.split(/\\n\\s*\\n/).filter(Boolean).length;\n\n  const headings = note.body.split('\\n').filter(l => /^#\\s+/.test(l)).map(l => l.replace(/^#\\s+/, ''));\n  document.getElementById('outlineList').innerHTML = headings.length\n    ? headings.map(h => `<button type=\"button\" class=\"outline-item\" data-h=\"${h}\">§ ${h}</button>`).join('')\n    : `<div style=\"font-size:12px;color:var(--muted);\">Add a line starting with # to build an outline.</div>`;\n\n  document.querySelectorAll('.outline-item').forEach(btn => {\n    btn.addEventListener('click', () => {\n      const pos = edBody.value.indexOf('# ' + btn.dataset.h);\n      if (pos >= 0) {\n        if (window.innerWidth <= 960) app.dataset.mobileView = 'editor';\n        edBody.focus();\n        edBody.setSelectionRange(pos, pos + btn.dataset.h.length + 2);\n      }\n    });\n  });\n\n  const links = (note.backlinks || []).map(id => NOTES.find(n => n.id === id)).filter(Boolean);\n  document.getElementById('backlinkList').innerHTML = links.length\n    ? links.map(l => `<button type=\"button\" class=\"backlink-item\" data-id=\"${l.id}\">↗ ${l.title}</button>`).join('')\n    : `<div style=\"font-size:12px;color:var(--muted);\">No backlinks yet.</div>`;\n\n  document.querySelectorAll('.backlink-item').forEach(btn => {\n    btn.addEventListener('click', () => {\n      activeNoteId = btn.dataset.id;\n      renderNotes();\n      loadEditor();\n      if (window.innerWidth <= 960) app.dataset.mobileView = 'editor';\n    });\n  });\n}\n\nfunction saveEdits() {\n  const note = NOTES.find(n => n.id === activeNoteId);\n  if (!note) return;\n  note.title = edTitle.value;\n  note.body = edBody.value;\n  note.updated = 'Just now';\n  document.getElementById('saveStatus').textContent = 'Edited just now';\n  renderNotes();\n  updateInspector(note);\n}\n\nedTitle.addEventListener('input', saveEdits);\nedBody.addEventListener('input', saveEdits);\nnoteSearch.addEventListener('input', renderNotes);\n\ndocument.getElementById('toggleInspectorBtn').addEventListener('click', () => {\n  if (window.innerWidth <= 960) {\n    app.dataset.mobileView = 'inspector';\n  } else {\n    app.classList.toggle('inspector-hidden');\n  }\n});\n\ndocument.querySelectorAll('.mobile-back').forEach(btn => {\n  btn.addEventListener('click', () => { app.dataset.mobileView = btn.dataset.go; });\n});\n\nfunction createNote() {\n  const id = 'n' + (NOTES.length + 1);\n  const tag = activeTag === 'all' ? '#inbox' : activeTag;\n  NOTES.unshift({\n    id,\n    title: 'Untitled Research Note',\n    tags: [tag],\n    updated: 'Just now',\n    backlinks: ['n1'],\n    body: '# Overview\\nStart capturing thoughts here. Word counts and outline headings update live in the Inspector.'\n  });\n  activeNoteId = id;\n  renderTags();\n  renderNotes();\n  loadEditor();\n  if (window.innerWidth <= 960) app.dataset.mobileView = 'editor';\n  edTitle.focus();\n  edTitle.select();\n}\ndocument.getElementById('newNoteBtn1').addEventListener('click', createNote);\ndocument.getElementById('newNoteBtn2').addEventListener('click', createNote);\n\nrenderTags();\nrenderNotes();\nloadEditor();\n</script>\n</body>\n</html>\n"
}
