/* Compact fixed chrome. Page content retains its independent scroll surface. */
:root{--header-height:40px;--desk-width:136px;--plan-width:218px;--plan-rail-width:20px}
.global-header{padding:0 12px!important;height:var(--header-height)!important;min-height:var(--header-height)!important}
.global-header .liquid-brand img{width:22px!important;border-radius:7px}
.global-header .top-navigation{inset:0!important;padding:0 60px!important;gap:146px!important}
.banner-wordmark{font-size:16px!important;letter-spacing:-.6px;top:50%!important}
.global-header .top-nav{height:28px;padding:0 7px!important;font-size:10px;gap:5px;border-radius:8px}
.global-header>.avatar,.global-header #account-trigger{width:27px;height:27px;border-radius:9px}
.global-header .studio-icon{width:14px;height:14px;flex-basis:14px}
aside.desk{width:calc(var(--desk-width) - 10px)!important;padding:13px 8px!important;inset:var(--header-height) auto 10px 0!important}
.desk .desk-title{height:20px;margin:0 3px 14px!important;font-size:8px;letter-spacing:1.5px}
.desk .desk-hide{width:23px!important;height:23px!important;font-size:18px!important}
.desk .studio-find{font-size:9px;padding:8px 7px;gap:7px;margin-bottom:13px;min-height:32px}
.desk .studio-find kbd{display:none}.desk .studio-find>span{white-space:nowrap}
.desk .studio-find .studio-icon,.desk .desk-pin .studio-icon{width:13px;height:13px;flex-basis:13px}
.desk .desk-action{font-size:10px!important;gap:8px!important;padding:9px 7px!important;margin-bottom:4px}
.desk .desk-action>span{width:17px;height:20px;flex:none}
.desk .desk-action .studio-icon{width:15px;height:15px}
.desk .desk-label{font-size:7px;letter-spacing:1.3px;margin:23px 6px 9px!important}
.desk .desk-pin>button:first-child{font-size:10px!important;padding:8px 7px!important;gap:8px}
.desk .add-shortcut{font-size:9px;min-height:30px;margin-top:10px;padding:8px}
.desk .studio-desk-foot{font-size:7px;gap:6px}.desk .studio-desk-foot small{font-size:8px}
.plan-sidebar{padding:0 11px 14px!important}.plan-sidebar .plan-sidebar-head{padding:12px 0 8px}
.plan-sidebar .plan-sidebar-head input{font-size:10px;width:126px;padding:6px}
.plan-sidebar .plan-section{padding:12px 0}.plan-sidebar .plan-section-title{font-size:8px;letter-spacing:1.3px;margin-bottom:9px}
.plan-sidebar .plan-section-title button{font-size:9px}.plan-sidebar .plan-empty{padding:10px;font-size:9px}
.plan-sidebar .plan-check{font-size:10px;line-height:1.55;margin:8px 0;gap:7px}
.plan-sidebar .plan-overview{font-size:10px}.plan-sidebar .plan-stat{font-size:9px}
.plan-sidebar .plan-section h3{font-size:23px;margin-bottom:14px}
.plan-sidebar .plan-trade{padding:9px 4px;margin:0 -4px;width:calc(100% + 8px)}
.plan-sidebar .plan-trade>div{font-size:11px}.plan-sidebar .plan-trade small{font-size:8px}
.collapsed-desk-rail span,.collapsed-plan-rail span{font-size:7px;letter-spacing:1.5px}
main.liquid-main{right:calc(var(--plan-rail-width) + 10px)!important;bottom:10px}
.plan-open main.liquid-main{right:calc(var(--plan-width) + 12px)!important}
.desk-hidden main.liquid-main{left:calc(var(--plan-rail-width) + 10px)!important}
#content{padding:18px 20px 28px;scroll-padding:18px}.study-view #content{padding:0}
.page-head,.section-header{min-height:46px;margin-bottom:17px;gap:14px}
.page-head h1,.section-header h1{font-size:21px;letter-spacing:-.6px;margin-bottom:6px}
.page-head p,.section-header small{font-size:11px}.studio-eyebrow{font-size:7px;margin-bottom:7px}
.dashboard-hero{padding:20px 0 24px;margin-bottom:20px}.dashboard-hero h1{font-size:60px}
/* The header height is determined by its actual controls, never by title length.
   The rail participates in row two so wrapped controls cannot overlap it. */
