:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#20252a;background:#f4f2ed;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-width:320px}button,input,textarea,select{font:inherit}button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #2c5149;border-radius:6px;background:#2c5149;color:#fffdf9;cursor:pointer;font-size:.9rem;font-weight:650;min-height:40px;padding:0 14px}button:disabled{cursor:not-allowed;opacity:.64}input,textarea,select{width:100%;min-width:0;border:1px solid #c8c0b1;border-radius:6px;background:#fffdf9;color:#20252a;padding:10px 12px}textarea{line-height:1.55;resize:vertical}input:focus,textarea:focus,select:focus,button:focus-visible,a:focus-visible{outline:3px solid rgba(44,81,73,.22);outline-offset:2px}a{color:inherit}.app-shell{min-height:100vh;display:grid;grid-template-columns:minmax(210px,250px) minmax(0,1fr) minmax(300px,380px);background:#f4f2ed}.nav-panel,.side-panel{min-width:0;padding:16px}.nav-panel{border-right:1px solid #d8d1c4;background:#fffdf9}.workspace-main{min-width:0;display:grid;align-content:start;gap:16px;padding:20px}.side-panel{display:grid;align-content:start;gap:16px;border-left:1px solid #d8d1c4;background:#faf9f5}.login-screen{min-height:100vh;display:grid;place-items:center;padding:24px;background:#f4f2ed}.login-form{width:min(100%,400px);display:grid;gap:16px;border:1px solid #d8d1c4;border-radius:8px;background:#fffdf9;padding:24px;box-shadow:0 18px 45px #20252a14}.login-form label,.inbox-form label,.editor-form label,.compare-form label{display:grid;gap:6px;min-width:0;color:#4f5d64;font-size:.82rem;font-weight:700}.login-form label{font-size:.88rem}.form-alert{margin:0;color:#9d2e22;font-size:.92rem;line-height:1.45}.brand-lockup,.panel-header,.nav-list a,.section-title,.rail-heading,.status-note,.stat-strip{display:flex;align-items:center}.brand-lockup{gap:12px}.brand-lockup svg,.nav-list svg,.panel-header svg,.section-title svg,.rail-heading svg,.status-note svg{flex:0 0 auto}.brand-lockup h1,.panel-header h1,.workspace-section h2,.consilium-panel h2,.rail-heading h2{margin:0;letter-spacing:0}.brand-lockup h1{font-size:1.45rem}.auth-mode-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;border:1px solid #d8d1c4;border-radius:8px;background:#f7f5ef;padding:4px}.auth-mode-button{min-width:0;border-color:transparent;background:transparent;color:#4f5d64}.auth-mode-button.active{border-color:#2c5149;background:#fffdf9;color:#1f423c}.brand-lockup p,.panel-header p,.workspace-section p,.consilium-panel p{margin:4px 0 0;color:#596770;line-height:1.55}.panel-header{justify-content:space-between;gap:12px;margin-bottom:18px}.panel-header h1{font-size:1.15rem}.icon-button{display:inline-grid;width:38px;min-height:38px;place-items:center;border-color:#d8d1c4;background:#fffdf9;color:#38454c;padding:0}.nav-list{display:grid;gap:6px;margin:16px 0}.nav-list a{min-height:40px;gap:10px;border-radius:6px;color:#38454c;font-size:.94rem;font-weight:650;padding:0 10px;text-decoration:none}.nav-list a[aria-current=page],.nav-list a:hover{background:#edf1ec;color:#1f423c}.rail-block{display:grid;gap:10px;border-top:1px solid #ebe5da;padding:14px 0}.rail-heading{gap:8px;color:#596770}.rail-heading h2{color:#596770;font-size:.78rem;font-weight:750;text-transform:uppercase}.rail-action{width:100%;justify-content:flex-start;border-color:#d8d1c4;background:#fffdf9;color:#56636b}.label-stack{display:flex;flex-wrap:wrap;gap:6px}.label-stack span,.role-status,.stat-strip span{border:1px solid #d8d1c4;border-radius:999px;background:#f7f5ef;color:#4f5d64;font-size:.76rem;font-weight:700;line-height:1;padding:6px 8px}.recent-list{display:grid;gap:6px;margin:0;padding:0;list-style:none;color:#38454c;font-size:.9rem}.workspace-section,.consilium-panel{min-width:0;border:1px solid #d8d1c4;border-radius:8px;background:#fffdf9;padding:16px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.section-title{min-width:0;gap:8px}.section-title h2{color:#20252a;font-size:1rem;line-height:1.2}.status-note{flex:0 0 auto;gap:6px;color:#647178;font-size:.8rem;font-weight:700}.status-note.success{color:#2c6b54}.status-note.dirty{color:#8b5b20}.status-note.local,.status-note.neutral{color:#647178}.field-grid{display:grid;gap:12px}.field-grid.two{grid-template-columns:minmax(0,1fr) minmax(120px,160px)}.field-grid.four{grid-template-columns:minmax(220px,2fr) repeat(3,minmax(110px,1fr))}.title-field{min-width:0}.inbox-form,.editor-form,.compare-form{display:grid;gap:12px}.source-textarea{min-height:180px}.chapter-textarea{min-height:440px;max-height:70vh;overflow:auto}.compare-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.compare-textarea{min-height:260px;max-height:48vh;overflow:auto}.action-row{display:flex;justify-content:flex-end;gap:10px}.primary-button,.secondary-button{white-space:nowrap}.secondary-button{border-color:#c8c0b1;background:#fffdf9;color:#2c5149}.full-width{width:100%}.stat-strip{flex-wrap:wrap;justify-content:flex-end;gap:6px}.result-card,.role-card{border:1px solid #d8d1c4;border-radius:8px;background:#fdfbf6;padding:12px}.result-card>div,.role-card-header{display:flex;align-items:center;justify-content:space-between;gap:10px}.result-card span,.provider-line{color:#6a767d;font-size:.8rem;font-weight:650}.result-card.error{border-color:#d9a79e;background:#fff8f6}.result-meta{text-align:right}.role-list{display:grid;gap:10px;margin-bottom:12px}.role-card p{font-size:.9rem}.role-status.error{border-color:#d9a79e;color:#9d2e22}.role-error{color:#9d2e22}.spin{animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:980px){.app-shell{grid-template-columns:minmax(190px,230px) minmax(0,1fr)}.side-panel{grid-column:1 / -1;grid-template-columns:repeat(2,minmax(0,1fr));border-top:1px solid #d8d1c4;border-left:0}.field-grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.app-shell{display:block}.nav-panel{border-right:0;border-bottom:1px solid #d8d1c4}.workspace-main,.nav-panel,.side-panel{padding:14px}.nav-list{grid-template-columns:repeat(2,minmax(0,1fr))}.nav-list a{justify-content:center;min-width:0}.side-panel{display:grid;grid-template-columns:1fr}.field-grid.two,.field-grid.four,.compare-grid{grid-template-columns:1fr}.section-heading{align-items:flex-start;flex-direction:column}.chapter-textarea{min-height:360px}.compare-textarea{min-height:220px}}.rail-form{display:grid;gap:8px}.rail-form label,.saved-compare label{display:grid;gap:5px;color:#4f5d64;font-size:.78rem;font-weight:700}.rail-status{display:inline-flex;align-items:center;gap:6px;color:#647178;font-size:.8rem;font-weight:700}.rail-status.success{color:#2c6b54}.rail-error,.rail-note,.form-hint{margin:0;font-size:.82rem;line-height:1.45}.rail-error{color:#9d2e22}.rail-note,.form-hint{color:#657178;overflow-wrap:anywhere}.rail-current{display:grid;gap:3px;color:#38454c;font-size:.86rem;overflow-wrap:anywhere}.rail-current span{color:#657178}.version-list{display:grid;gap:6px;margin:0;padding:0;list-style:none}.version-button{width:100%;min-height:0;display:grid;justify-items:start;gap:3px;border-color:#d8d1c4;background:#fffdf9;color:#38454c;padding:8px 10px;text-align:left;white-space:normal}.version-button[aria-current=true]{border-color:#2c5149;background:#edf1ec}.version-button span,.version-button small{max-width:100%;overflow-wrap:anywhere}.version-button small{color:#657178;font-size:.74rem;font-weight:700}.field-grid.three{grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr))}.wrap-actions{flex-wrap:wrap}.saved-compare{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px;margin-bottom:10px}.diff-result{display:grid;gap:10px;margin-bottom:12px;border:1px solid #d8d1c4;border-radius:8px;background:#fdfbf6;padding:12px}.diff-stats{display:flex;flex-wrap:wrap;gap:6px}.diff-stats span{border:1px solid #d8d1c4;border-radius:999px;background:#f7f5ef;color:#4f5d64;font-size:.76rem;font-weight:700;line-height:1;padding:6px 8px}.diff-result pre{max-height:300px;margin:0;overflow:auto;border-radius:6px;background:#20252a;color:#fffdf9;font-size:.82rem;line-height:1.5;padding:10px;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:720px){.field-grid.three,.saved-compare{grid-template-columns:1fr}.action-row{justify-content:flex-start}}.provider-admin{display:grid;gap:16px}.provider-admin .section-title{align-items:flex-start}.provider-defaults,.provider-badges,.provider-actions{display:flex;flex-wrap:wrap;gap:8px}.provider-defaults span,.provider-badges span{border:1px solid #d8d1c4;border-radius:999px;background:#f7f5ef;color:#4f5d64;font-size:.76rem;font-weight:700;line-height:1;padding:6px 8px}.provider-kind-list{display:grid;gap:16px}.provider-kind{display:grid;gap:10px;border-top:1px solid #ebe5da;padding-top:14px}.provider-kind-heading,.provider-row-main{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.provider-kind-heading h3,.provider-row h4{margin:0;color:#20252a;letter-spacing:0}.provider-kind-heading h3{font-size:.95rem}.provider-row h4{font-size:.94rem}.provider-kind-heading p,.provider-row p{margin:4px 0 0;color:#657178;font-size:.86rem;line-height:1.45}.provider-list{display:grid;gap:10px}.provider-row{display:grid;gap:12px;border:1px solid #d8d1c4;border-radius:8px;background:#fdfbf6;padding:12px}.provider-controls{display:grid;grid-template-columns:minmax(150px,1fr) minmax(120px,.8fr) minmax(120px,.8fr) minmax(130px,1fr) minmax(130px,1fr);gap:10px}.provider-controls label{display:grid;gap:5px;min-width:0;color:#4f5d64;font-size:.78rem;font-weight:700}.provider-actions{align-items:center;justify-content:flex-end}.toggle-line{display:inline-flex;align-items:center;gap:7px;color:#4f5d64;font-size:.84rem;font-weight:700}.toggle-line input{width:auto;min-width:0}.provider-admin .form-alert,.provider-admin .status-note{display:inline-flex;align-items:center;gap:7px}@media(max-width:1180px){.provider-controls{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.provider-kind-heading,.provider-row-main{display:grid}.provider-controls{grid-template-columns:1fr}.provider-actions{justify-content:flex-start}}.consilium-workspace{display:grid;gap:14px}.consilium-heading{align-items:flex-start;margin-bottom:0}.consilium-heading .section-title{align-items:flex-start}.consilium-heading .section-title p{margin:3px 0 0;font-size:.86rem}.consilium-run-button{flex:0 0 auto}.consilium-grid{grid-template-columns:repeat(auto-fit,minmax(250px,1fr));align-items:start;gap:12px;margin-bottom:0}.consilium-role-card{display:grid;gap:0;padding:0;overflow:hidden;transition:border-color .18s ease,background .18s ease,box-shadow .18s ease}.consilium-role-card.expanded{grid-column:1 / -1;background:#fffdf9;box-shadow:0 14px 30px #20252a0f}.consilium-role-card.has-error{border-color:#d9a79e;background:#fff8f6}.role-disclosure,.section-disclosure{width:100%;min-height:0;justify-content:space-between;border:0;background:transparent;color:#20252a;padding:0;text-align:left;white-space:normal}.role-disclosure{padding:12px 12px 8px}.role-disclosure:hover,.section-disclosure:hover{color:#1f423c}.role-disclosure:disabled{cursor:default;opacity:1}.role-title-group{display:grid;gap:3px;min-width:0}.role-title-group strong{font-size:1rem;line-height:1.2}.role-card-actions{display:inline-flex;align-items:center;flex:0 0 auto;gap:8px}.disclosure-icon{flex:0 0 auto;color:#596770;transition:transform .18s ease}.role-disclosure[aria-expanded=true] .disclosure-icon,.section-disclosure[aria-expanded=true] .disclosure-icon{transform:rotate(180deg)}.role-preview{display:-webkit-box;margin:0 12px 12px;overflow:hidden;color:#596770;font-size:.9rem;line-height:1.5;-webkit-box-orient:vertical;-webkit-line-clamp:3}.consilium-role-card.expanded .role-preview{margin-bottom:0;-webkit-line-clamp:2}.role-collapse,.collapse-region{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .24s ease,opacity .18s ease}.role-collapse[data-open=true],.collapse-region[data-open=true]{grid-template-rows:1fr;opacity:1}.role-collapse-inner,.collapse-region-inner{min-height:0;overflow:hidden}.role-collapse-inner{padding:0 12px}.role-collapse[data-open=true] .role-collapse-inner{padding-bottom:14px}.ai-response{max-width:76ch;border-left:3px solid #2c5149;border-radius:6px;background:#f7f5ef;color:#38454c;font-size:.95rem;line-height:1.65;padding:14px 16px}.ai-response p{margin:0 0 10px;color:inherit}.ai-response p:last-child{margin-bottom:0}.ai-response strong{color:#20252a;font-weight:750}.compare-section{scroll-margin-top:12px}.compare-summary{align-items:center;margin-bottom:0}.compare-section.is-open .compare-summary{border-bottom:1px solid #ebe5da;padding-bottom:14px}.compare-summary .stat-strip{flex:0 0 auto}.section-disclosure{flex:1 1 auto}.section-disclosure .section-title{align-items:flex-start}.section-title small{display:block;margin-top:3px;color:#657178;font-size:.78rem;font-weight:650;line-height:1.35}.collapse-region-inner{display:grid;gap:12px;padding-top:0}.collapse-region[data-open=true] .collapse-region-inner{padding-top:14px}@media(max-width:980px){.consilium-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.consilium-grid{grid-template-columns:1fr}.consilium-run-button{width:100%}.compare-summary{align-items:stretch}.compare-summary .stat-strip{justify-content:flex-start}.ai-response{max-width:none;font-size:.92rem}}@media(prefers-reduced-motion:reduce){.consilium-role-card,.disclosure-icon,.role-collapse,.collapse-region{transition:none}}.app-shell.writer-flow-shell{grid-template-columns:minmax(210px,250px) minmax(0,980px);justify-content:start}.writer-flow-shell .workspace-main{width:min(100%,980px)}.intake-section .section-title{align-items:flex-start}.intake-section .section-title p,.editorial-heading .section-title p{margin:3px 0 0;font-size:.86rem}.intake-meta-grid{grid-template-columns:minmax(0,1fr) minmax(150px,220px)}.intake-textarea{min-height:230px}.editorial-panel{display:grid;gap:14px}.editorial-heading{align-items:flex-start;margin-bottom:0}.editorial-heading .section-title{align-items:flex-start}.editorial-run-button{flex:0 0 auto}.editorial-result,.editorial-empty{border:1px solid #d8d1c4;border-radius:8px;background:#fdfbf6;padding:14px}.editorial-result.error{border-color:#d9a79e;background:#fff8f6}.editorial-result-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.editorial-result-header span{display:inline-flex;align-items:center;gap:7px;color:#2c6b54;font-size:.82rem;font-weight:760}.editorial-result-header small{color:#6a767d;font-size:.78rem;font-weight:700}.editorial-empty{display:grid;gap:4px;color:#596770;font-size:.9rem;line-height:1.5}.editorial-empty strong{color:#38454c}.editorial-response{max-width:none;border-left:0;background:transparent;padding:0}.ai-response-section{display:grid;gap:6px;border-top:1px solid #ebe5da;padding-top:12px}.ai-response-section:first-child{border-top:0;padding-top:0}.ai-response-section h3{margin:0;color:#20252a;font-size:.84rem;font-weight:780;letter-spacing:0}.ai-response-section p{max-width:82ch;margin:0;color:#38454c;font-size:.96rem;line-height:1.65}@media(max-width:980px){.app-shell.writer-flow-shell{grid-template-columns:minmax(190px,230px) minmax(0,1fr)}.writer-flow-shell .workspace-main{width:100%}}@media(max-width:720px){.app-shell.writer-flow-shell{display:block}.intake-meta-grid{grid-template-columns:1fr}.editorial-run-button{width:100%}}
