/* Color and interaction layer. All assets remain local. */
:root{--ink:#292929;--muted:#646464;--accent:#515151;--line:#e5e5e5;background:#ffffff;color:var(--ink)}
body{background:#ffffff}
.sidebar{background:#fafafa;border-right:1px solid #e4e4e4}.brand strong{color:#2a2a2a}.brand img{background:#545454;border-radius:12px;box-shadow:0 5px 14px #54545426}.workspace-label{color:#696969}.workspace-label>span{background:#ececec;color:#545454;border-color:#e0e0e0}.sidebar-bottom p{color:#696969}
.nav-item{position:relative;color:#5b5b5b;transition:background .18s,color .18s,transform .18s}.nav-item:hover{background:#eeeeee;transform:translateX(3px)}.nav-item.active{background:#e8e8e8;color:#484848;box-shadow:inset 3px 0 #636363}.nav-item.active small{background:#d6d6d6;color:#484848}.nav-item:nth-child(2)>svg{color:#7d7d7d}.nav-item:nth-child(3)>svg{color:#838383}.nav-item:nth-child(4)>svg{color:#5d5d5d}.nav-item:nth-child(5)>svg{color:#717171}.nav-item:nth-child(6)>svg{color:#717171}.nav-item:nth-child(8)>svg{color:#6c6c6c}.nav-item:nth-child(9)>svg{color:#7f7f7f}
.topbar{background:#ffffffd9;backdrop-filter:blur(18px)}.search{background:#f2f2f2;border-color:#e6e6e6;transition:box-shadow .2s,border-color .2s}.search:focus-within{background:white;border-color:#838383;box-shadow:0 0 0 4px #63636315}.avatar{background:#e9e9e9;color:#4e4e4e;border-color:#dadada}.connection{color:#636363}.connection i{box-shadow:0 0 0 4px #84848416}
.button{border-radius:10px;transition:background .18s,border-color .18s,box-shadow .18s,transform .18s}.button:active:not(:disabled){transform:scale(.97)}.primary{background:#515151;border-color:#515151;box-shadow:0 4px 12px #51515122}.primary:hover{background:#424242;border-color:#424242;box-shadow:0 6px 17px #51515135}.outline:hover{background:#f2f2f2;border-color:#b2b2b2;color:#4a4a4a}.text-button{color:#585858}.text-button:hover{color:#404040}.button:disabled{transform:none;box-shadow:none}.icon-button:hover{background:#ececec;color:#525252}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #838383;outline-offset:3px}
.hero{position:relative;overflow:hidden;border-radius:20px;border:1px solid #dddddd;background:linear-gradient(112deg,#eeeeee 0%,#f2f2f2 55%,#f0f0f0 100%);margin-bottom:14px;box-shadow:0 6px 28px #3a3a3a06}.hero:after{content:'';position:absolute;right:-35px;top:-95px;width:300px;height:300px;border:45px solid #c5c5c53a;border-radius:50%;pointer-events:none}.hero-copy{position:relative;z-index:1;padding:30px 32px}.hero .eyebrow{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#5e5e5e;font-weight:600}.studio-date{font-size:12px;font-weight:400;color:#646464}.hero h1{font-size:32px;color:#2a2a2a;letter-spacing:-.7px}.creative-principle{border-left-color:#8e8e8e;background:linear-gradient(90deg,#f9f9f999,transparent);margin:16px 0 23px}.principle-text>span{color:#666666}.principle-text>strong{color:#434343;font-size:21px}.creative-principle>.button{color:#5c5c5c}.quick-capture{border-color:#dcdcdc;border-radius:12px;box-shadow:0 6px 15px #4e4e4e09;transition:box-shadow .2s,border-color .2s}.quick-capture:focus-within{border-color:#939393;box-shadow:0 0 0 4px #6c6c6c12}.quick-capture input::placeholder{color:#6e6e6e}
.quick-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 26px}.quick-action{justify-content:flex-start;gap:10px;background:#ffffff;border:1px solid #e5e5e5;padding:13px 16px;font-size:13px;min-height:48px}.quick-action svg{width:19px;height:19px}.quick-action:after{content:'↗';margin-left:auto;opacity:.45;transition:transform .2s}.quick-action:hover:after{transform:translate(2px,-2px);opacity:1}.action-copy{color:#505050}.action-copy:hover{background:#eeeeee;border-color:#cdcdcd}.action-topic{color:#717171}.action-topic:hover{background:#f6f6f6;border-color:#d8d8d8}.action-script{color:#646464}.action-script:hover{background:#f5f5f5;border-color:#d7d7d7}.action-todo{color:#646464}.action-todo:hover{background:#f4f4f4;border-color:#d5d5d5}
.overview{gap:16px}.overview>button{border-radius:15px;position:relative;overflow:hidden;transition:transform .2s,box-shadow .2s,border-color .2s;border-color:var(--stat-line);background:var(--stat-bg)}.overview>button:hover{background:var(--stat-bg);border-color:var(--stat-ink);transform:translateY(-3px);box-shadow:0 9px 20px #42424212}.overview>button:nth-child(1){--stat-bg:#f8f8f8;--stat-line:#e0e0e0;--stat-ink:#6b6b6b;--stat-icon:#e7e7e7}.overview>button:nth-child(2){--stat-bg:#efefef;--stat-line:#d9d9d9;--stat-ink:#5b5b5b;--stat-icon:#dedede}.overview>button:nth-child(3){--stat-bg:#f3f3f3;--stat-line:#e1e1e1;--stat-ink:#666666;--stat-icon:#e5e5e5}.overview>button:nth-child(4){--stat-bg:#f4f4f4;--stat-line:#e1e1e1;--stat-ink:#6a6a6a;--stat-icon:#e6e6e6}.overview .stat-icon{background:var(--stat-icon);color:var(--stat-ink);border-radius:12px}.overview strong{color:var(--stat-ink);font-size:30px}.overview span:not(.stat-icon){color:#5b5b5b}.overview>button>svg{color:var(--stat-ink)}
.panel{border-radius:16px;padding:24px;border-color:#e5e5e5;box-shadow:0 4px 20px #2a2a2a04}.home-grid{gap:20px}.section-head h2{font-size:18px;color:#313131}.home-grid>.panel{border-top:3px solid #ababab}.home-grid>.panel:nth-child(2){border-top-color:#b8b8b8}.home-grid>.panel:nth-child(3){border-top-color:#aaaaaa}.home-grid>.panel:nth-child(4){border-top-color:#bfbfbf}.home-grid .section-head h2:before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;background:#7f7f7f;margin-right:9px;vertical-align:3px}.home-grid>.panel:nth-child(2) h2:before{background:#818181}.home-grid>.panel:nth-child(3) h2:before{background:#858585}.home-grid>.panel:nth-child(4) h2:before{background:#929292}
.recent-row{transition:background .18s,transform .18s;border-radius:8px}.recent-row:hover{background:#f3f3f3;transform:translateX(3px)}.mini-art{background:#eeeeee;color:#6f6f6f;border-color:#dddddd}.art-1{background:#f3f3f3;color:#7d7d7d;border-color:#e0e0e0}.art-2{background:#f0f0f0;color:#767676;border-color:#e0e0e0}.quote{background:#f7f7f7;border:1px solid #e9e9e9;transition:background .2s,transform .2s}.quote:hover{background:#efefef;transform:translateX(3px)}.quote>span{color:#949494}.quote strong{color:#474747}.quote small{color:#717171}.quote>svg{color:#7f7f7f;fill:#dcdcdc}
.account-avatar.charcoal,.account-dot.charcoal{background:#626262}.account-avatar.sage,.account-dot.sage{background:#727272}.account-avatar.clay,.account-dot.clay{background:#818181}.account-avatar.blue,.account-dot.blue{background:#747474}.account-progress{border-radius:10px;transition:background .2s}.account-progress:hover{background:#f5f5f5}.account-progress progress::-webkit-progress-value{background:linear-gradient(90deg,#7c7c7c,#a0a0a0)}.account-progress progress::-moz-progress-bar{background:#7c7c7c}.account-progress:has(.sage) progress::-webkit-progress-value{background:#8c8c8c}.account-progress:has(.clay) progress::-webkit-progress-value{background:#979797}
.todo-row{transition:background .2s,opacity .2s;border-radius:8px}.todo-row:hover{background:#f9f9f9}.todo-row input[type=checkbox]{accent-color:#717171;cursor:pointer}.todo-row input:checked{background:#717171;border-color:#717171}.todo-row.completed{opacity:.7}.todo-open strong{font-weight:600;color:#404040}.priority{background:#f0f0f0;color:#626262}.priority.important{background:#f1f1f1;color:#5e5e5e}.priority.urgent{background:#ececec;color:#565656}.overdue{font-weight:600;color:#5a5a5a}.panel>.wide{background:#f9f9f9;border-color:#d4d4d4;color:#686868}.panel>.wide:hover{background:#f0f0f0}.todo-summary{background:white;border-radius:15px}.todo-summary>div:nth-child(1) strong{color:#5b5b5b}.todo-summary>div:nth-child(2) strong{color:#6c6c6c}.todo-summary>div:nth-child(3) strong{color:#6e6e6e}
.page-heading h1{color:#2a2a2a}.page-heading p{color:#656565}.account-workspace{border-radius:16px;border-top:3px solid #979797}.account-tab.selected,.account-tabs>.selected{background:#ebebeb;border-color:#afafaf;color:#4c4c4c}.account-tab .account-tab-edit:hover{background:#dedede!important;color:#4f4f4f!important}.account-tabs>.button:hover,.account-tab-select:hover{background:#ededed}.month-bar{border-radius:13px;background:linear-gradient(100deg,#f3f3f3,#ffffff);border-color:#dcdcdc}.month-control strong{color:#4a4a4a}.month-counts b{color:#5b5b5b}.view-switch{display:flex;border-radius:9px;background:#e9e9e9;padding:3px;gap:2px}.view-switch .button{font-size:12px;min-height:30px;padding:5px 10px;border-radius:7px;color:#5f5f5f}.view-switch .selected{background:#ffffff;box-shadow:0 2px 4px #2b2b2b12;color:#4c4c4c}.draft-list{border-radius:14px}.draft-row{transition:background .18s}.draft-row:hover{background:#f5f5f5}.draft-icon{background:#eaeaea;color:#696969}.status{font-weight:600;background:#f0f0f0;color:#666666}.status.writing{background:#f1f1f1;color:#656565}.status.ready{background:#ededed;color:#606060}.status.done{background:#ebebeb;color:#555555}.status i{background:currentColor}.star-button.on{color:#858585}.star-button.on svg{fill:#d4d4d4}.star-button:active{transform:scale(1.2)}
.content-card{border-radius:15px;border-top:3px solid #aaaaaa;transition:transform .2s,box-shadow .2s}.content-card:hover{transform:translateY(-3px);box-shadow:0 12px 24px #3737370c}.content-card.type-inbox{border-top-color:#bcbcbc}.content-card.type-topic{border-top-color:#a5a5a5}.content-card.type-script{border-top-color:#b0b0b0}.content-card .type{color:#616161}.content-card.type-inbox .type{color:#6b6b6b}.content-card.type-topic .type{color:#6e6e6e}.content-card.type-script .type{color:#747474}.tag-row button{background:#eeeeee;color:#5f5f5f;border-radius:6px}.tag-row button:nth-child(3n+2){background:#f1f1f1;color:#6c6c6c}.tag-row button:nth-child(3n){background:#f1f1f1;color:#6f6f6f}.tag-row button:hover{filter:brightness(.95)}.collection-card{border-radius:16px;transition:transform .2s,box-shadow .2s}.collection-card:hover{transform:translateY(-3px);box-shadow:0 10px 24px #3b3b3b10}.collection-cover.charcoal{background:#eaeaea!important;color:#494949}.collection-cover.sage{background:#ededed!important;color:#5d5d5d}.collection-cover.clay{background:#ececec!important;color:#676767}.collection-cover.blue{background:#ededed!important;color:#5f5f5f}.collection-cover>span{color:inherit;opacity:.8}.tag-cloud button:hover,.tag-cloud button.selected{background:#eaeaea;color:#4f4f4f;border-color:#bbbbbb}
.modal-backdrop{background:#24242470;backdrop-filter:blur(6px)}.modal{border-radius:19px;border-color:#dadada;box-shadow:0 25px 100px #1f1f1f33;animation:dialog-in .2s ease-out}.modal-header{background:#f9f9f9}.modal-header h2{color:#343434}.modal-footer{background:#fafafa}.modal input:focus,.modal textarea:focus,.modal select:focus{border-color:#919191;box-shadow:0 0 0 3px #7070700b}.body-input{color:#373737}.focus-toggle{font-size:12px;padding:8px 12px;min-height:34px}.focus-toggle[aria-pressed=true]{background:#e6e6e6;color:#515151;border-color:#bcbcbc}.focus-writing .editor-metadata{display:none}.focus-writing .modal-body{padding-left:max(24px,calc((100% - 740px)/2));padding-right:max(24px,calc((100% - 740px)/2))}.focus-writing .body-input{min-height:44vh;font-size:17px;line-height:2.15!important;border-color:#ebebeb;background:#fefefe}.focus-writing .title-input{font-size:28px}.shot{background:#f6f6f6;border-color:#dcdcdc}.toast{background:#484848;border:1px solid #7f7f7f;border-radius:12px;box-shadow:0 8px 30px #39393925;animation:toast-in .22s ease-out}.toast>svg{color:#d1d1d1}.mobile-bottom{background:#fffffff5;backdrop-filter:blur(18px)}.mobile-bottom button.active{color:#525252}.mobile-bottom button.active svg{background:#e8e8e8;border-radius:9px;padding:3px;box-sizing:content-box}.login-art{background:linear-gradient(145deg,#383838,#575757 60%,#767676)}.login-page{background:#f4f4f4}
@keyframes dialog-in{from{opacity:0;transform:translateY(10px) scale(.99)}to{opacity:1;transform:none}}@keyframes toast-in{from{opacity:0;translate:0 10px}to{opacity:1;translate:0 0}}
@media(hover:none){.nav-item:hover,.overview>button:hover,.recent-row:hover,.quote:hover,.content-card:hover,.collection-card:hover{transform:none}}
@media(max-width:1100px){.quick-action{font-size:12px;padding:12px 10px;gap:7px}.quick-action:after{display:none}.hero h1{font-size:29px}}
@media(max-width:700px){.content{padding:18px 16px 24px}.hero{border-radius:16px}.hero-copy{padding:22px 19px}.hero h1{font-size:26px}.hero .eyebrow{font-size:11px}.studio-date{font-size:10px}.creative-principle{margin:15px 0 20px}.principle-text>strong{font-size:18px}.quick-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:20px}.quick-action{min-height:44px;font-size:12px;padding:10px 14px}.quick-action:after{display:block}.overview{gap:10px}.overview>button{padding:15px 12px;border-radius:13px}.overview strong{font-size:27px}.panel{padding:20px 17px;border-radius:14px}.home-grid{gap:16px}.section-head h2{font-size:16px}.filters{flex-wrap:wrap}.view-switch{flex-shrink:0}.account-workspace{border-radius:14px}.month-bar{border-radius:12px}.modal{border-radius:16px 16px 0 0}.modal-header{gap:8px;padding:16px}.modal-header h2{font-size:17px}.modal-header .actions{gap:7px}.modal-header:has(.focus-toggle) .save-state{display:none}.focus-toggle{font-size:11px;padding:7px 9px;min-height:34px}.focus-writing .modal-body{padding:18px}.focus-writing .title-input{font-size:23px}.focus-writing .body-input{font-size:16px}.hero:after{width:160px;height:160px;border-width:26px;right:-30px;top:-40px}.account-tab-select,.account-tab-edit{min-height:40px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Immersive writing occupies the viewport; the writing column stays readable. */
.immersive-backdrop{padding:0;background:#f9f9f9;backdrop-filter:none;align-items:stretch;z-index:60}
.modal.large.focus-writing{width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;background:#f9f9f9;box-shadow:none;animation:none}
.focus-writing .modal-header{display:grid;grid-template-columns:1fr auto 1fr;flex-shrink:0;min-height:72px;padding:14px 32px;background:#f9f9f9;border-bottom:1px solid #e7e7e7;gap:16px}
.focus-writing .modal-header>.actions{justify-self:end;gap:18px}.focus-writing .focus-exit{justify-self:start;color:#626262;font-size:13px;padding:8px 2px}.focus-exit svg{transform:rotate(180deg)}
.focus-heading{font-size:13px;font-weight:600;letter-spacing:3px;color:#717171}.focus-save-state{font-size:12px;color:#6b6b6b;white-space:nowrap}.focus-writing .modal-header .primary{min-height:36px;padding:8px 21px;background:#515151;border-color:#515151;box-shadow:none}.focus-writing .modal-header .primary:hover{background:#3b3b3b;border-color:#3b3b3b}
.focus-writing .modal-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;padding:clamp(24px,4vh,48px) clamp(24px,5vw,100px) 24px;scroll-padding:28px;overscroll-behavior:contain}
.focus-writing .title-input{font-size:32px;line-height:1.6;font-weight:600;padding:0 0 22px;margin-bottom:32px;background:transparent;color:#2f2f2f;border:0;border-bottom:1px solid #e3e3e3;border-radius:0;box-shadow:none;letter-spacing:-.4px}
.focus-writing .field{margin-bottom:26px}.focus-writing .field>span{color:#7f7f7f;font-size:12px;font-weight:400;margin-bottom:12px;letter-spacing:.5px}
.focus-writing .modal-body textarea{display:block;width:100%;resize:none;overflow-y:hidden;background:transparent;border:0;border-radius:0;padding:0;color:#393939;font-size:18px;line-height:2!important;box-shadow:none;min-height:60px}
.focus-writing .modal-body .body-input{min-height:2lh;font-size:20px;line-height:2.05!important;letter-spacing:.15px;caret-color:#676767}
.focus-writing .modal-body input::placeholder,.focus-writing .modal-body textarea::placeholder{color:#919191;font-weight:400}.focus-writing .modal-body textarea:focus,.focus-writing .title-input:focus{border-color:#c8c8c8;box-shadow:none;outline:none}.focus-writing .modal-body textarea:focus-visible{outline:none}.focus-writing .field:focus-within>span{color:#616161}
.focus-writing .modal-body>.word-count{display:none}.focus-writing .modal-footer{flex-shrink:0;min-height:46px;padding:12px 32px;background:#f9f9f9;border-top:1px solid #e7e7e7;color:#767676;font-size:12px;gap:12px}.focus-shortcut{font-size:11px;color:#8a8a8a}.focus-writing .storyboard{margin-top:40px}.focus-writing .shot{background:#f0f0f0}.focus-writing .shot textarea{font-size:15px;line-height:1.8!important}

@media(max-width:700px){.focus-writing .modal-header{grid-template-columns:auto 1fr;min-height:62px;padding:12px 18px;padding-top:max(12px,env(safe-area-inset-top));gap:8px}.focus-heading{display:none}.focus-writing .modal-header>.actions{gap:12px}.focus-writing .focus-exit{font-size:13px;min-height:38px}.focus-save-state{font-size:11px}.focus-writing .modal-header .primary{min-height:38px;padding:8px 16px;font-size:12px}.focus-writing .modal-body{padding:24px 20px 16px;scrollbar-gutter:auto}.focus-writing .title-input{font-size:25px;margin-bottom:26px;padding-bottom:19px}.focus-writing .modal-body textarea{font-size:16px}.focus-writing .modal-body .body-input{font-size:18px;line-height:2!important;min-height:2lh}.focus-writing .modal-footer{padding:11px 22px calc(11px + env(safe-area-inset-bottom));min-height:42px;font-size:11px}.focus-shortcut{display:none}}
/* Neutral workspace, with color reserved for controls and content groups. */
.sidebar{background:#f3f3f3;border-right-color:#e3e3e3}.app>main{background:#ffffff}.topbar{background:#ffffffed;border-bottom-color:#e6e6e6}.search{background:#f5f5f5;border-color:#e6e6e6}.hero{background:#ffffff;border-color:#e5e5e5;box-shadow:0 3px 16px #00000003}.hero:after{border-color:#f5f5f5}.creative-principle{background:linear-gradient(90deg,#f6f6f6,transparent)}.month-bar{background:#ffffff}.login-page{background:#f5f5f5}

/* Writing themes: local preference, separate from manuscript data. */
.immersive-backdrop{--writing-bg:#ffffff;--writing-ink:#323232;--writing-muted:#636363;--writing-line:#e5e5e5;--writing-placeholder:#767676;--writing-texture:none;background:var(--writing-bg)}
.immersive-backdrop[data-writing-theme=mist]{--writing-bg:#eeeeee;--writing-line:#d8d8d8}
.immersive-backdrop[data-writing-theme=ivory]{--writing-bg:#f5f5f5;--writing-ink:#363636;--writing-muted:#626262;--writing-line:#dddddd;--writing-placeholder:#717171}
.immersive-backdrop[data-writing-theme=stone]{--writing-bg:#f1f1f1;--writing-ink:#393939;--writing-muted:#606060;--writing-line:#dfdfdf;--writing-placeholder:#727272}
.immersive-backdrop[data-writing-theme=night]{--writing-bg:#272727;--writing-ink:#e8e8e8;--writing-muted:#bababa;--writing-line:#4b4b4b;--writing-placeholder:#afafaf}
.immersive-backdrop[data-writing-theme=cotton]{--writing-bg:#f4f4f4;--writing-ink:#323232;--writing-muted:#5e5e5e;--writing-line:#d9d9d9;--writing-placeholder:#6f6f6f;--writing-texture:linear-gradient(#f4f4f460,#f4f4f460),url('/backgrounds/cotton.png')}
.immersive-backdrop[data-writing-theme=linen]{--writing-bg:#f1f1f1;--writing-ink:#353535;--writing-muted:#636363;--writing-line:#dcdcdc;--writing-placeholder:#757575;--writing-texture:linear-gradient(#f1f1f160,#f1f1f160),url('/backgrounds/linen.png')}
.modal.large.focus-writing{position:relative;background-color:var(--writing-bg);background-image:var(--writing-texture);background-size:auto,650px 650px;color:var(--writing-ink)}
.focus-writing .modal-header,.focus-writing .modal-footer{background:var(--writing-bg);border-color:var(--writing-line);color:var(--writing-muted)}
.focus-writing .focus-heading,.focus-writing .focus-exit,.focus-writing .focus-save-state,.focus-writing .focus-shortcut,.focus-writing .field>span,.focus-writing .field:focus-within>span{color:var(--writing-muted)}
.focus-writing .title-input,.focus-writing .modal-body textarea{color:var(--writing-ink);caret-color:var(--writing-ink);border-color:var(--writing-line)}
.focus-writing .modal-body input::placeholder,.focus-writing .modal-body textarea::placeholder{color:var(--writing-placeholder)}
.focus-writing .shot{background:var(--writing-bg);border-color:var(--writing-line)}
.focus-writing .background-toggle{min-height:36px;font-size:12px;padding:8px 13px;background:transparent;color:var(--writing-ink);border-color:var(--writing-line)}
.focus-writing .background-toggle:hover{background:#88888812}
[data-writing-theme=night] .focus-writing .modal-header .primary{background:#dddddd;border-color:#dddddd;color:#282828}
[data-writing-theme=night] .focus-writing .modal-header .primary:hover{background:#ffffff}
.background-picker{position:absolute;top:68px;right:28px;width:380px;max-width:calc(100% - 32px);max-height:calc(100dvh - 140px);overflow:auto;padding:20px;background:#ffffff;color:#333333;border:1px solid #dfdfdf;border-radius:16px;box-shadow:0 15px 50px #19191925;z-index:5}
.background-picker .section-head{margin-bottom:14px}.background-picker h2{font-size:16px}.background-picker .icon-button{color:#656565}.background-picker p{font-size:11px;line-height:1.8;color:#686868;margin:14px 0 0}
.background-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.background-option{padding:7px 7px 10px;border-radius:10px;border:1px solid #e4e4e4;background:#ffffff;text-align:left;color:#3d3d3d;min-width:0}.background-option:hover{border-color:#a3a3a3;background:#f9f9f9}.background-option.selected{border:2px solid #6c6c6c;padding:6px 6px 9px;background:#f3f3f3}.background-option strong{display:block;font-size:12px;margin-top:7px}.background-option small{display:block;font-size:10px;color:#686868;margin-top:3px}
.background-swatch{display:flex;align-items:center;justify-content:center;height:48px;border-radius:5px;border:1px solid #0000000e;color:#363636;font-size:17px;background:#ffffff}.swatch-mist{background:#eeeeee}.swatch-ivory{background:#f5f5f5}.swatch-stone{background:#f1f1f1}.swatch-night{background:#272727;color:#e8e8e8}.swatch-cotton{background:#f4f4f4 url('/backgrounds/cotton.png') center/200px}.swatch-linen{background:#f1f1f1 url('/backgrounds/linen.png') center/200px}
@media(max-width:700px){.focus-writing .modal-header>.actions{gap:8px}.focus-writing .focus-save-state{display:none}.focus-writing .background-toggle{min-height:38px;padding:8px 12px}.background-picker{top:64px;right:16px;padding:16px;width:358px;max-height:calc(100dvh - 124px)}.background-options{gap:8px}}

/* Preserve the logo's own shape and color at every size. */
.brand img{background:transparent;border-radius:0;box-shadow:none}
/* Learning references are independent from the user's publishing accounts. */
.action-reference{background:#ececec;color:#595959}
.reference-intro{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:28px 32px;border:1px solid #e1e1e1;border-radius:18px;background:linear-gradient(110deg,#f4f4f4,#ffffff 75%);margin-bottom:24px}
.reference-intro h2{font-size:24px;line-height:1.5;margin:8px 0;color:#272727}
.reference-intro p{margin:0;color:#5e5e5e;font-size:14px}
.reference-count{display:flex;flex-direction:column;align-items:center;gap:4px;flex-shrink:0;color:#5e5e5e;font-size:12px}
.reference-count strong{font-size:36px;line-height:1.2;color:#4f4f4f}
.reference-toolbar{display:flex;flex-direction:column;gap:18px}
.reference-toolbar .tabs{flex-wrap:wrap}
.reference-filters{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.reference-filters input{flex:1;min-width:180px;background:#ffffff;border:1px solid #dddddd;border-radius:10px;padding:11px 14px;color:#252525;font:inherit}
.reference-filters select{max-width:180px}
.reference-filters .selected{background:#ececec;color:#494949;border:1px solid #c5c5c5}
.reference-result-count{font-size:13px;color:#666666;margin:20px 0 12px}
.reference-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.reference-card{display:flex;flex-direction:column;padding:22px;border:1px solid #e3e3e3;border-radius:16px;background:#ffffff;min-width:0;box-shadow:0 3px 14px #24242404;transition:box-shadow .18s,border-color .18s}
.reference-card:hover{border-color:#c0c0c0;box-shadow:0 8px 25px #4848480c}
.reference-card-top{display:flex;gap:12px;align-items:center}
.reference-card-top>div{display:flex;flex:1;flex-direction:column;gap:4px}
.reference-avatar{width:46px;height:46px;display:grid;place-items:center;flex-shrink:0;border-radius:14px;font-size:21px;font-weight:650}
.category-0{background:#eeeeee;color:#5b5b5b}.category-1{background:#efefef;color:#666666}.category-2{background:#ededed;color:#5f5f5f}
.reference-category{font-size:12px;font-weight:600;color:#575757}.reference-platform{font-size:12px;color:#6a6a6a}
.reference-open{display:block;text-align:left;background:none;border:0;padding:18px 0 12px;color:inherit;cursor:pointer;width:100%}
.reference-open h2{font-size:20px;line-height:1.5;overflow-wrap:anywhere;margin:0 0 18px}
.reference-open small{display:block;font-size:12px;color:#676767;font-weight:600;margin:10px 0 5px}
.reference-open p{font-size:14px;line-height:1.85;color:#484848;margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-line;overflow-wrap:anywhere}
.reference-card .tag-row{flex-wrap:wrap;margin:4px 0 18px}
.reference-card footer{margin-top:auto;border-top:1px solid #eeeeee;padding-top:14px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:12px;color:#6b6b6b}
.reference-link{color:#585858;text-decoration:none;font-weight:600}.reference-link:hover{text-decoration:underline}
.reference-card footer .button{font-size:12px;padding:5px 0}
.reference-search-results{margin-top:32px}.reference-search-results>h2{font-size:19px;margin-bottom:18px}
@media(max-width:1200px){.reference-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.reference-grid{grid-template-columns:minmax(0,1fr)}.reference-intro{padding:20px;gap:12px}.reference-intro h2{font-size:20px}.reference-intro .eyebrow{font-size:11px}.reference-intro p{font-size:12px}.reference-count strong{font-size:30px}.reference-count span{max-width:68px;text-align:center}.reference-filters input{width:100%;flex-basis:100%}.reference-card{padding:20px}.reference-toolbar .tabs .button{font-size:13px;padding:9px 12px}}
/* A quiet, warm notebook alongside the white workspace. */
.quick-actions{grid-template-columns:repeat(5,minmax(0,1fr))}
.action-note{color:#676767}.action-note:hover{background:#f8f8f8;border-color:#d5d5d5}
.nav-item[aria-current=page]:has(span){font-weight:600}
.notes-intro{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:27px 30px;margin-bottom:24px;border:1px solid #dfdfdf;border-radius:18px;background:linear-gradient(110deg,#f8f8f8,#ffffff 85%)}
.notes-intro .eyebrow{color:#737373}.notes-intro h2{margin:9px 0;font-size:23px;line-height:1.5;color:#373737}.notes-intro p{margin:0;font-size:14px;line-height:1.8;color:#6c6c6c}
.note-start-actions{display:flex;gap:10px;flex-shrink:0;flex-wrap:wrap}.note-start-actions .button{color:#5a5a5a;border-color:#d4d4d4;background:#ffffff}
.note-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.note-card{min-width:0;display:flex;flex-direction:column;padding:23px;background:#ffffff;border:1px solid #e1e1e1;border-radius:16px;box-shadow:0 4px 16px #39393904;transition:box-shadow .18s,border-color .18s}
.note-card:hover{border-color:#c2c2c2;box-shadow:0 8px 25px #5353530b}
.note-kind{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:600;color:#6e6e6e}.note-idea .note-kind{color:#727272}
.note-open{padding:17px 0 13px;width:100%;text-align:left;background:none;border:0;cursor:pointer;color:inherit}
.note-open h2{font-size:19px;line-height:1.6;margin:0 0 10px;overflow-wrap:anywhere;color:#2f2f2f}
.note-open p,.note-takeaway p{font-size:14px;line-height:1.9;margin:0;color:#5d5d5d;white-space:pre-line;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.note-takeaway{padding:12px 14px;margin-bottom:16px;background:#f7f7f7;border-radius:9px}.note-idea .note-takeaway{background:#f5f5f5}.note-takeaway small{display:block;margin-bottom:5px;color:#696969;font-size:11px;font-weight:600}.note-takeaway p{-webkit-line-clamp:2;font-size:13px}
.note-card .tag-row{flex-wrap:wrap;margin:0 0 15px}.note-source{display:flex;gap:12px;justify-content:space-between;font-size:11px;color:#747474;line-height:1.7;margin-top:auto;padding:8px 0 14px;overflow-wrap:anywhere}
.note-card footer{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:6px;padding-top:12px;border-top:1px solid #ececec;font-size:11px;color:#7a7a7a}.note-card footer .button{font-size:12px;padding:6px 0}.note-card footer .actions{gap:14px}.note-card .reference-link{color:#676767}
.note-related{margin-top:30px}.note-related>h2{font-size:19px;margin-bottom:16px}
.note-analysis{border:1px solid #dddddd;border-radius:12px;margin:0 0 24px;background:#fdfdfd}
.note-analysis summary{display:flex;align-items:center;gap:12px;cursor:pointer;padding:17px 20px;font-size:15px;font-weight:600;color:#525252;list-style:none}
.note-analysis summary:before{content:'+';font-weight:400;font-size:20px}.note-analysis[open] summary:before{content:'−'}.note-analysis summary span{margin-left:auto;color:#7e7e7e;font-size:12px;font-weight:400}
.note-analysis-fields{padding:8px 20px 4px}.note-title-input{font-size:19px!important;font-weight:600}.note-editor-hint{font-size:12px;line-height:1.8;color:#767676;margin:17px 0 0}
@media(max-width:1200px){.note-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.notes-intro{flex-wrap:wrap}.quick-action{padding-left:12px;padding-right:12px}}
@media(max-width:700px){.quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-actions>.quick-action:last-child{grid-column:1/-1}.notes-intro{padding:20px;gap:16px}.notes-intro h2{font-size:20px}.notes-intro p{font-size:12px}.note-start-actions{width:100%}.note-start-actions .button{flex:1;font-size:12px;padding:9px}.note-grid{grid-template-columns:minmax(0,1fr)}.note-card{padding:20px}.note-analysis summary{padding:14px 12px;gap:8px;font-size:14px}.note-analysis summary span{font-size:10px}.note-analysis-fields{padding:6px 12px}.note-source{font-size:12px}}
.topic-editor-intro{display:flex;align-items:center;gap:12px;padding:14px 17px;margin-bottom:22px;border-radius:11px;background:#f6f6f6;color:#616161}
.topic-editor-intro svg{flex-shrink:0}.topic-editor-intro p{font-size:13px;line-height:1.8;margin:0}
.topic-title-input{font-size:19px!important;font-weight:600;color:#313131}
.topic-plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0 0 25px}
.topic-plan-field{display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid #e0e0e0;border-radius:12px;background:#fdfdfd;min-width:0}
.topic-plan-field>span{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:600;color:#454545}
.topic-plan-field b{font-size:11px;font-weight:600;color:#767676;background:#ebebeb;border-radius:6px;padding:5px 6px}
.topic-plan-field textarea{min-width:0;width:100%;resize:vertical;font:inherit;font-size:14px;line-height:1.9;padding:10px 12px;background:#ffffff;border:1px solid #e1e1e1;color:#323232;border-radius:8px}
.topic-plan-field textarea::placeholder{color:#787878}
.topic-editor-hint{font-size:12px;color:#6a6a6a;line-height:1.8;margin:0}
.type-topic footer .button{font-size:12px;min-height:30px;padding:4px 0}
@media(max-width:700px){.topic-plan-grid{grid-template-columns:minmax(0,1fr);gap:12px}.topic-plan-field textarea{font-size:16px}.topic-editor-intro{padding:12px}.topic-editor-intro p{font-size:12px}.topic-plan-field{padding:14px}.topic-title-input{font-size:18px!important}}
.subtitle-backdrop{position:fixed;inset:0;z-index:90;background:#ffffff;color:#2a2a2a}
.subtitle-studio{height:100dvh;display:flex;flex-direction:column;background:#ffffff}
.subtitle-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 32px;border-bottom:1px solid #e4e4e4;background:#fafafa;flex-shrink:0}
.subtitle-header h2{font-size:24px;margin:5px 0}.subtitle-header p{font-size:13px;color:#646464;margin:0;overflow-wrap:anywhere;max-width:70vw}.subtitle-header .eyebrow{font-size:11px;color:#6c6c6c}
.subtitle-scroll{flex:1;min-height:0;overflow:auto;padding:24px 32px}
.subtitle-controls{padding:20px;border:1px solid #e1e1e1;border-radius:14px;background:#fafafa;margin-bottom:16px}
.subtitle-presets{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:18px}.subtitle-presets strong{font-size:14px;margin-right:10px}.subtitle-presets .button{font-size:12px;padding:8px 14px;min-height:34px}
.subtitle-rule-fields{display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:20px}.subtitle-rule-fields .field{margin-bottom:16px}.subtitle-rule-fields input,.subtitle-rule-fields select{width:100%}
.subtitle-toggles{display:flex;gap:20px;align-items:center;flex-wrap:wrap}.subtitle-check{display:flex;align-items:center;gap:8px;font-size:13px;color:#444444;cursor:pointer}.subtitle-check input{width:16px;height:16px;min-height:0;accent-color:#5d5d5d}
.subtitle-help{font-size:12px;line-height:1.8;color:#6d6d6d;margin:12px 0 0}.subtitle-warning{background:#f8f8f8;border:1px solid #dddddd;color:#656565;padding:12px 16px;border-radius:10px;font-size:13px;line-height:1.8}.subtitle-message{color:#6a6a6a;font-size:13px;margin:12px 0}
.subtitle-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;margin-top:20px}.subtitle-columns section{min-width:0}.subtitle-columns h3{font-size:16px;margin:0}.subtitle-columns .section-head{margin-bottom:12px}.subtitle-columns .section-head>span{font-size:12px;color:#727272}
.subtitle-columns textarea{display:block;width:100%;height:clamp(280px,42vh,650px);resize:vertical;padding:18px 20px;font-size:17px;line-height:2;border:1px solid #d6d6d6;border-radius:12px;color:#2f2f2f;background:#ffffff;tab-size:4}.subtitle-columns textarea[readonly]{background:#f7f7f7;color:#696969;border-color:#e3e3e3}
.subtitle-footer{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:16px 32px;background:#fafafa;border-top:1px solid #e4e4e4;flex-shrink:0}.subtitle-footer>span{font-size:12px;color:#6f6f6f}.subtitle-footer .button{font-size:13px}
@media(max-width:700px){.modal-header:has(.focus-toggle) .actions{flex-wrap:wrap;justify-content:flex-end}.modal-header:has(.focus-toggle) .actions>.button{font-size:11px;padding:7px 9px}.subtitle-header{padding:14px 16px}.subtitle-header h2{font-size:21px}.subtitle-header p{max-width:65vw;font-size:12px}.subtitle-header>.button{flex-shrink:0;font-size:12px;padding:8px 10px}.subtitle-scroll{padding:16px}.subtitle-controls{padding:15px}.subtitle-presets{gap:7px}.subtitle-presets strong{width:100%}.subtitle-rule-fields{grid-template-columns:minmax(0,1fr);gap:0}.subtitle-toggles{gap:13px}.subtitle-rule-fields input,.subtitle-rule-fields select{font-size:16px}.subtitle-columns{grid-template-columns:minmax(0,1fr);gap:20px}.subtitle-columns textarea{font-size:16px;min-height:190px;height:260px}.subtitle-columns textarea[readonly]{height:160px;min-height:140px}.subtitle-footer{padding:12px 14px max(12px,env(safe-area-inset-bottom));flex-wrap:wrap;gap:9px}.subtitle-footer>.actions{width:100%;justify-content:space-between;gap:7px}.subtitle-footer .button{padding:9px 10px;font-size:12px}.subtitle-help{font-size:11px}}
.autosave-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 28px;background:#f5f5f5;border-bottom:1px solid #e8e8e8;color:#5a5a5a;flex-shrink:0;font-size:12px;line-height:1.7}
.autosave-bar small{color:#717171;font-size:11px}.autosave-bar .button{font-size:11px;min-height:24px;padding:2px 5px}
.draft-recovery{display:flex;gap:14px;align-items:center;padding:16px 20px;margin-bottom:18px;background:#f8f8f8;border:1px solid #d8d8d8;border-radius:12px;color:#575757}
.draft-recovery>div{flex:1;min-width:0}.draft-recovery strong{font-size:14px}.draft-recovery p{margin:5px 0 0;overflow-wrap:anywhere;font-size:12px}.draft-recovery .button{font-size:12px}
@media(max-width:700px){.autosave-bar{padding:8px 16px;flex-wrap:wrap;gap:3px}.autosave-bar small{width:100%;font-size:10px}.draft-recovery{flex-wrap:wrap;padding:15px}.draft-recovery>div{flex-basis:100%}.focus-save-state{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
.focus-writing>.autosave-bar{display:none}