.study-room.has-library-rail{display:grid;grid-template-columns:46px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);padding:0!important;min-width:0}
.custom-background #content .study-room.has-library-rail{padding:0!important}
.study-room.has-library-rail>.room-top,.study-room.has-library-rail>.room-top:has(.fc-tabs){display:grid;grid-template-columns:minmax(100px,1fr) auto;grid-column:1/-1;grid-row:1;align-items:center;gap:12px;min-width:0;width:100%;box-sizing:border-box;height:auto;min-height:52px;margin:0;padding:10px 14px;flex-wrap:nowrap}
.study-room.has-library-rail>.study-library-rail{position:relative;inset:auto!important;grid-column:1;grid-row:2;width:46px;height:100%;min-height:0;box-sizing:border-box;padding:9px 3px;gap:7px;overflow-y:auto;overflow-x:hidden}
.study-library-rail>button{width:36px;height:35px;flex:0 0 35px}.study-library-rail>button .studio-icon{width:17px;height:17px}
.study-room.has-library-rail>.study-home,.study-room.has-library-rail>.folder-page,.study-room.has-library-rail>.refined-workspace{grid-column:2;grid-row:2;min-width:0;max-height:100%}
.study-breadcrumbs{display:flex;align-items:center;flex-wrap:nowrap;min-width:0;width:100%;gap:8px;overflow:hidden;line-height:1.6}
.study-breadcrumbs .history-arrows{display:flex;align-items:center;flex:0 0 auto;width:auto;margin:0 4px 0 0;gap:4px;white-space:nowrap}
.study-breadcrumbs .history-arrows button{padding:3px 5px;flex:none;font-size:20px}
.study-breadcrumbs>#crumb-home{flex:0 0 auto;max-width:none}
.study-breadcrumbs>button{flex:0 1 125px;min-width:0;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:1.6}
.study-breadcrumbs>span{flex:none;font-size:10px}
.study-breadcrumbs #crumb-note{flex:1 1 140px;min-width:0;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:1.6}
.room-top>.actions{display:flex;flex-wrap:nowrap;justify-content:flex-end;align-items:center;gap:7px;min-width:0;max-width:none}
.room-top .actions button{padding:7px 9px;font-size:10px;white-space:nowrap}
.room-top .save-status{font-size:8px;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.room-top .fc-tabs{flex:none;padding:3px;gap:2px;border-radius:10px}
.room-top .fc-tabs button{font-size:9px;padding:5px 7px}.room-top #fc-from-note{font-size:9px}
.writing-room{min-width:0;width:100%;box-sizing:border-box}
.writing-room .note-title{width:100%;min-width:0;max-width:100%;box-sizing:border-box;font-size:32px;letter-spacing:-1px;text-overflow:ellipsis}
.study-room .room-editor{font-size:13px!important;line-height:1.55!important;padding-top:18px;padding-bottom:18px;overflow-wrap:anywhere}
.study-room .room-editor :is(p,div){line-height:inherit}
.study-room .room-editor p{margin:0 0 .6em}
.study-room .room-editor h1{font-size:24px;line-height:1.25;margin:1em 0 .35em;letter-spacing:-.6px}
.study-room .room-editor h2{font-size:19px;line-height:1.3;margin:1em 0 .35em;letter-spacing:-.35px}
.study-room .room-editor h3{font-size:16px;line-height:1.35;margin:.9em 0 .3em;letter-spacing:-.2px}
.study-room .room-editor>:first-child{margin-top:0}
.study-room .room-editor :is(ul,ol){margin:.3em 0 .7em;padding-left:1.5em}
.study-room .room-editor li{margin:.15em 0}.study-room .room-editor li>p{margin:0}
.study-room .room-editor blockquote{margin:.7em 0;padding:2px 0 2px 14px;font-size:13px;line-height:1.55}
.study-room .room-editor pre{font-size:12px;line-height:1.55;margin:.7em 0;padding:12px}
.study-room .room-editor img{max-width:100%;height:auto}
.study-room .editor-paper{margin-top:16px}.study-room .source-buttons{margin:12px 0;gap:7px}
.study-room .source-buttons button{font-size:10px;padding:7px 10px}
.note-meta{flex-wrap:wrap;min-width:0}.note-meta select{min-width:0;max-width:180px}
.refined-workspace.layout-focus{max-width:1080px}.refined-workspace.layout-above,.refined-workspace.layout-mini{max-width:1080px}
.refined-workspace{padding:32px 32px 65px}.folder-inner,.study-home{max-width:900px}
.folder-inner h1{overflow-wrap:anywhere}.subfolder-grid strong{max-width:100%;overflow-wrap:anywhere}
/* Folder ordering: clear drop indicators with keyboard and button alternatives. */
[data-folder-reorder]{cursor:grab;touch-action:manipulation}.folder-dragging{opacity:.4}
.study-library-rail>.folder-drop-before{box-shadow:0 -3px 0 var(--accent)}
.study-library-rail>.folder-drop-after{box-shadow:0 3px 0 var(--accent)}
.subfolder-grid>.folder-drop-before{box-shadow:-3px 0 0 var(--accent)}
.subfolder-grid>.folder-drop-after{box-shadow:3px 0 0 var(--accent)}
.folder-order-help{font-size:11px;color:var(--muted);line-height:1.8}
.folder-order-list{display:flex;flex-direction:column;gap:7px;margin-top:16px}
.folder-order-row{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:10px;padding:10px;background:#ffffff03}
.folder-order-row>span{min-width:0;flex:1;overflow-wrap:anywhere;font-size:12px}
.folder-order-row>i{font-style:normal;color:var(--muted);cursor:grab}.folder-order-row>button{padding:5px 9px;font-size:14px}
.folder-order-row.folder-drop-before{box-shadow:0 -2px 0 var(--accent)}.folder-order-row.folder-drop-after{box-shadow:0 2px 0 var(--accent)}
@media(min-width:701px){.desk .desk-pins,.desk .desk-label,.desk .add-shortcut{display:block}}
@media(max-width:1200px){
 .study-room.has-library-rail>.room-top,.study-room.has-library-rail>.room-top:has(.fc-tabs){grid-template-columns:minmax(0,1fr);gap:5px;min-height:0;padding:8px 12px}
 .room-top>.actions{width:100%;max-width:none;flex-wrap:wrap;justify-content:flex-end;gap:5px}
 .study-breadcrumbs>button{flex-basis:130px}.study-breadcrumbs #crumb-note{max-width:none}
}
@media(max-width:1100px){
 :root{--header-height:76px;--desk-width:130px}
 .global-header .liquid-brand{align-self:flex-start;margin-top:7px}
 .banner-wordmark{top:20px!important;font-size:17px!important}
 .global-header .top-navigation{inset:38px 0 0!important;gap:3px!important;padding:0 10px!important;overflow-x:auto;justify-content:center}
 .banner-nav-left,.banner-nav-right{display:contents}
 .global-header>.avatar{position:absolute;top:6px;right:14px;display:grid}
 .global-header .top-nav{height:29px;padding:0 8px!important;font-size:10px}
 .desk .studio-find kbd{display:none}
 .plan-open main.liquid-main{right:calc(var(--plan-rail-width) + 10px)!important}
 #content{padding:18px}.study-view #content{padding:0}
}
@media(max-width:700px){
 :root{--desk-width:46px;--header-height:74px;--plan-width:224px}
 .global-header{padding:0 11px!important}.global-header .top-navigation{justify-content:flex-start}
 .global-header .liquid-brand img{width:22px!important}.global-header .top-nav{font-size:10px}
 aside.desk{padding:12px 4px!important;width:40px!important}.desk .studio-find{width:32px;height:32px;padding:8px;justify-content:center;margin-bottom:12px}
 .desk .studio-find>span,.desk .desk-action{font-size:0!important}.desk .desk-action{padding:8px 4px!important;margin-bottom:4px;justify-content:center}
 .desk .desk-action>span{width:22px}.desk .studio-desk-foot{display:none}
 .desk.expanded{width:148px!important;padding:14px 10px!important}.desk.expanded .desk-action{font-size:10px!important;justify-content:flex-start}
 #content{padding:15px 12px 25px}.study-view #content{padding:0}
 .page-head h1,.section-header h1{font-size:21px}.page-head,.section-header{gap:10px;min-height:45px}
 .dashboard-hero h1{font-size:48px}.dashboard-hero{padding:18px 0}
 .study-room.has-library-rail{grid-template-columns:40px minmax(0,1fr)}
 .study-room.has-library-rail>.study-library-rail{width:40px;padding:8px 2px;gap:6px}.study-library-rail>button{width:33px;height:34px;flex-basis:34px}
 .room-top>.actions{gap:5px}.room-top .actions button{font-size:9px;padding:6px 8px}.room-top .save-status{display:none}
 .study-breadcrumbs{gap:5px}.study-breadcrumbs>button{max-width:100px;flex-basis:100px;font-size:9px}.study-breadcrumbs #crumb-note{font-size:9px;flex-basis:90px}
 .study-breadcrumbs .history-arrows{gap:1px;margin-right:2px}.study-breadcrumbs .history-arrows button{padding:2px 4px;font-size:19px}
 .writing-room .note-title{font-size:27px!important}.refined-workspace{padding:25px 17px 55px}.refined-workspace.layout-side{padding:25px 17px 55px}
}

/* Keep dense navigation comfortable without changing editor typography. */
@media(min-width:1101px){.global-header .top-navigation{padding-inline:48px!important}.global-header .top-nav .studio-icon{width:12px;height:12px;flex-basis:12px}.global-header .top-nav{gap:4px}.global-header .banner-nav-left,.global-header .banner-nav-right{gap:2px}}
@media(prefers-reduced-motion:reduce){.trade-card,.plan-trade,.desk-action{transition:none!important}}
