:root{--bg:#f8f7f1;--ink:#303d34;--muted:#7b8074;--line:#e3e5d9;--sage:#5c7762;--terracotta:#bd795e;--blue:#678a9f;--panel:#fdfcf8}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;height:100vh;overflow:hidden}button,input,textarea,select{font:inherit}button{cursor:pointer;color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid #97ad85;outline-offset:3px}button{border:0;background:transparent}button:hover{filter:brightness(.93)}.sidebar{width:235px;position:fixed;inset:0 auto 0 0;border-right:1px solid var(--line);padding:30px 23px;background:#eeefe6;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:10px;font-family:Georgia,serif;font-size:32px;letter-spacing:-1.6px;text-decoration:none;color:var(--ink);font-weight:bold}.brand-mark{font-size:39px;font-weight:normal;color:var(--sage)}.brand-dot{color:var(--terracotta)}.eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:650;color:var(--muted)}.project-label{margin-top:42px;font-size:9px}h1{font:normal 27px/1.2 Georgia,serif;letter-spacing:-.6px;margin:15px 0 12px}.sidebar-intro{font-size:12px;color:#777e71;line-height:1.7;margin-bottom:30px}.nav{display:flex;align-items:center;text-align:left;gap:11px;font-size:12px;padding:12px 10px;margin:2px -3px;border-radius:7px}.nav>span:first-child{font-size:19px;width:21px}.nav.active{background:#dfe5d6;font-weight:600;color:#395442}.nav-count{margin-left:auto;font-size:10px;opacity:.7}.sidebar-divider{height:1px;background:#d9dfd0;margin:26px 0}.domain-filter{width:100%;display:flex;align-items:center;gap:10px;text-align:left;padding:13px 0;font-size:12px}.dot{display:inline-block;border-radius:50%;width:8px;height:8px;background:var(--domain)}.domain-filter small{margin-left:auto;font-size:10px;color:var(--muted)}.domain-filter.off{opacity:.4}.domain-filter.off .dot{background:transparent;border:1px solid var(--domain)}.filter-note{font-size:10px;line-height:1.6;color:#737a6c;margin-top:8px}.sidebar-bottom{margin-top:auto;padding-top:20px}.local-indicator{display:flex;align-items:center;gap:7px;font-size:10px;color:#68765d}.local-indicator i,.canvas-badge i{width:5px;height:5px;border-radius:50%;background:#78966a}.backup-actions{display:flex;justify-content:space-between;margin:13px -4px 17px}.backup-actions button{font-size:10px;padding:3px}.help-button{border-top:1px solid #d9dfd0;width:100%;padding:17px 0 0;text-align:left;font-size:15px}.help-button span{font-size:11px;margin-left:6px}main{position:relative;height:100vh;margin-left:235px;margin-right:326px;display:flex;flex-direction:column;padding:0 30px;min-width:400px}header{height:79px;min-height:79px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:15px}.breadcrumb{font-size:9px;letter-spacing:1px;white-space:nowrap;color:#838679}.breadcrumb span{margin:0 10px;color:#b4b8aa}.breadcrumb strong{font-weight:500;color:#4f5d4f;font-size:10px;letter-spacing:0}.back-button{font-size:11px;padding:7px;white-space:nowrap}.back-button:disabled{opacity:.3;cursor:default}.search{margin-left:auto;display:flex;align-items:center;gap:8px;width:245px;color:#7b8275}.search>span{font-size:24px}.search input{min-width:0;width:100%;font-size:11px;background:transparent;border:0;outline:0}.search kbd{font:10px monospace;border:1px solid #d9ddce;border-radius:3px;padding:3px 6px}.search-results{position:absolute;top:65px;right:30px;z-index:30;width:370px;max-height:440px;overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 40px #303d3420;padding:10px}.search-results button{display:block;text-align:left;width:100%;padding:11px;border-radius:5px}.search-results button:hover{background:#edf0e7}.search-results small{display:block;font-size:10px;color:var(--muted);margin-bottom:4px}.canvas-heading{display:flex;align-items:center;justify-content:space-between;padding:28px 0 22px;gap:12px}.canvas-heading h2{font:normal 35px/1.1 Georgia,serif;letter-spacing:-1px;margin:10px 0}.canvas-heading h2 span{color:var(--terracotta)}.canvas-heading p{font-size:11px;color:#7c8274;margin:0;line-height:1.7}.outline-button{border:1px solid #daddcf;padding:10px 12px;border-radius:6px;font-size:15px;white-space:nowrap}.outline-button span{font-size:10px;margin-left:5px}.workspace{flex:1;min-height:0;position:relative;background-color:#faf9f3;background-image:radial-gradient(#bcc6ad80 .65px,transparent .65px);background-size:18px 18px;border:1px solid #e0e4d5;border-radius:12px;overflow:hidden}.canvas-top{position:absolute;top:17px;left:20px;right:20px;display:flex;justify-content:space-between;align-items:center;z-index:2;pointer-events:none}.canvas-top>*{pointer-events:auto}.canvas-badge{display:flex;align-items:center;gap:8px;font-size:8px;letter-spacing:1.3px;color:#7e8677}.toggle{display:flex;align-items:center;gap:6px;color:#7b8275;font-size:9px;cursor:pointer}.toggle input{position:absolute;opacity:0}.toggle>span{width:23px;height:13px;background:#ccd2c3;border-radius:20px;position:relative}.toggle>span:after{content:'';position:absolute;top:3px;left:3px;width:7px;height:7px;border-radius:50%;background:#fff}.toggle input:checked+span{background:#779271}.toggle input:checked+span:after{left:13px}.toggle input:focus-visible+span{outline:2px solid var(--sage)}#canvas{height:100%;width:100%;touch-action:none;cursor:grab;display:block;user-select:none}#canvas:active{cursor:grabbing}.node{cursor:pointer}.node rect.body{stroke-width:1.2;filter:url(#shadow)}.node:hover rect.body{stroke-width:2.5}.node.selected rect.body{stroke-width:3}.node text{pointer-events:none}.node .expand{cursor:pointer}.node .expand:hover circle{fill:#e1e8d9}.node.dim{opacity:.16}.node .star{font-size:18px;fill:#a37e35}.canvas-bottom{position:absolute;bottom:35px;left:20px;right:16px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}.canvas-bottom>*{pointer-events:auto}.gesture-hint{font-size:9px;color:#7e8576;background:#faf9f3bf;padding:6px;border-radius:4px}.gesture-hint span{margin-right:5px;font-size:15px}.gesture-hint i,footer i{font-style:normal;margin:0 6px;color:#aab19d}.zoom-controls{display:flex;align-items:center;border:1px solid #dce0d1;border-radius:7px;background:#fdfcf8;box-shadow:0 3px 8px #303d3406}.zoom-controls button{font-size:20px;width:31px;height:33px}.zoom-controls span{font-size:10px;width:39px;text-align:center}.zoom-controls .control-divider{width:1px;height:17px;background:#e3e5d9}.canvas-legend{position:absolute;bottom:13px;left:25px;color:#858a7e;font-size:8px;display:flex;align-items:center;gap:7px}.solid-line,.dotted-line,.custom-line{width:19px;border-top:1px solid #95a48e}.dotted-line{border-top-style:dashed;margin-left:10px}.custom-line{border-top-color:#ad8b4a;margin-left:10px}footer{min-height:50px;display:flex;justify-content:space-between;align-items:center;font-size:9px;color:#8b8e82;gap:10px}footer strong{font-weight:500;color:#636f5d}.footer-spark{color:#82966f;font-size:20px;margin-left:12px}.detail{position:fixed;right:0;top:0;bottom:0;width:326px;background:var(--panel);border-left:1px solid var(--line);overflow:auto;padding:30px 25px;scrollbar-width:thin}.detail-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:32px}.detail-top .eyebrow{font-size:9px}.detail-top button{font-size:20px;line-height:1}.detail h2{font:normal 27px/1.23 Georgia,serif;letter-spacing:-.5px;margin:12px 0}.detail p{font-size:12px;line-height:1.85;color:#71796b}.detail .lead{font-size:13px}.welcome-art{height:125px;display:flex;align-items:center;justify-content:center;position:relative;margin:10px 0 25px}.welcome-art svg{width:200px;height:150px}.detail-rule{height:1px;background:var(--line);margin:25px 0}.detail h3{font-size:10px;letter-spacing:1px;font-weight:650;margin:23px 0 12px}.step{display:flex;gap:13px;margin:18px 0;align-items:flex-start}.step>span{font:italic 18px Georgia,serif;color:#8e9d7e}.step strong{font-size:11px;font-weight:550}.step p{font-size:11px;margin:5px 0}.source-tag{display:inline-flex;gap:6px;align-items:center;font-size:9px;color:#6c7d62;background:#edf1e6;border:1px solid #e2e8d7;padding:5px 8px;border-radius:4px}.source-context{font-size:12px;line-height:1.85;color:#626e5e}.source-context strong{font-weight:650;color:#3e4d3f}.source-note{font-size:10px!important;border-left:2px solid #b6c2a6;padding-left:12px;margin-top:22px}.primary-button{background:#425f49;color:#fff;padding:11px 14px;border-radius:6px;font-size:11px;width:100%;text-align:center}.secondary-button{border:1px solid #dbe0d1;padding:10px 12px;border-radius:6px;font-size:11px;width:100%;margin-top:8px}.secondary-button.starred{background:#f5eedc;border-color:#e5d6aa;color:#82692e}.topic-child{display:flex;text-align:left;width:100%;align-items:center;gap:10px;border-top:1px solid #e8eade;padding:12px 0;font-size:11px;line-height:1.5}.topic-child .child-num{font:italic 12px Georgia,serif;color:#96a08b}.topic-child .arrow{margin-left:auto;color:#91a07f}.paper-mini{padding:13px 0;border-top:1px solid var(--line)}.paper-label{font-size:9px;color:#77846c;letter-spacing:.3px}.paper-mini a{display:block;font-size:11px;line-height:1.6;color:#425943;text-decoration:none;margin:5px 0}.paper-mini a:hover{text-decoration:underline}.paper-mini small{font-size:9px;line-height:1.5;color:#8b8f80;display:block}.notes-label{display:flex;justify-content:space-between;align-items:center}.notes-label span{font-size:9px;letter-spacing:0;font-weight:400;color:#949783}.detail textarea{width:100%;min-height:115px;resize:vertical;border:1px solid #dfe3d3;border-radius:6px;background:#f7f7ee;padding:12px;font-size:11px;color:#44533e;line-height:1.7}.detail textarea::placeholder{color:#8b9280}.connection-row{border-top:1px solid #e5e8db;padding:10px 0;font-size:10px;line-height:1.6}.connection-row button.link-topic{font-size:11px;text-align:left;padding:0;font-weight:550}.connection-row p{font-size:10px;margin:5px 0}.connection-row .remove{float:right;font-size:17px;color:#ad7e62}.connect-banner{background:#ede5cd;border:1px solid #ddd0a8;padding:10px;border-radius:6px;font-size:11px;line-height:1.7;margin:15px 0}.connect-banner button{text-decoration:underline}.detail select,.detail input[type=text]{width:100%;padding:9px;margin:6px 0;border:1px solid #dbe0d1;background:#fafbf5;border-radius:5px;font-size:11px}.back-topic{font-size:10px;color:#77846c;text-align:left;padding:0;margin-bottom:8px}.detail .tiny{font-size:10px}.welcome-bottom{background:#f0f2e8;border-radius:8px;padding:15px;margin-top:25px}.welcome-bottom p{margin:0;font-size:11px}.welcome-bottom strong{color:#526448}.detail ul{padding-left:16px;font-size:12px;line-height:1.85;color:#71796b}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%) translateY(30px);z-index:100;background:#354f3e;color:#fff;border-radius:8px;padding:13px 20px;font-size:12px;opacity:0;pointer-events:none;transition:.2s;max-width:80vw}#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}dialog{border:1px solid var(--line);border-radius:16px;padding:34px;max-width:530px;color:var(--ink);background:var(--panel);box-shadow:0 20px 80px #23352030}dialog::backdrop{background:#293b3360;backdrop-filter:blur(3px)}dialog h2{font:30px Georgia,serif}dialog p,dialog dd{font-size:12px;line-height:1.8;color:#71796b}dialog dt{font-size:12px;font-weight:600;margin-top:15px}dialog dd{margin-left:0}.small{font-size:10px!important}.dialog-close:not(.primary-button){position:absolute;right:18px;top:15px;font-size:22px}#list-view{flex:1;overflow:auto;padding-bottom:25px}.library-tools{display:flex;gap:10px;margin:0 0 20px;align-items:center}.library-tools input{border:1px solid var(--line);background:#fffdf8;padding:11px;border-radius:6px;width:100%;font-size:12px}.library-item{padding:22px 4px;border-top:1px solid var(--line)}.library-item h3{font:20px/1.4 Georgia,serif;margin:8px 0}.library-item p{font-size:12px;line-height:1.7;color:var(--muted)}.library-item a{font-size:11px;color:#526e4b}.library-item button{font-size:12px;color:var(--sage);padding:8px 0}.resource-block{padding:18px 0;border-top:1px solid var(--line)}.resource-block h3{font:23px Georgia,serif}.resource-block p{font-size:12px;line-height:1.9;max-width:700px;color:#6c7666}.empty-state{padding:60px 20px;text-align:center;font:24px Georgia,serif}.empty-state p{font:12px/1.8 -apple-system,sans-serif;color:var(--muted)}.resource-source{display:block;padding:12px 0;font-size:12px;color:#53674b}body.connecting #canvas{cursor:crosshair}@media(min-width:1650px){main{margin-right:360px;padding:0 40px}.detail{width:360px;padding:34px}.canvas-heading{padding-top:36px;padding-bottom:30px}}@media(max-width:1200px){.sidebar{width:200px;padding:25px 17px}main{margin-left:200px;margin-right:285px;padding:0 20px}.detail{width:285px;padding:25px 20px}.search{width:185px}.breadcrumb{font-size:8px}.breadcrumb span{margin:0 5px}.canvas-heading h2{font-size:29px}.outline-button span{display:none}.gesture-hint{font-size:8px}.canvas-heading p{font-size:10px}footer{font-size:8px}footer>span:last-child{display:none}}@media(max-width:980px){.sidebar{width:180px;padding:22px 15px}main{margin-left:180px;margin-right:0;padding:0 20px}.detail{display:none;width:310px;z-index:20;box-shadow:-8px 0 30px #30402015}body.detail-open .detail{display:block}.search{width:200px}.sidebar h1{font-size:24px}.project-label{letter-spacing:1px}.nav{font-size:11px}.sidebar-intro{font-size:11px}.filter-note{font-size:9px}.canvas-heading h2{font-size:32px}}@media(max-width:650px){body{height:100dvh}.sidebar{width:60px;padding:15px 8px}.brand{font-size:0;justify-content:center}.brand-mark{font-size:35px}.sidebar h1,.sidebar-intro,.sidebar .eyebrow,.sidebar-divider,.filter-note,#domain-filters,.sidebar-bottom{display:none}.nav{font-size:0;justify-content:center;padding:12px 0}.nav>span:first-child{font-size:21px;width:auto}.nav-count{display:none}.nav.active{margin-top:30px}main{margin-left:60px;padding:0 12px;min-width:0;height:100dvh}header{height:65px;min-height:65px}.breadcrumb{display:none}.search{width:100%}.back-button{padding:0}.canvas-heading{padding:22px 0}.canvas-heading h2{font-size:27px}.canvas-heading .eyebrow{font-size:8px}.canvas-heading p{font-size:10px;max-width:240px}.gesture-hint{display:none}.canvas-bottom{justify-content:flex-end}.canvas-legend{font-size:7px;left:10px;gap:4px}.canvas-top{left:12px;right:12px}.toggle{font-size:8px}.canvas-badge{font-size:7px}.search-results{right:12px;left:12px;width:auto}.detail{width:min(340px,calc(100vw - 60px))}footer{font-size:8px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.canvas-maximize{font-size:15px;color:#6b7b61;background:#faf9f3de;border:1px solid #dfe4d5;border-radius:5px;padding:4px 8px;display:flex;gap:5px;align-items:center;margin-left:auto;margin-right:14px}.canvas-maximize span{font-size:9px}.focus-mode .sidebar{display:none}.focus-mode main{margin-left:0;margin-right:0}.focus-mode .detail{display:none}.focus-mode.detail-open .detail{display:block;z-index:20;box-shadow:-8px 0 30px #30402015}.focus-mode .canvas-heading{padding:16px 0}.focus-mode .canvas-heading h2{font-size:29px}@media(max-width:650px){.canvas-maximize span{display:none}.canvas-maximize{margin-right:7px}.focus-mode main{padding:0 12px}}

/* Compact workspace chrome: keep the available height for the research canvas. */
.brand{font-size:27px}.brand-mark{font-size:32px}.project-label{margin:18px 0 24px}
header{height:62px;min-height:62px}.search-results{top:52px}
.canvas-heading,.focus-mode .canvas-heading{padding:15px 0;min-height:64px}
.canvas-heading h2,.focus-mode .canvas-heading h2{font:500 17px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:0;margin:0}
footer{min-height:35px}.detail-top{margin-bottom:22px}
@media(min-width:1650px){.canvas-heading{padding:15px 0}}
@media(max-width:650px){.brand{font-size:0}.project-label{display:none}.canvas-heading h2{font-size:16px}.nav.active{margin-top:20px}}
/* Only reserve a reading column when a topic is actually selected. */
body:not(.detail-open) .detail{display:none}
body:not(.detail-open) main{margin-right:0}
.nav{white-space:nowrap;font-size:11px}

.layout-actions{display:flex;gap:8px;align-items:center}.layout-actions[hidden],.layout-actions button[hidden]{display:none}
.node.dragging rect.body{filter:drop-shadow(0 8px 9px #344b3333);stroke-width:2.5;fill:#f7faef}
.node.dragging{opacity:.9}
@media(max-width:650px){.layout-actions{gap:4px}.layout-actions button{padding:9px}.canvas-heading{gap:6px}}

@media(min-width:651px){#reset-layout span{display:inline}}
/* Topic Explorer extends the existing workspace; source concepts stay in details. */
.nav[hidden]{display:none}
#topic-view{flex:1;min-height:0;overflow:auto;padding:8px 0 30px;scrollbar-width:thin}
#topic-view[hidden]{display:none}
.topic-explorer-toolbar{display:flex;gap:18px;justify-content:space-between;align-items:center;margin:0 0 27px}
.topic-explorer-toolbar>button{font-size:12px;padding:0;color:#5c7755;white-space:nowrap}
.topic-explorer-toolbar label{display:flex;gap:8px;align-items:center;font-size:10px;color:var(--muted);min-width:0}
.topic-explorer-toolbar select{min-width:0;max-width:320px;width:100%;padding:8px;background:#fafaf3;color:var(--ink);border:1px solid var(--line);border-radius:6px;font-size:11px}
#topic-view>h2{font:normal 28px/1.25 Georgia,serif;letter-spacing:-.4px;margin:13px 0 17px;max-width:700px}
.area-definition{font-size:12px;line-height:1.85;color:#737e6d;max-width:780px}
.topic-explorer-hint{font-size:10px;color:#87917b;margin:20px 0}
.topic-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:19px;align-items:stretch}
.research-topic-card{background:#fdfcf8;border:1px solid #dbe2d3;border-top:3px solid var(--domain);border-radius:12px;padding:19px 20px;display:flex;flex-direction:column;min-width:0;box-shadow:0 4px 16px #30402004}
.research-topic-card.chosen{border-color:var(--domain);background:#f1f4e9}
.topic-card-top{display:flex;align-items:center;justify-content:space-between;font-size:10px;letter-spacing:1px;color:var(--domain)}
.topic-card-top button{font-size:24px;line-height:1;padding:2px 0 2px 12px;color:#a18b4c}
.topic-card-open{display:block;flex:1;text-align:left;padding:0;margin-top:12px}
.topic-card-open h3{font:normal 22px/1.3 Georgia,serif;letter-spacing:-.3px;margin:0 0 14px;color:#3d503e}
.topic-card-open p{font-size:12px;line-height:1.85;color:#7a8372;margin:0 0 22px}
.topic-card-bottom{display:flex;gap:10px;justify-content:space-between;align-items:center;border-top:1px solid #e8ebdf;padding-top:14px;font-size:10px;color:#8b9381}
.topic-card-bottom button{padding:0;font-size:11px;color:#5f7855;white-space:nowrap}
.topic-has-note{font-size:9px;color:#8a936f;margin-top:12px}
.concept-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.concept-chip{font-size:11px;line-height:1.6;background:#edf1e6;border:1px solid #dce4d1;border-radius:8px;padding:8px 11px;color:#586b4e}
.concept-chip.highlighted{border-color:#b18f4a;background:#f2ecd6}
.evidence-note{border-left:3px solid #c4a473;padding:2px 0 2px 13px;margin:25px 0;background:#f7f4ea}
.evidence-note h3{margin:9px 0;font-size:9px;color:#8d7855}
.evidence-note p{font-size:11px;margin:0 7px 10px 0;line-height:1.8}
.legacy-area-note,.earlier-interests{margin:30px 0;border-top:1px solid var(--line);padding-top:17px}
.legacy-area-note h3,.earlier-interests>h3{font:20px Georgia,serif}
.legacy-area-note p,.earlier-interests>p,.legacy-interest{font-size:11px;line-height:1.7;color:var(--muted)}
.legacy-area-note textarea{width:100%;min-height:90px;padding:12px;border:1px solid var(--line);border-radius:8px;background:#fdfcf8;font:12px/1.8 inherit;color:var(--ink)}
.earlier-concept-notes{margin-top:20px;padding-top:5px;border-top:1px solid var(--line)}
.paper-topic-links{display:flex;flex-direction:column;align-items:flex-start;gap:7px}
.paper-topic-links button{text-align:left;line-height:1.7;padding:2px 0}
.preserved-value{white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.8 ui-monospace,monospace;background:#eef1e8;border-radius:6px;padding:15px}
.resource-block ul{font-size:12px;line-height:2;color:#6c7666;padding-left:20px}
@media(max-width:650px){.topic-explorer-toolbar{flex-direction:column;align-items:flex-start;gap:14px}#topic-view>h2{font-size:24px}.topic-grid{gap:15px}.research-topic-card{padding:17px}.topic-card-open h3{font-size:21px}.topic-explorer-toolbar select{max-width:240px}.topic-card-bottom{flex-wrap:wrap}}

@media(min-width:651px){.topic-grid.four-topics{grid-template-columns:repeat(2,minmax(0,1fr))}}
