:root{--bg:#f6f7f9;--surface:#fff;--surface-2:#f0f2f5;--border:#d9dee5;--border-strong:#c2cad4;--text:#1b2530;--text-muted:#5b6672;--accent:#1f6f8b;--accent-hover:#185a71;--accent-contrast:#fff;--accent-soft:#1f6f8b1a;--success:#2e7d5b;--danger:#b3352b;--danger-soft:#b3352b1a;--focus:#1f6f8b;--radius:8px;--radius-sm:6px;--shadow:0 1px 2px #1018200a, 0 2px 8px #1018200f;--sans:system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--mono:ui-monospace, "SF Mono", Menlo, Consolas, monospace;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;font:15px/1.55 var(--sans);color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;--bg:#0f1419;--surface:#161b22;--surface-2:#1c232c;--border:#2a323c;--border-strong:#3a444f;--text:#e6eaef;--text-muted:#9aa5b1;--accent:#4bb6d6;--accent-hover:#63c3e0;--accent-contrast:#0f1419;--accent-soft:#4bb6d624;--success:#5cc191;--danger:#e0796f;--danger-soft:#e0796f24;--focus:#4bb6d6;--shadow:0 1px 2px #0000004d, 0 2px 10px #00000059}}*{box-sizing:border-box}body{min-height:100svh;margin:0}h1,h2,h3{color:var(--text);margin:0;font-weight:600;line-height:1.25}p{margin:0}button,input,textarea{font:inherit;color:inherit}:focus-visible{outline:2px solid var(--focus);outline-offset:2px}.visually-hidden{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.app-shell{flex-direction:column;min-height:100svh;display:flex}.app-header{background:var(--surface);border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;gap:16px;padding:14px 24px;display:flex}.app-header__brand{align-items:center;gap:12px;display:flex}.app-header__mark{border-radius:var(--radius-sm);background:var(--accent);width:38px;height:38px;color:var(--accent-contrast);letter-spacing:.5px;place-items:center;font-size:14px;font-weight:700;display:grid}.app-header__title{font-size:17px}.app-header__subtitle{color:var(--text-muted);font-size:13px}.app-header__meta{align-items:center;gap:16px;display:flex}.app-header__job{color:var(--text-muted);font-family:var(--mono);font-size:12px}.user-badge{align-items:center;gap:10px;display:flex}.user-badge__name{color:var(--text-muted);text-overflow:ellipsis;white-space:nowrap;max-width:200px;font-size:13px;overflow:hidden}.user-badge__signout{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);cursor:pointer;padding:6px 12px;font-size:12px}.user-badge__signout:hover{border-color:var(--accent);background:var(--accent-soft)}.app-main{flex:1;grid-template-columns:340px minmax(0,1fr) 340px;grid-template-areas:"side content chat";align-items:start;gap:20px;width:100%;max-width:1680px;margin:0 auto;padding:20px 24px;display:grid}@media (width<=1239px){.app-main{grid-template-columns:340px minmax(0,1fr);grid-template-areas:"side content""chat content"}.app-main--reviewing{grid-template-areas:"chat content""side content"}}@media (width<=900px){.app-main{grid-template-columns:minmax(0,1fr);grid-template-areas:"side""content""chat"}}.app-sidebar{flex-direction:column;grid-area:side;gap:16px;display:flex}.app-content{grid-area:content;min-width:0}.app-chat{grid-area:chat;min-width:0}@media (width>=1240px){.app-chat{position:sticky;top:16px}.app-chat .chat-panel{flex-direction:column;max-height:calc(100vh - 32px);display:flex}.app-chat .chat-panel__log{flex:1;min-height:200px;max-height:none}}.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px}.panel__title{margin-bottom:4px;font-size:15px}.panel__hint{color:var(--text-muted);margin-bottom:12px;font-size:13px}.btn{border-radius:var(--radius-sm);cursor:pointer;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;gap:6px;padding:7px 14px;font-size:14px;font-weight:500;transition:background .15s,border-color .15s,color .15s;display:inline-flex}.btn:disabled{opacity:.5;cursor:not-allowed}.btn--primary{background:var(--accent);color:var(--accent-contrast)}.btn--primary:not(:disabled):hover{background:var(--accent-hover)}.btn--secondary{background:var(--accent-soft);color:var(--accent)}.btn--secondary:not(:disabled):hover{background:var(--accent-soft);border-color:var(--accent)}.btn--ghost{border-color:var(--border-strong);color:var(--text)}.btn--ghost:not(:disabled):hover{background:var(--surface-2)}.btn--sm{padding:3px 8px;font-size:12px}.btn--danger{color:#fff;background:#c0392b;border-color:#c0392b}.btn--danger:not(:disabled):hover{background:#a93226;border-color:#a93226}.job-delete{align-items:center;gap:8px;display:inline-flex}.job-delete__prompt{color:var(--text-muted);font-size:13px}.upload-list{flex-direction:column;gap:8px;margin:0 0 16px;padding:0;list-style:none;display:flex}.upload-row{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2);flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:10px;padding:10px 12px;display:flex}.upload-row__actions{flex-wrap:wrap;flex-basis:100%;justify-content:center;gap:6px;display:flex}.upload-row__meta{flex-direction:column;flex:100%;gap:4px;min-width:0;display:flex}.upload-row__files{flex-direction:column;gap:4px;margin:0;padding:0;list-style:none;display:flex}.upload-row__file-item{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 8px;min-width:0;display:flex}.upload-row__file-actions{flex-shrink:0;gap:4px;display:flex}.upload-row__label{align-items:center;gap:6px;font-size:13px;font-weight:600;display:flex}.upload-row__req{color:var(--danger)}.upload-row__opt{color:var(--text-muted);text-transform:uppercase;letter-spacing:.4px;font-size:11px;font-weight:400}.upload-row__file{color:var(--text);font-size:12px;font-family:var(--mono);text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;min-width:110px;max-width:100%;overflow:hidden}.upload-row__empty{color:var(--text-muted);font-size:12px}.upload-row__paste{flex-direction:column;flex-basis:100%;gap:8px;display:flex}.upload-row__paste-label{display:block}.upload-row__paste-input{box-sizing:border-box;resize:vertical;width:100%;font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 10px;font-size:13px}.upload-row__paste-actions{gap:8px;display:flex}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.upload-panel__generate{width:100%;margin-bottom:12px}.upload-row--dragover{border-style:dashed;border-color:var(--accent);background:var(--accent-soft)}.status-badge__header{justify-content:space-between;align-items:center;margin-bottom:12px;display:flex}.status-badge__label{color:var(--text-muted);font-size:13px;font-weight:600}.status-pill{background:var(--accent-soft);color:var(--accent);border-radius:999px;padding:3px 10px;font-size:12px;font-weight:600}.status-pill--error{background:var(--danger-soft);color:var(--danger)}.status-badge__error{color:var(--danger);font-size:13px}.status-steps{flex-direction:column;gap:0;margin:0;padding:0;list-style:none;display:flex}.status-steps__item{color:var(--text-muted);align-items:center;gap:10px;padding:4px 0;font-size:13px;display:flex;position:relative}.status-steps__item:not(:last-child):after{content:"";background:var(--border);width:2px;position:absolute;top:22px;bottom:-4px;left:5px}.status-steps__dot{border:2px solid var(--border-strong);background:var(--surface);z-index:1;border-radius:50%;flex-shrink:0;width:12px;height:12px}.status-steps__item--done{color:var(--text)}.status-steps__item--done .status-steps__dot{background:var(--success);border-color:var(--success)}.status-steps__item--done:not(:last-child):after{background:var(--success)}.status-steps__item--active{color:var(--text);font-weight:600}.status-steps__item--active .status-steps__dot{background:var(--accent);border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.draft-review{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px}.draft-review__header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px;display:flex}.draft-review__export{gap:8px;display:flex}.draft-review__sections{flex-direction:column;gap:20px;display:flex}.section-editor{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-2);padding:16px}.section-editor__header{justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:10px;display:flex}.section-editor__title{font-size:15px}.section-editor__version{font-family:var(--mono);color:var(--text-muted);font-size:12px}.section-editor__field{display:block}.section-editor__textarea{resize:vertical;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--surface);width:100%;color:var(--text);padding:12px;line-height:1.6}.phrase-library{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2);flex-direction:column;gap:8px;padding:10px 12px;display:flex}.phrase-library__empty{color:var(--text-muted);margin:0;font-size:12px}.phrase-library__list{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.phrase-library__item{flex-wrap:wrap;align-items:center;gap:6px;min-width:0;display:flex}.phrase-library__label{flex:none;font-size:12px;font-weight:600}.phrase-library__text{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--text-muted);flex:120px;font-size:12px;overflow:hidden}.phrase-library__item-actions{flex-shrink:0;gap:4px;display:flex}.phrase-library__form{flex-direction:column;gap:6px;display:flex}.phrase-library__input{box-sizing:border-box;width:100%;font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:6px 8px;font-size:12px}.phrase-library__textarea{resize:vertical}.phrase-library__form-actions{flex-wrap:wrap;gap:6px;display:flex}.phrase-library__notice{color:var(--text-muted);margin:0;font-size:11px}.section-editor__selection{border:1px solid var(--border);border-left:3px solid var(--accent,#4a6fa5);border-radius:var(--radius-sm);background:var(--surface-2);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;padding:6px 10px;font-size:12px;display:flex}.section-editor__dirty{color:var(--warning,#b26a00);text-transform:uppercase;letter-spacing:.4px;white-space:nowrap;font-size:11px;font-weight:600}.section-editor__findings{flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px;display:flex}.section-editor__findings-stale{color:var(--text-muted);font-size:12px}.section-editor__findings-list{flex-direction:column;gap:4px;width:100%;margin:4px 0 0;padding:0;list-style:none;display:flex}.section-editor__finding{background:var(--surface-2,#ffffff08);border-left:2px solid #0000;border-radius:3px;flex-wrap:wrap;align-items:baseline;gap:8px;padding:4px 8px;font-size:12px;display:flex}.section-editor__finding--violation{border-left-color:var(--warn,#d9a441)}.section-editor__finding--suggestion{border-left-color:var(--text-muted)}.section-editor__finding-rule{font-weight:600}.section-editor__finding-detail{color:var(--text-muted)}.section-editor__phrases{flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px;display:flex}.section-editor__phrases-label{color:var(--text-muted);margin-right:2px;font-size:12px}.section-editor__apply{flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px;display:flex}.section-editor__apply-note{color:var(--text-muted);font-size:12px}.section-editor__revise{gap:8px;margin-top:10px;display:flex}.section-editor__instruction{border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--surface);flex:1;min-width:0;padding:8px 12px}.chat-panel__intro{color:var(--text-muted);margin:-4px 0 10px;font-size:12px}.chat-panel__thinking{color:var(--text-muted);padding:0 4px;font-size:12px;font-style:italic}.chat-panel__log{flex-direction:column;gap:10px;max-height:480px;margin-bottom:12px;padding:4px;display:flex;overflow-y:auto}.chat-panel__empty{color:var(--text-muted);text-align:center;padding:16px 8px;font-size:13px}.chat-msg{border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--surface-2);padding:8px 12px}.chat-msg--user{background:var(--accent-soft);border-color:#0000}.chat-msg__meta{justify-content:space-between;gap:8px;margin-bottom:3px;display:flex}.chat-msg__role{font-size:12px;font-weight:600}.chat-msg__time{color:var(--text-muted);margin-left:auto;font-size:11px}.chat-msg__section{color:var(--text-muted);text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}.chat-msg__content{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.5}.chat-proposal{border-top:1px solid var(--border);flex-direction:column;align-items:flex-start;gap:6px;margin-top:8px;padding-top:8px;display:flex}.chat-proposal summary{cursor:pointer;font-size:12px;font-weight:600}.chat-proposal__text{white-space:pre-wrap;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);max-height:260px;margin-top:6px;padding:8px;font-size:12px;line-height:1.5;overflow-y:auto}.chat-proposal__status{color:var(--text-muted);font-size:12px}.chat-panel__target{color:var(--text-muted);align-items:center;gap:8px;font-size:13px;display:flex}.chat-panel__select{border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--surface);min-width:0;color:inherit;font:inherit;flex:1;padding:6px 8px;font-size:13px}.chat-panel__error{color:var(--danger,#e06c6c);margin:0 0 8px;font-size:12px}.chat-panel__composer{flex-direction:column;gap:8px;display:flex}.chat-panel__composer .btn{align-self:flex-end}.chat-panel__input{resize:vertical;min-width:0;font:inherit;color:inherit;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--surface);padding:8px 12px;font-size:13px}.placeholder{background:var(--surface);border:1px dashed var(--border-strong);border-radius:var(--radius);text-align:center;padding:48px 24px}.placeholder__title{margin-bottom:8px;font-size:18px}.placeholder__text{color:var(--text-muted);max-width:42ch;margin:0 auto;font-size:14px}.login{text-align:left;flex-direction:column;gap:12px;width:100%;max-width:320px;margin:0 auto;display:flex}.login__title{text-align:center;margin:0;font-size:18px}.login__label{color:var(--text-muted);font-size:13px}.login__input{font:inherit;color:var(--text);background:var(--surface-2);border:1px solid var(--border-strong);border-radius:var(--radius-sm);padding:9px 11px}.login__input:focus{outline:2px solid var(--focus);outline-offset:1px}.login__error{color:var(--danger);margin:0;font-size:13px}.login__button{font:inherit;color:var(--accent-contrast);background:var(--accent);border-radius:var(--radius-sm);cursor:pointer;border:none;margin-top:4px;padding:9px 12px}.login__button:hover:not(:disabled){background:var(--accent-hover)}.login__button:disabled{opacity:.6;cursor:not-allowed}.report-browser__head{justify-content:space-between;align-items:baseline;gap:8px;display:flex}.report-browser__new{width:100%;margin-bottom:12px}.report-browser__error{color:var(--danger);background:var(--danger-soft);border-radius:var(--radius-sm);margin-bottom:10px;padding:6px 8px;font-size:13px}.report-browser__empty{color:var(--text-muted);font-size:13px}.report-browser__list{flex-direction:column;gap:6px;max-height:320px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.report-row{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2);padding:8px}.report-row--active{border-color:var(--accent);background:var(--accent-soft)}.report-row__main{justify-content:space-between;align-items:flex-start;gap:8px;display:flex}.report-row__open{cursor:pointer;text-align:left;color:inherit;font:inherit;background:0 0;border:none;flex-direction:column;flex:1;gap:2px;padding:0;display:flex}.report-row__open:disabled{opacity:.5;cursor:not-allowed}.report-row__name{overflow-wrap:anywhere;font-size:14px;font-weight:600}.report-row__open:not(:disabled):hover .report-row__name{color:var(--accent)}.report-row__meta{color:var(--text-muted);font-size:12px}.report-row__expiry{color:var(--text-muted);white-space:nowrap;font-size:11px}.report-row__expiry--soon{color:var(--danger);font-weight:600}.report-row__actions,.report-row__confirm{flex-wrap:wrap;align-items:center;gap:6px;margin-top:6px;display:flex}.report-row__confirm-text{color:var(--text-muted);font-size:12px}.report-row__rename{flex-direction:column;gap:6px;display:flex}.report-row__rename-input{border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--surface);width:100%;color:var(--text);font:inherit;padding:6px 8px;font-size:14px}.report-row__rename-actions{gap:6px;display:flex}.section-editor__header-actions{align-items:center;gap:8px;display:flex}.section-editor__history{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text-muted);margin:0 0 10px;padding:10px 12px;font-size:13px}.section-editor__history-list{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.section-editor__history-item{align-items:center;gap:10px;display:flex}.section-editor__history-version{font-family:var(--mono);color:var(--text-muted);flex:none;font-size:12px}.section-editor__history-preview{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--text);flex:1;overflow:hidden}.review-warning{background:var(--danger-soft);border:1px solid var(--danger);border-radius:var(--radius-sm);margin:0 0 16px;padding:12px 14px}.review-warning__title{color:var(--text);margin:0 0 6px;font-weight:600}.review-warning__list{font-family:var(--mono);color:var(--text);margin:0 0 8px;padding-left:20px;font-size:13px}.review-warning__hint{color:var(--text-muted);margin:0;font-size:13px}.file-picker{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);margin-top:10px;padding:12px}.file-picker__header{justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:10px;display:flex}.file-picker__title{margin:0;font-size:14px}.file-picker__search{gap:8px;margin-bottom:10px;display:flex}.file-picker__search-input{min-width:0;font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius-sm);flex:1;padding:6px 10px}.file-picker__search-input:focus-visible{outline:2px solid var(--focus);outline-offset:1px}.file-picker__list{flex-direction:column;gap:4px;max-height:260px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.file-picker__item{border-radius:var(--radius-sm);grid-template-columns:1fr auto auto;align-items:center;gap:10px;padding:6px 8px;display:grid}.file-picker__item:hover{background:var(--surface)}.file-picker__name{text-overflow:ellipsis;white-space:nowrap;color:var(--text);font-size:13px;overflow:hidden}.file-picker__meta{font-family:var(--mono);color:var(--text-muted);white-space:nowrap;font-size:11px}.file-picker__empty,.file-picker__error{color:var(--text-muted);margin:0;font-size:13px}.file-picker__error{color:var(--danger)}.preferences-backdrop{z-index:50;background:#0000008c;justify-content:center;align-items:flex-start;padding:48px 16px;display:flex;position:fixed;inset:0;overflow-y:auto}.preferences{border:1px solid var(--border,#ffffff1f);background:var(--surface,#1b1f27);border-radius:8px;width:100%;max-width:900px;max-height:calc(100vh - 96px);padding:16px 20px;overflow-y:auto;box-shadow:0 12px 40px #00000073}.preferences__header{background:inherit;z-index:1;justify-content:space-between;align-items:center;gap:12px;margin-top:-4px;padding:4px 0;display:flex;position:sticky;top:-16px}.preferences__title{margin:0;font-size:15px}.preferences__intro,.preferences__empty,.preferences__note,.preferences__help{color:var(--text-muted);margin:6px 0;font-size:12px}.preferences__error{color:var(--danger,#e06c6c);margin:6px 0;font-size:12px}.preferences__list{flex-direction:column;gap:4px;margin:8px 0;padding:0;list-style:none;display:flex}.preferences__item{background:var(--surface-1,#ffffff05);border-radius:3px;flex-wrap:wrap;align-items:center;gap:8px;padding:4px 8px;font-size:13px;display:flex}.preferences__item--off{opacity:.55}.preferences__pair{flex:320px;align-items:center;gap:6px;min-width:0;display:flex}.preferences__lay,.preferences__professional{overflow-wrap:anywhere}.preferences__professional{font-weight:600}.preferences__arrow{color:var(--text-muted)}.preferences__meta{color:var(--text-muted);text-transform:uppercase;letter-spacing:.4px;white-space:nowrap;font-size:11px}.preferences__item-actions{align-items:center;gap:6px;margin-left:auto;display:flex}.preferences__toggle{color:var(--text-muted);white-space:nowrap;align-items:center;gap:4px;font-size:12px;display:flex}.preferences__form{margin-top:10px}.preferences__fields{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.preferences__input{border:1px solid var(--border,#ffffff24);background:var(--surface-1,#0003);min-width:0;color:inherit;font:inherit;border-radius:4px;flex:200px;padding:6px 8px;font-size:13px}.preferences__select{border:1px solid var(--border,#ffffff24);background:var(--surface-1,#0003);color:inherit;font:inherit;border-radius:4px;padding:6px 8px;font-size:13px}.preferences__form-actions{gap:6px;margin-top:8px;display:flex}.preferences__builtin{border-top:1px solid var(--border,#ffffff1a);margin-top:10px;padding-top:8px}.preferences__list--builtin .preferences__item{background:0 0}.preferences__tabs{gap:4px;margin:8px 0 4px;display:flex}.preferences__tabs .is-active{background:var(--surface-1,#ffffff14);font-weight:600}.preferences__warning{border-left:2px solid var(--warn,#d9a441);background:var(--surface-1,#ffffff05);color:var(--text-muted);border-radius:3px;margin:6px 0;padding:6px 8px;font-size:12px}.preferences__item--guidance{align-items:flex-start}.preferences__guidance-body{overflow-wrap:anywhere;flex:360px;min-width:0}.preferences__textarea{resize:vertical;width:100%;margin-bottom:6px;font-family:inherit}
