.notes-workspace[hidden], .notebook[hidden], .notebook [hidden], #nb-editor[hidden], #notes-sidebar-toggle[hidden] { display: none; }
.notebook { display: grid; flex: 1; min-height: 0; grid-template-columns: 190px 230px minmax(0, 1fr); border: 1px solid var(--line-bright); background: #020702; }
.notebook button, .notebook input, .notebook select, .notebook textarea { font: 12px var(--mono); color: var(--white); }
.notebook button { padding: 7px; border: 1px solid var(--line-bright); background: #071009; cursor: pointer; }
.notebook button:hover, .notebook button:focus-visible { border-color: var(--signal); }
.notebook input, .notebook select, .notebook textarea { padding: 9px; border: 1px solid var(--line-bright); background: #000; }
.notebook label, .notebook h2 { font: 10px var(--mono); color: var(--muted); }
.nb-sidebar, .nb-list-panel, .nb-main { min-width: 0; min-height: 0; padding: 12px; overflow: auto; }
.nb-sidebar, .nb-list-panel { border-right: 1px solid var(--line); }
.nb-sidebar-heading, .nb-list-heading, .nb-editor-actions, .nb-toolbar { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.nb-sidebar-heading { justify-content: space-between; }
.nb-sidebar p, .nb-none, #nb-status, #nb-meta { color: var(--muted); font: 10px/1.5 var(--mono); }
#nb-folders { display: grid; gap: 3px; margin: 14px 0; }
.notebook .nb-folder { text-align: left; border-color: transparent; }
.notebook .nb-folder.is-active, .notebook .nb-tag-button.is-active, .notebook .nb-item.is-active { border-color: var(--signal); background: #19321c; }
#nb-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.nb-list-panel { display: flex; flex-direction: column; gap: 8px; }
.nb-list-panel input { width: 100%; }
#nb-list { flex: 1; overflow: auto; }
.notebook .nb-item { display: grid; width: 100%; gap: 5px; margin-bottom: 5px; padding: 10px; text-align: left; }
.nb-item span, .nb-item small { color: var(--muted); overflow-wrap: anywhere; }
.nb-main { display: flex; flex-direction: column; }
#nb-editor { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 10px; }
#nb-title { width: 100%; border: 0; border-bottom: 1px solid var(--line); font: 24px var(--typewriter); }
.nb-toolbar { border-block: 1px solid var(--line); padding: 6px 0; }
.nb-edit-columns { display: grid; flex: 1; min-height: 250px; grid-template-columns: 1fr 1fr; gap: 10px; }
.nb-edit-columns > div { display: flex; min-width: 0; min-height: 0; flex-direction: column; gap: 6px; }
.nb-edit-columns h2 { margin: 0; }
#nb-body, #nb-preview { flex: 1; width: 100%; min-height: 250px; overflow: auto; }
#nb-body { resize: none; line-height: 1.6; }
#nb-preview { padding: 12px; border: 1px solid var(--line); font: 15px/1.6 var(--typewriter); overflow-wrap: anywhere; }
#nb-preview h2, #nb-preview h3, #nb-preview h4 { color: var(--white); font: bold 1.2em var(--typewriter); }
#nb-preview a { color: var(--signal); }
#nb-preview blockquote { margin-left: 0; padding-left: 12px; border-left: 2px solid var(--signal); }
#nb-preview pre { white-space: pre-wrap; }
.nb-tag { color: var(--signal); }
.nb-checklist { list-style: none; padding-left: 0; }
.nb-checklist .is-done span { text-decoration: line-through; color: var(--muted); }
.nb-embed { margin: 14px 0; border: 1px solid var(--line-bright); }
.nb-embed figcaption { padding: 8px; font: 11px/1.5 var(--mono); }
.nb-embed figcaption span { color: var(--muted); }
.nb-embed iframe { display: block; width: 100%; height: 420px; border: 0; background: white; }
.nb-embed-status { padding: 8px; }
.nb-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#nb-pdf-picker { width: min(600px, 90vw); max-height: 80vh; border: 1px solid var(--signal); background: #020702; color: var(--white); }
#nb-pdf-picker::backdrop { background: #000b; }
#nb-pdf-search { width: 100%; margin: 8px 0; }
#nb-pdf-results { display: grid; gap: 4px; max-height: 50vh; overflow: auto; }
.notebook .nb-pdf-result { text-align: left; }
@media (max-width: 850px) {
  .notebook { grid-template-columns: 150px minmax(0, 1fr); overflow: auto; }
  .nb-sidebar, .nb-list-panel, .nb-main { overflow: visible; }
  .nb-list-panel { max-height: 260px; overflow: auto; }
  .nb-main { grid-column: 1 / -1; border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .nb-edit-columns { grid-template-columns: 1fr; }
  #nb-body, #nb-preview { min-height: 200px; }
  .notebook { grid-template-columns: 120px minmax(0, 1fr); }
}
