svg.lucide { fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; }
.mobile-only,.mobile-legal { display:none !important; }
.workspace { isolation:isolate; }
.sidebar { width:clamp(225px,19vw,286px); }
.brand-row { min-height:60px; }
.explorer-head h2 { font-size:.875rem; }
.tree { overscroll-behavior:contain; }
.folder { font-weight:550; }
.folder .counter,.sidebar-bottom .counter { margin-left:auto; }
.counter,.tree-empty,.dim { color:var(--muted); font-weight:400; }
.counter { font:11px/1.4 var(--mono); padding-right:5px; }
.tree-item { min-height:33px; width:100%; padding-inline:4px; }
.tree-row.child { margin-left:19px; padding-left:9px; border-left:1px solid var(--line); border-radius:0 4px 4px 0; }
.tree-item > .lucide { width:15px; }
.tree .disclosure { width:11px; }
.legal { display:flex; gap:14px; padding:13px 8px; border-top:1px solid var(--line); margin-top:7px; }
.legal a,.mobile-legal a { color:var(--muted); font-size:.75rem; text-decoration:none; }
.legal a:hover,.mobile-legal a:hover { color:var(--accent); text-decoration:underline; }
.workspace-header { min-height:60px; }
.space-select { color:var(--ink); font-weight:550; padding:4px 6px; }
.space-select > .lucide:first-child { color:var(--accent); }
.space-select > .lucide:last-child { width:12px; }
.crumbs { flex:1 1 auto; }
.header-button,.toolbar-link { background:transparent; border-color:transparent; color:var(--secondary); min-height:32px; }
.header-button { font-size:.8rem; }
.tabs { min-height:38px; }
.tab { padding:0 4px; }
.tab .icon-btn { width:22px; }
.tab button { min-height:32px; }
.editor-toolbar { min-height:48px; }
.mode { border:1px solid transparent; background:transparent; color:var(--muted); font-size:.8rem; min-height:32px; padding:5px 10px; }
.mode.selected { background:var(--accent-quiet); color:var(--accent); }
.mode svg { width:15px; }
.toolbar-info { padding-right:4px; font-size:.75rem; color:var(--muted); }
.content { flex:1; min-height:0; overflow:auto; scrollbar-width:thin; scrollbar-color:var(--line) transparent; }
.content:focus { outline:none; }
.document { width:min(100%,850px); margin:auto; padding:clamp(28px,5vh,58px) clamp(22px,5vw,73px) 65px; overflow-wrap:anywhere; }
.doc-kind { color:var(--muted); display:flex; align-items:center; gap:8px; font-size:.79rem; }
.doc-kind .lucide { width:15px; color:var(--accent); }
.document h1 { font-size:clamp(2rem,4vw,3.35rem); font-weight:560; margin-top:12px; line-height:1.04; letter-spacing:-.05em; }
.latin { font-family:Georgia,serif; font-size:1.17rem; margin-top:8px; font-style:italic; color:var(--muted); }
.lead { font-size:1.07rem; line-height:1.65; color:var(--secondary); max-width:67ch; margin-top:19px; }
.document-head { padding-bottom:23px; border-bottom:1px solid var(--line); }
.prose { line-height:1.74; max-width:74ch; }
.prose > * { margin:15px 0 0; }
.prose h1,.prose h2,.prose h3,.prose h4 { margin:26px 0 8px; font-size:1.28rem; font-weight:550; line-height:1.35; letter-spacing:-.025em; }
.prose h3,.prose h4 { font-size:1.04rem; }
.prose p,.prose ul,.prose ol,.prose td { color:var(--secondary); }
.prose ul,.prose ol { padding-left:22px; }
.prose a { text-underline-offset:3px; }
.prose blockquote { margin-left:0; padding-left:12px; border-left:3px solid var(--accent); }
.prose pre { padding:14px; background:var(--sidebar); font: .85rem/1.6 var(--mono); overflow-x:auto; }
.prose table { border-collapse:collapse; display:block; overflow-x:auto; }
.prose th,.prose td { padding:8px; border:1px solid var(--line); text-align:left; }
.prose code { font: .88em/1.5 var(--mono); color:var(--accent); }
.relations { margin-top:26px; border-top:1px solid var(--line); padding-top:16px; }
.relations h2,.sources summary { font-size:.84rem; color:var(--muted); }
.links { display:flex; gap:8px; flex-wrap:wrap; margin-top:9px; }
.links a { display:inline-flex; align-items:center; gap:7px; padding:5px 10px; border:1px solid var(--line); border-radius:5px; text-decoration:none; font-size:.82rem; }
.links a:hover { background:var(--accent-quiet); }
.links .lucide { width:13px; }
.sources { margin-top:20px; font-size:.82rem; color:var(--secondary); }
.sources summary { cursor:pointer; }
.sources a { display:block; width:fit-content; margin:4px 0; }
.art { margin:20px 0 0; }
.art img { display:block; max-width:100%; width:auto; max-height:270px; border-radius:5px; object-fit:contain; }
.art figcaption { font-size:.72rem; color:var(--muted); margin-top:4px; }
.art a { color:inherit; }
.details { width:clamp(195px,17vw,255px); }
.details > header,.details h2 { min-height:48px; }
.details h2 { display:flex; align-items:center; }
.details .detail-row { padding-inline:0; }
.details .detail-row svg { color:var(--accent); }
.details h3 { margin-bottom:10px; }
.details h3 .small-count { color:var(--muted); background:var(--raised); border-radius:3px; font-size:11px; padding:0 5px; }
.editor-status { min-height:34px; }
.editor-status .mobile-legal { margin-left:auto; }
.editor-status #doc-count { margin-left:auto; }
.editor-form { display:grid; gap:17px; width:min(100%,850px); margin:auto; padding:25px clamp(18px,4vw,52px) 55px; }
.editor-form .two { display:grid; align-items:start; gap:14px; grid-template-columns:1.5fr 1fr; }
.editor-form textarea { resize:vertical; line-height:1.55; }
.editor-form textarea.body { min-height:35vh; font: .92rem/1.6 var(--mono); }
.editor-form .hint,.dialog-hint { font-size:.8rem; color:var(--muted); }
.editor-form .hint { margin-top:5px; }
.editor-form .actions { justify-content:space-between; }
.editor-form .actions button { flex:none; }
#modal-body .list { margin-top:12px; max-height:57vh; overflow-y:auto; }
.search-item { display:flex; width:100%; justify-content:flex-start; text-align:left; gap:10px; padding:9px 8px; border:0; background:transparent; color:var(--ink); }
.search-item.active { background:var(--accent-quiet); }
.search-item .lucide { color:var(--accent); }
.search-item small { color:var(--muted); display:block; font-size:.73rem; font-weight:400; }
.search-item .row-text { min-width:0; overflow-wrap:anywhere; }
.search-item .check { margin-left:auto; }
.search-item strong { font-weight:550; }
.dialog-hint { margin-top:4px; }
.dialog-info { color:var(--secondary); line-height:1.6; margin-bottom:12px; }
.loading { margin:40px; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap; }
#scrim { display:none; }
@media(max-width:1150px) {
  .sidebar { width:218px; }
  .details { position:absolute; z-index:4; inset:0 0 0 auto; width:250px; box-shadow:-10px 0 28px rgb(0 0 0/.25); }
}
@media(max-width:720px) {
  .mobile-only,.mobile-legal { display:inline-flex !important; }
  .mobile-legal { gap:10px; }
  .mobile-legal a { font-family:var(--sans); font-size:.71rem; }
  #doc-count,.crumb-more,.toolbar-info { display:none; }
  .workspace-header { padding:5px 9px; min-height:53px; gap:3px; }
  .crumbs { gap:2px; }
  .workspace-actions { gap:0; }
  .space-select { max-width:43vw; font-size:.85rem; }
  .space-select > svg:first-child { display:none; }
  .header-button { padding:5px 7px; }
  .header-button > span { display:none; }
  .editor-toolbar { padding:4px 10px; min-height:43px; }
  .sidebar { position:fixed; z-index:8; inset:0 auto 0 0; width:min(300px,85vw); visibility:hidden; transform:translateX(-100%); }
  .sidebar.open { visibility:visible; transform:none; }
  #scrim:not([hidden]) { display:block; position:fixed; z-index:7; inset:0; width:100%; height:100dvh; border:0; border-radius:0; background:rgb(0 0 0/.58); }
  .tree-row,.tree-item { min-height:39px; }
  .document { padding:26px 21px 45px; }
  .document h1 { margin-top:10px; }
  .editor-status { gap:8px; padding-inline:10px; }
  .tabs { min-height:35px; }
  .editor-form .two { grid-template-columns:1fr; }
}
.document { container-type:inline-size; display:flow-root; }
@container (min-width:540px) {
  .art { float:right; width:clamp(170px,35cqw,254px); margin:23px 0 16px 27px; }
  .art img { width:100%; max-height:none; }
  .art figcaption { line-height:1.45; margin-top:7px; }
  .relations,.sources { clear:both; }
}
