:root{--rail:#25256e;--purple:#7065ed;--blue:#6257d6;--soft:#f4f2ff;--bg:#fff;--surface:#fff;--ink:#41414c;--muted:#737383;--line:#ededf3;--green:#258160;--amber:#967035;--rose:#a34660;--radius:8px;color-scheme:light;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--bg);font-size:14px;line-height:1.6}button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,p{margin:0}h1,h2,h3{font-weight:600;line-height:1.4}h1{font-size:26px;letter-spacing:-.7px}h2{font-size:18px;letter-spacing:-.3px}h3{font-size:15px}small{font-size:12px;color:var(--muted)}[hidden]{display:none!important}:focus-visible{outline:3px solid #aaa3f5;outline-offset:3px}::selection{background:#e9e5ff}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:fixed;top:-100px;left:70px;background:#fff;padding:12px;z-index:100}.skip-link:focus{top:10px}.muted{color:var(--muted)}.eyebrow{font-size:12px;color:var(--muted)}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
/* The narrow indigo rail and white split surface follow template_dashboard.png. */
.app-header{position:fixed;inset:0 auto 0 0;width:58px;background:var(--rail);z-index:40;display:flex;flex-direction:column;align-items:center;padding:18px 6px;gap:20px}.brand{display:block;padding-bottom:18px;border-bottom:1px solid #ffffff1e;width:100%;text-align:center}.brand-mark{display:inline-grid;place-items:center;width:33px;height:33px;border-radius:50%;background:#12956e;color:white;font-size:11px;font-weight:700}.app-header nav{display:grid;gap:13px}.rail-link{display:grid;place-items:center;width:40px;height:40px;border:0;border-radius:7px;background:transparent;color:#e4e2ff}.rail-link:hover,.rail-link:focus-visible{background:#ffffff19;text-decoration:none}.rail-link svg{width:22px;height:22px}.rail-footer{margin-top:auto;width:26px;height:26px;border-radius:50%;background:#ffffff16;color:#eeedff;font-size:10px;display:grid;place-items:center}
main{margin-left:58px;min-height:100vh;padding:38px 42px;outline:none;max-width:none}main.workspace-surface{padding:0}.page-header{margin-bottom:28px}.page-header p{color:var(--muted);margin-top:7px}.list-summary{font-size:13px;color:var(--muted);margin-bottom:20px}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:20px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}.client-card{display:block;padding:26px;min-height:220px;color:var(--ink);text-align:left;background:#fff}.client-card:hover{border-color:#c8c1ef;text-decoration:none}.client-card p{color:var(--muted);margin-top:6px}.client-icon{width:38px;height:38px;border-radius:10px;background:var(--soft);color:var(--blue);display:grid;place-items:center;font-weight:600;margin-bottom:22px}.client-bottom{display:flex;gap:15px;justify-content:space-between;margin-top:26px;font-size:13px;color:var(--muted)}.new-card{border-style:dashed;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.plus{font-size:30px;font-weight:300;color:var(--purple);margin-bottom:12px}
.button{border:1px solid #e2e0ed;background:#fff;padding:9px 14px;border-radius:6px;font-size:13px;font-weight:500;display:inline-flex;gap:7px;align-items:center;justify-content:center;line-height:1.5;min-height:38px;text-align:center;transition:background .12s}.button:hover{background:#f7f6fc;text-decoration:none}.button.primary{background:var(--purple);border-color:var(--purple);color:white}.button.primary:hover{background:#5f53d6}.button.small{font-size:12px;padding:7px 11px;min-height:34px}.button.text{border-color:transparent;background:none;color:var(--blue);padding:5px 7px}.button.danger{color:var(--rose)}
.client-header{min-height:55px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:12px 30px 8px}.breadcrumbs{display:flex;align-items:center;gap:12px;font-size:12px;color:var(--muted);min-width:0}.breadcrumbs>a{color:var(--muted)}.breadcrumb-grid{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:180px}.breadcrumbs label{flex:none}.breadcrumbs>label>select{max-width:190px;padding:5px 23px 5px 8px;border:1px solid transparent;background:#f6f5f9;border-radius:5px;font-size:12px}.client-tools{display:flex;align-items:center;gap:18px;flex-shrink:0}.client-meta{font-size:12px;color:var(--muted)}
.criterion-actions{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px 24px;padding:12px 30px 22px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}.criterion-heading{display:grid;grid-template-columns:auto minmax(0,1fr);gap:5px 14px;align-items:center;flex:1;min-width:280px}.criterion-heading h1{overflow-wrap:anywhere}.criterion-heading #save-status{grid-column:2;color:var(--muted);font-size:12px}.action-buttons{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.criterion-actions .form-error{width:100%;margin:0}.criterion-picker{position:relative;grid-row:1/3;align-self:start;margin-top:5px}.criterion-picker>summary{display:flex;gap:12px;align-items:center;padding:7px 10px;font-size:13px;cursor:pointer;border:1px solid #e4e1ef;border-radius:6px;list-style:none;background:#fff;white-space:nowrap}.criterion-picker>summary::-webkit-details-marker{display:none}.criterion-picker[open]>summary{border-color:#aca3f0;background:var(--soft)}.criterion-list{position:absolute;z-index:30;top:44px;left:0;width:340px;max-height:calc(100vh - 160px);overflow:auto;background:#fff;border:1px solid #ded9ef;border-radius:9px;box-shadow:0 12px 40px #25256e20;padding:16px}.list-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.list-heading h2{font-size:15px}.list-heading>span{font-size:12px;color:var(--muted)}.criterion-list>.button{width:100%;margin-bottom:13px}.criterion-search input,.criterion-filter select{width:100%;padding:9px 11px;border:1px solid #e2dfee;border-radius:6px;background:white;font-size:13px;min-height:39px}.criterion-search,.criterion-filter{display:block;margin-bottom:9px}.criterion-items{margin-top:12px;display:grid;gap:4px}.criterion-option{display:block;width:100%;text-align:left;border:0;background:none;padding:12px;border-radius:6px;line-height:1.5}.criterion-option:hover{background:#f8f7fc}.criterion-option.active{background:var(--soft);color:#5146bd}.criterion-option>span{font-size:13px;display:block}.criterion-option small{display:block;font-size:12px;margin-top:3px}.status-open{color:var(--amber)}.status-approved{color:var(--green)}.filter-empty{padding:15px 5px;color:var(--muted)}
/* Keep the editable criterion and its ambiguities on the same screen. */
.workbench{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:start;min-height:calc(100vh - 155px)}.editor-panel,.review-panel{min-width:0;padding:0 28px 35px;background:#fff}.editor-panel{background:#fcfcfe}.review-panel{border-left:1px solid var(--line);min-height:100%;padding-bottom:40px}.editor-header{min-height:65px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);margin:0 -28px 26px;padding:16px 28px;background:#fff}.section-title{display:flex;align-items:center;gap:11px}.section-title h2{font-size:17px;font-weight:550}.section-icon{display:grid;place-items:center;width:28px;height:30px;background:var(--soft);color:var(--purple);font-size:21px;border-radius:5px}.pill{display:inline-flex;align-items:center;background:#f0eff5;color:#737080;padding:4px 8px;border-radius:5px;font-size:11px;line-height:1.5;font-weight:500;white-space:nowrap}.pill.blue{background:#efedff;color:#6256c6}.pill.amber{background:#fbf4e7;color:#926b2c}.pill.green{background:#edf7f1;color:#267351}.source-hint{font-size:12px;color:var(--muted);border:1px solid #e9e6f2;background:#f7f6fc;border-radius:6px;padding:12px;margin-bottom:22px}.info{background:var(--soft);border-radius:7px;padding:14px 16px;font-size:13px;margin-bottom:20px;color:#6153a4}
.field{display:block;margin-bottom:22px}.field>span,.field-title{display:block;font-size:13px;font-weight:600;margin-bottom:8px}.field small{display:block;font-size:12px;margin-top:7px;line-height:1.6}.field input,.field textarea{display:block;width:100%;padding:11px 13px;border:1px solid #dedce8;border-radius:7px;background:#fff;line-height:1.7;outline-offset:2px;font-size:14px}.field input{min-height:44px}.field textarea{resize:none}.field textarea.tall{}.field-help{font-size:12px;color:var(--muted);line-height:1.7;margin-bottom:16px}.evaluation-table-wrap{overflow:auto;border:1px solid #e0ddec;border-radius:7px;background:#fff}.evaluation-table{border-collapse:collapse;width:100%;table-layout:fixed}.evaluation-table th{text-align:left;background:#f8f7fc;padding:11px 12px;font-size:12px;font-weight:500;border-bottom:1px solid #e6e3ef}.evaluation-table th span{color:var(--muted)}.evaluation-table th.remove-column,.evaluation-table col.remove-column{width:36px}.evaluation-table td{padding:10px;border-top:1px solid var(--line);vertical-align:top;font-size:13px;white-space:pre-line;overflow-wrap:anywhere}.evaluation-table td:has(.remove-item){padding:10px 0}.evaluation-table textarea{display:block;width:100%;resize:none;border:1px solid transparent;border-radius:5px;padding:4px;font-size:13px;line-height:1.7;background:transparent}.evaluation-table textarea:hover{border-color:#e2deef}.evaluation-table textarea:focus{background:#fcfbff}.remove-item{border:0;background:transparent;color:#9590a7;font-size:21px;min-height:32px;min-width:28px;line-height:1;padding:3px}.remove-item:hover{color:var(--rose);background:#fff3f5;border-radius:5px}.parent-applicability{font-size:13px;color:var(--muted);margin-top:12px}.parent-applicability summary{cursor:pointer;padding:10px 0}.parent-applicability .field{margin-top:10px}.editor-footer{margin-top:24px;border-top:1px solid var(--line);padding-top:16px;display:flex;gap:14px;align-items:flex-start;justify-content:space-between}.editor-footer small{font-size:12px;display:block;max-width:280px}.editor-footer .unsaved{display:none}.editor-footer .button{font-size:12px}.template-picker{border:1px solid #e1dcf4;background:var(--soft);border-radius:8px;padding:18px;margin:22px 0}.template-picker select{width:100%;background:#fff;border:1px solid #d8d3e9;padding:10px;border-radius:6px;font-size:13px}.template-picker .field>span small{display:inline;font-weight:400}.template-picker .field{margin-bottom:14px}.example-toggle{display:flex;align-items:center;gap:9px;font-size:12px;color:var(--muted);margin-bottom:14px}.example-toggle input{accent-color:var(--purple)}
#review-form fieldset{border:0;margin:0;padding:0;min-width:0}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}.section-heading h3{font-size:14px}.ambiguity-count{display:inline-grid;place-items:center;min-width:24px;height:24px;background:#f0edff;border-radius:5px;color:var(--blue);font-size:12px;margin-right:6px}.ambiguity-section{margin-top:22px;padding-top:10px;border-top:1px solid var(--line)}.ambiguity-section>.field-help{margin-bottom:22px}.ambiguity-item{border:1px solid #e4def2;border-left:3px solid #a69bdc;border-radius:7px;background:#fdfcff;margin-bottom:14px;overflow:hidden}.ambiguity-item-head{display:flex;align-items:center;justify-content:space-between;padding:9px 12px 0;font-size:12px;color:var(--muted)}.ambiguity-item-head label{display:flex;align-items:center;gap:8px;cursor:pointer}.ambiguity-item-head input{accent-color:var(--purple);width:16px;height:16px}.ambiguity-item textarea{display:block;width:calc(100% - 24px);margin:5px 12px 14px;padding:7px 2px;border:1px solid transparent;border-radius:4px;background:transparent;resize:none;font-size:14px;line-height:1.8}.ambiguity-item textarea:hover{border-color:#e7e2f1}.ambiguity-item textarea:focus{background:#fff}.ambiguity-item.resolved{border-color:#d9e9df;border-left-color:#71a58b;background:#fbfdfb}.ambiguity-item.resolved .ambiguity-item-head{color:var(--green)}.clear-state{padding:17px;border-radius:7px;background:#f3f8f5;color:#427d61;font-size:13px}.questions-section{border-top:1px solid var(--line);margin-top:28px;padding-top:9px}.questions-section>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;min-height:55px;font-size:14px;font-weight:600;list-style:none}.questions-section>summary::-webkit-details-marker{display:none}.questions-section>summary>span:first-child:before{content:'›';display:inline-block;margin-right:10px;font-size:18px;color:var(--purple)}.questions-section[open]>summary>span:first-child:before{transform:rotate(90deg)}.weight-total{font-size:12px;font-weight:400;color:var(--muted)}.questions-content{padding-top:10px}.question-card{padding:16px;border:1px solid #e3dfed;border-radius:7px;background:#fff;margin-bottom:14px}.question-heading{display:flex;align-items:center;gap:10px;margin-bottom:15px}.question-number{font-size:12px;color:var(--purple)}.question-name{flex:1;min-width:0}.question-name input{width:100%;padding:7px;border:1px solid #e5e0ee;border-radius:5px;font-size:13px}.weight-field{width:68px;flex:none;font-size:11px;color:var(--muted)}.weight-field input{display:block;width:100%;padding:5px 7px;border:1px solid #e4dfee;border-radius:5px}.question-card .field{margin-bottom:14px}.question-details,.source-reference{font-size:12px;color:var(--muted);margin-top:14px}.question-details>summary,.source-reference>summary{cursor:pointer;padding:5px 0}.question-details .field:first-of-type{margin-top:15px}.source-reference p{padding:10px;background:#f7f6fb;border-radius:5px;white-space:pre-line}.review-save{display:none}.next-review{display:flex;justify-content:flex-end;border-top:1px solid var(--line);margin-top:24px;padding-top:16px}.next-review .button{color:var(--blue)}.review-empty{text-align:center;padding:65px 22px;color:var(--muted)}.review-empty h3{font-size:16px;color:var(--ink);margin:20px 0 10px}.review-empty p{font-size:13px;max-width:320px;margin:auto}.empty-symbol{display:inline-grid;place-items:center;width:46px;height:46px;border-radius:12px;background:var(--soft);color:#9283d0;font-size:24px}
.generation-status{display:flex;align-items:center;gap:12px;background:#f6f4ff;border:1px solid #e8e2fd;border-radius:7px;padding:14px;margin:20px 0;font-size:13px}.generation-status p{font-size:12px;color:var(--muted)}.generation-status .button{margin-left:auto}.activity-dot{width:7px;height:7px;background:var(--purple);border-radius:50%;flex:none}.issues{padding:14px 16px;background:#fff8ed;border:1px solid #efdfbf;border-radius:7px;color:#8b6a38;font-size:13px;margin:18px 0}.issues ul{padding-left:20px}.workspace-notice{padding:16px 24px;background:#fff8eb;border-bottom:1px solid #eddbb5;font-size:13px}.workspace-notice .row{margin-top:10px}.technical{margin-top:14px;color:var(--muted);font-size:12px}.technical summary{cursor:pointer}.run-log{white-space:pre-wrap;overflow-wrap:anywhere;max-height:230px;overflow:auto;background:#f5f4f9;padding:14px;border-radius:6px;font:12px/1.7 ui-monospace,monospace}.form-error{padding:13px 16px;background:#fff1f4;border:1px solid #ebcbd4;color:#9b3952;border-radius:7px;font-size:13px;margin-bottom:20px}.toast{position:fixed;bottom:24px;left:calc(50% + 29px);transform:translateX(-50%);max-width:min(550px,calc(100vw - 90px));padding:13px 20px;background:#363252;color:#fff;border-radius:8px;box-shadow:0 6px 25px #29204f1a;z-index:70;font-size:13px}.toast.error{background:#943e59}.empty{text-align:center;padding:70px 25px;color:var(--muted)}.empty h2{color:var(--ink);margin-bottom:12px}.empty .button{margin-top:18px}
dialog{border:1px solid #e4dfef;border-radius:12px;max-width:740px;width:calc(100% - 36px);max-height:88vh;padding:28px;color:var(--ink);background:white;box-shadow:0 20px 65px #25204d30}dialog::backdrop{background:#26204855}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:22px;margin-bottom:24px}.dialog-head h2{font-size:22px}.dialog-head p{font-size:13px;color:var(--muted);margin-top:8px}.close-dialog{background:none;border:0;font-size:24px;color:#8a849c;min-width:38px;min-height:38px}.dialog-footer{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:24px}.preview-definition{font-size:14px;line-height:1.8;white-space:pre-line}.preview-definition h3{font-size:13px;margin:20px 0 8px;color:var(--muted)}.preview-definition mark{background:#f4eccc;color:#826628;padding:1px 3px}textarea[readonly]{background:#f6f5f9;color:var(--muted)}
@media(min-width:1500px){.workbench{grid-template-columns:minmax(0,1.45fr) minmax(0,1fr)}.editor-panel,.review-panel{padding-inline:32px}.editor-header{margin-inline:-32px;padding-inline:32px}}
@media(max-width:1100px){.client-header{padding-inline:22px}.client-meta{display:none}.criterion-actions{padding:12px 22px 18px}.criterion-heading h1{font-size:22px}.action-buttons{width:100%;justify-content:flex-end}.workbench{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}.editor-panel,.review-panel{padding-inline:20px}.editor-header{padding-inline:20px;margin-inline:-20px}.section-title h2{font-size:15px}.editor-header>.pill{display:none}.editor-footer{flex-wrap:wrap}}
@media(max-width:760px){.client-tools .button{font-size:12px}.breadcrumbs{gap:8px}.breadcrumbs>label>select{max-width:135px}.client-header{padding-inline:16px}.criterion-actions{padding:12px 16px 17px;position:static}.criterion-heading{grid-template-columns:auto minmax(0,1fr);min-width:0;width:100%}.criterion-heading h1{font-size:20px}.action-buttons{justify-content:flex-start}.action-buttons .button{font-size:12px;flex:1}.workbench{grid-template-columns:minmax(0,1fr)}.review-panel{grid-row:1;border-left:0;border-bottom:1px solid var(--line);min-height:0}.editor-panel{grid-row:2}.review-empty{padding:28px 15px}.editor-header{min-height:58px;margin-bottom:20px}.ambiguity-item textarea,.field input,.field textarea,.question-card textarea,.question-card input,.criterion-search input,.criterion-filter select,.evaluation-table textarea{font-size:16px}.criterion-list{width:min(340px,calc(100vw - 90px));max-height:65vh;top:42px}.criterion-picker{z-index:25}.criterion-heading #save-status{font-size:11px}.criterion-picker>summary{font-size:12px}.evaluation-table textarea{}.editor-panel,.review-panel{padding:0 18px 25px}.editor-header{margin-inline:-18px;padding-inline:18px}.client-header{min-height:48px}main{padding:25px 20px}.cards{grid-template-columns:minmax(0,1fr)}.next-review{margin-bottom:5px}}
@media(max-width:420px){.app-header{width:48px;padding-inline:4px}.brand-mark{width:30px;height:30px}.rail-link{width:36px}main{margin-left:48px}.client-header{flex-wrap:wrap;gap:8px}.client-tools{display:none}.criterion-heading{grid-template-columns:1fr}.criterion-picker{grid-row:auto;justify-self:start}.criterion-heading #save-status{grid-column:1}.action-buttons{gap:6px}.action-buttons .button{padding:8px}.evaluation-table th,.evaluation-table td{padding:8px}.section-title h2{font-size:16px}.toast{left:calc(50% + 24px)}.editor-footer .button{width:100%}.question-heading{flex-wrap:wrap}}
.mobile-panels{display:none}
@media(max-width:760px){.mobile-panels{display:flex;gap:10px;position:sticky;top:0;z-index:15;background:#fff;border-block:1px solid var(--line);padding:10px 16px}.mobile-panels .button{flex:1}#criterion-form,#review-editor{scroll-margin-top:64px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Both sides remain accessible while reviewing long criteria. */
@media(min-width:761px){main.workspace-surface{height:100dvh;min-height:0;overflow:hidden;display:flex;flex-direction:column}.client-header,.criterion-actions,.workspace-notice{flex-shrink:0}.workbench{flex:1;min-height:0;overflow:hidden}.editor-panel,.review-panel{height:100%;min-height:0;overflow-y:auto;scroll-padding-top:85px}.editor-header{position:sticky;top:0;z-index:5}.criterion-actions{position:relative}.generation-status{position:relative}.criterion-picker .criterion-list{max-height:calc(100dvh - 220px)}}
/* Guided clarification keeps the decision and its proposed edit together. */
.criterion-question>span{color:var(--blue)}.criterion-question textarea{font-size:16px;font-weight:500}.clarification-question{font-size:14px;line-height:1.7;margin:12px 16px;color:var(--ink)}.original-ambiguity{font-size:12px;line-height:1.8;color:var(--muted);margin:0 16px 14px}.clarification-answer{display:block;margin:0 16px 12px}.clarification-answer>span{display:block;font-size:12px;font-weight:600;margin-bottom:7px}.ambiguity-item .clarification-answer textarea{width:100%;margin:0;padding:10px 12px;border:1px solid #ddd6ef;background:#fff;line-height:1.6;font-size:13px}.answer-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 16px 14px}.applied-note{font-size:11px;color:var(--green)}.ambiguity-context{font-size:11px;color:var(--muted);border-top:1px solid #eee8f6;padding:10px 16px}.ambiguity-context summary{cursor:pointer}.ambiguity-item .ambiguity-context textarea{margin:8px 0 0;width:100%;font-size:12px}.proposal{background:#fff;border:1px solid #d9d1f2;border-radius:7px;padding:16px;margin:0 16px 16px;font-size:13px;line-height:1.7}.proposal h4{font-size:14px;margin:0 0 8px}.proposal>p{margin:8px 0 12px}.proposal>small{display:block;color:var(--muted);font-size:11px;margin-top:10px}.question-proposal{margin:0 0 22px;background:#f7f5ff}.proposed-change{margin:14px 0}.proposed-change>strong{display:block;font-size:12px;margin-bottom:7px}.proposed-change .before,.proposed-change .after{padding:10px 12px;background:#f6f5f8;border-left:3px solid #ddd8e5}.proposed-change .after{background:#f1f8f3;border-left-color:#82b795;margin-top:4px}.proposed-change small{font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}.proposed-change p{margin:4px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.proposal .row{flex-wrap:wrap}
@media(max-width:760px){.ambiguity-item .clarification-answer textarea{font-size:16px}.clarification-question{font-size:16px}.proposal{margin-inline:10px;padding:12px}}
.handled-points{margin:18px 0;color:var(--muted);font-size:12px}.handled-points>summary{cursor:pointer;padding:10px 0}.handled-point{padding:14px;border:1px solid var(--line);border-radius:7px;margin:12px 0;background:#fafafc;font-size:13px}.handled-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}.handled-heading strong{color:var(--green);font-size:12px}.handled-point p{margin:10px 0;line-height:1.7}.handled-point blockquote{margin:12px 0;padding:10px 14px;background:#fff;border-left:3px solid #c6bfdc;white-space:pre-wrap}.handled-point details{font-size:12px}.handled-point summary{cursor:pointer}.final-review{margin:20px 0;padding:18px;background:#f4f1ff;border:1px solid #dcd4f5;border-radius:8px}.final-review h3{font-size:15px;margin:0 0 10px}.final-review p{font-size:13px;line-height:1.7;margin:0}.final-review .button{margin-top:14px}.final-review small,.final-approval small{display:block;font-size:11px;color:var(--muted);margin-top:10px;line-height:1.6}.final-review.approved{background:#f0f8f3;border-color:#c8dfd0}.final-review.needs-generation{background:#fffaf0;border-color:#eadcc2}.final-approval{margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}.final-approval>p{font-size:12px;line-height:1.7;margin:0 0 12px}.final-approval .button{width:100%;white-space:normal}
.feasibility-note{margin:10px 16px;padding:11px 13px;background:#fff8e9;border:1px solid #ede0bf;border-radius:6px;font-size:12px;line-height:1.7;color:#786039}.feasibility-note strong{display:block;font-size:11px;margin-bottom:4px}.feasibility-note p{margin:0 0 5px}.feasibility-note p:last-child{margin-bottom:0}
.review-flow{margin:20px 0 6px;padding:16px 12px;border:1px solid #e3e6e4;border-radius:9px;background:#f7f8f7}.review-flow ol{display:flex;list-style:none;margin:0;padding:0;gap:10px}.review-flow li{display:flex;align-items:center;gap:8px;flex:1;position:relative;color:#777e79;font-size:12px;font-weight:600}.review-flow li:not(:last-child)::after{content:'';height:1px;background:#d6dcd8;flex:1;min-width:8px}.review-flow small{display:block;font-size:10px;font-weight:400;margin-top:3px;color:#777e79}.flow-marker{display:grid;place-items:center;flex:none;width:26px;height:26px;border:1px solid #d5dad7;border-radius:50%;background:#ecefed;color:#727a74;font-size:12px}.review-flow .complete{color:#23704b}.review-flow .complete .flow-marker{background:#e0f1e7;border-color:#b8d9c6;color:#23704b}.review-flow .complete small{color:#367956}.review-flow .current{color:#3d4941}.review-flow .current .flow-marker{border:2px solid #66776b;background:white;color:#3d4941}.questions-locked{padding:16px;border:1px dashed #d9dedb;border-radius:8px;color:#727a74;background:#f8f9f8;font-size:12px;line-height:1.7}.review-empty>small{display:block;margin-top:10px;color:var(--muted);font-size:11px}
@media(max-width:400px){.review-flow{padding:12px 8px}.review-flow ol{gap:5px}.review-flow li{gap:5px;font-size:11px}.review-flow li:not(:last-child)::after{display:none}.flow-marker{width:23px;height:23px}}

.ai-credit-note,.guidance-progress{font-size:11px;line-height:1.6;color:var(--muted)}

.editable-criterion-title{display:flex;align-items:center;gap:7px;min-width:0}.editable-criterion-title input{display:block;min-width:0;width:100%;padding:3px 0;border:0;border-bottom:1px solid transparent;border-radius:0;background:transparent;font:inherit;letter-spacing:inherit;line-height:inherit;text-overflow:ellipsis}.editable-criterion-title input:hover:not(:disabled){border-bottom-color:#d4cee8}.editable-criterion-title input:focus{border-bottom-color:var(--purple);outline:0;background:#faf9ff}.editable-criterion-title input::placeholder{color:#92909e}

.workbench.validated-workbench{grid-template-columns:minmax(0,1fr)}.validated-workbench .editor-panel{grid-row:auto}.validated-workbench .editor-panel #criterion-form{max-width:1100px;margin-inline:auto}.validated-source-note{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 22px;padding:12px 15px;border:1px solid #cce4d5;border-radius:7px;background:#f1f8f4;color:#30724f;font-size:13px}.source-weight{width:80px;white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums}.validated-workbench .evaluation-table textarea{}@media(max-width:760px){.validated-source-note{flex-wrap:wrap}.source-weight{width:60px}}

.subcriterion-title{display:block;font-size:13px;line-height:1.5;margin:6px 8px 8px;font-weight:600;color:var(--ink)}.generated-subcriterion-title{flex:1;min-width:0;font-size:15px;line-height:1.5;overflow-wrap:anywhere}

.criterion-brief>span,#criterion-form .field-title,.parent-applicability>summary{color:var(--blue)}.criterion-brief textarea{line-height:1.7}.brief-preview{white-space:pre-wrap}

.editor-header{flex-wrap:wrap}.panel-header-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-left:auto}.panel-header-actions .button{font-size:12px}

/* The flow steps are visible controls, including before they become available. */
.review-flow{container-type:inline-size}.review-flow ol{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.review-flow li{display:block;min-width:0}.review-flow li:not(:last-child)::after{position:absolute;top:50%;right:-10px;width:8px;min-width:0}.flow-action{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:64px;border:1px solid #859f8e;border-radius:7px;padding:9px 7px;background:#fff;color:#285f40;text-align:left;font:inherit;line-height:1.4}.flow-action:disabled{opacity:1;cursor:default;border-color:#d4dad6;background:#eef1ef;color:#737b76}.review-flow .current .flow-action:not(:disabled){background:#eaf5ee;border-color:#438360;color:#205f3b}.review-flow .complete .flow-action{color:#23704b}.flow-action:not(:disabled):hover{background:#dceee2;border-color:#2e704a;box-shadow:0 2px 5px #24543618}.flow-action:focus-visible{outline:3px solid #6c9b7d;outline-offset:3px}.flow-action>span:last-child{min-width:0;overflow-wrap:anywhere}.flow-action:not(:disabled) small{color:#436b50}
@container(max-width:360px){.flow-action{flex-direction:column;gap:6px;padding:9px 4px;text-align:center}.review-flow ol{gap:8px}.review-flow li:not(:last-child)::after{right:-6px;width:4px}}


.client-header{position:relative;z-index:30;border-bottom:1px solid var(--line);padding-block:10px;flex-wrap:wrap;gap:10px 20px}.breadcrumbs{flex:1;flex-wrap:wrap;gap:8px}.breadcrumbs .criterion-picker{grid-row:auto;align-self:center;margin:0;min-width:0;max-width:100%}.criterion-picker>summary>span:first-child{overflow:hidden;text-overflow:ellipsis;max-width:220px}.breadcrumbs .criterion-list{top:calc(100% + 8px);left:auto;right:0;max-height:calc(100dvh - 110px)}.source-heading{flex:1 1 180px;min-width:0}.source-heading h1{font-size:20px;letter-spacing:-.4px}.source-heading #save-status{font-size:11px;color:var(--muted);margin-top:3px}.workspace-action-error{flex-shrink:0;margin:0;padding:12px 28px}
@media(max-width:760px){.breadcrumbs .criterion-list{position:fixed;top:auto;left:80px;right:18px;width:auto;max-height:65dvh}.criterion-picker>summary>span:first-child{max-width:180px}.source-heading h1{font-size:18px}.workspace-action-error{padding-inline:18px}}
@media(max-width:420px){.breadcrumbs .criterion-list{left:62px;right:12px}}

.criterion-menu{position:relative}.criterion-menu-trigger{font-size:22px;line-height:1;min-width:38px;padding:6px}.criterion-menu-actions{position:absolute;right:0;top:calc(100% + 6px);z-index:10;min-width:200px;padding:6px;background:#fff;border:1px solid var(--line);border-radius:7px;box-shadow:0 8px 24px #25204d20}.criterion-menu-actions .button{width:100%;justify-content:flex-start;border:0}.button.primary.danger{background:#a34660;border-color:#a34660;color:#fff}.button.primary.danger:hover{background:#89384f}.deletion-notice{display:flex;align-items:center;flex-wrap:wrap;gap:10px;flex-shrink:0;padding:10px 28px;background:#f3f8f5;border-bottom:1px solid #d5e4da;font-size:13px}.deletion-notice>span{flex:1;overflow-wrap:anywhere}

.source-title-row{display:flex;align-items:center;gap:10px;min-width:0}.source-title-row .editable-criterion-title{position:relative;display:block;flex:0 1 auto;min-width:0;max-width:100%}.source-title-row .editable-criterion-title input{position:absolute;inset:0;height:100%}#criterion-title-measure{display:block;visibility:hidden;white-space:pre;padding:3px 0;border-bottom:1px solid transparent;overflow:hidden}#source-criterion-state{flex:none;display:inline-flex;align-items:center}.flow-marker,.ambiguity-count{display:inline-flex;align-items:center;justify-content:center;line-height:1;text-align:center;letter-spacing:0;font-variant-numeric:tabular-nums;padding:0;vertical-align:middle}.flow-marker{aspect-ratio:1;flex-shrink:0}.ambiguity-count{padding-inline:5px}

textarea{resize:none;overflow-y:hidden;height:auto;min-height:0}

.field .field-help{margin:0 0 16px;line-height:1.7}

.analysis-stale{margin:12px 0;padding:10px 12px;border:1px solid #eadcc2;border-radius:6px;background:#fffaf0;color:#806326;font-size:12px}

.breadcrumb-picker>summary{min-height:28px;padding:3px 8px;line-height:20px;gap:8px;justify-content:space-between}.breadcrumb-picker .picker-chevron{display:block;flex:none;margin-left:auto;align-self:center}.breadcrumbs .breadcrumb-picker .criterion-list{position:fixed}.breadcrumb-picker .criterion-option:focus-visible{background:var(--soft);outline-offset:-2px}

#criterion-form .evaluation-table-wrap{border-top:0;border-top-left-radius:0;border-top-right-radius:0}
#criterion-form .evaluation-table thead.sr-only+tbody>tr:first-child>td{border-top:0}
#criterion-form .evaluation-table-wrap:has(tbody:empty){display:none}

/* One spacing scale for the three source sections, without stacked margins. */
#criterion-form{--block-gap:var(--space-4);--heading-gap:var(--space-1);--content-gap:var(--space-2)}
#criterion-form .source-blocks{display:flex;flex-direction:column;gap:var(--block-gap);min-width:0;border:0;padding:0;margin:0}
#criterion-form .source-block{display:block;min-width:0;margin:0}
#criterion-form .source-block-title{display:block;margin:0 0 var(--heading-gap);padding:0;color:var(--blue);font-size:14px;font-weight:600;line-height:1.6;letter-spacing:0}
#criterion-form .source-block .field-help{display:block;margin:0 0 var(--content-gap);font-size:13px;font-weight:400;line-height:1.6;color:var(--muted)}
#criterion-form .source-block .field{margin:0}
#criterion-form .source-block textarea{line-height:1.7;transition:border-color .12s,background .12s}
#criterion-form .field textarea:hover:not(:disabled){border-color:#bbb4db}
#criterion-form .field textarea:focus-visible{border-color:var(--purple);outline:2px solid #7065ed26;outline-offset:2px}
#criterion-form [data-add-sub]{margin:var(--content-gap) 0 0}
#criterion-form .evaluation-table-wrap:has(tbody:empty)+[data-add-sub]{margin-top:0}
#criterion-form .parent-applicability>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;cursor:pointer}
#criterion-form .parent-applicability>summary::-webkit-details-marker{display:none}
#criterion-form .parent-applicability>summary::after{content:'';flex:none;width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);margin-right:4px}
#criterion-form .parent-applicability[open]>summary::after{transform:rotate(45deg)}
#criterion-form .parent-applicability:not([open])>summary{margin-bottom:0}
@media(max-width:760px){#criterion-form{--block-gap:var(--space-3)}}

/* The source title and workflow share one header height and content offset. */
.workbench{--panel-gutter:var(--space-4);--panel-header-height:96px;--panel-content-gap:var(--space-3)}
.editor-panel>.editor-header,.review-panel .review-flow{height:var(--panel-header-height);min-height:var(--panel-header-height);margin:0 calc(-1 * var(--panel-gutter)) var(--panel-content-gap);padding:16px var(--panel-gutter);border:0;border-bottom:1px solid var(--line);border-radius:0;box-sizing:border-box}
.review-panel .review-flow{display:flex;align-items:center;background:#f7f8f7;position:sticky;top:0;z-index:5}
.review-panel .review-flow ol{width:100%}
.review-panel .flow-action{min-height:56px}
.review-panel .ambiguity-section{margin-top:0;padding-top:0;border-top:0}
.review-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}
@media(min-width:1500px){.workbench{--panel-gutter:32px}}
@media(min-width:761px) and (max-width:1100px){.workbench{--panel-gutter:var(--space-3);--panel-header-height:136px}}
@media(max-width:760px){.workbench{--panel-gutter:var(--space-2);--panel-header-height:auto;--panel-content-gap:var(--space-3)}.review-panel .review-flow{position:static}}

body.workspace-locked{overflow:hidden}
.workspace-processing{position:fixed;right:24px;bottom:24px;z-index:1000;display:flex;align-items:center;gap:10px;max-width:calc(100vw - 96px);padding:10px 16px;border:1px solid #ded9ed;border-radius:999px;background:#fff;color:var(--ink);box-shadow:0 4px 20px #25256e14;font-size:13px;font-weight:500;line-height:1.5;pointer-events:none}
.workspace-processing::before{content:'';width:14px;height:14px;flex:none;border:2px solid #e7e3f7;border-top-color:var(--purple);border-radius:50%;animation:processing-spin .8s linear infinite}
.workspace-processing::after{content:'';position:fixed;top:0;left:0;width:35vw;height:3px;background:var(--purple);transform-origin:left;animation:processing-track 1.8s ease-in-out infinite}
@keyframes processing-spin{to{transform:rotate(360deg)}}
@keyframes processing-track{from{transform:translateX(-35vw)}to{transform:translateX(100vw)}}
@media(max-width:760px){.workspace-processing{right:16px;bottom:16px}}
@media(prefers-reduced-motion:reduce){.workspace-processing::before,.workspace-processing::after{animation:none}.workspace-processing::after{width:100%;opacity:.6}}

/* Shared visual vocabulary for source editing and clarification. */
:root{--space-1:8px;--space-2:16px;--space-3:24px;--space-4:32px;--field-border:#d8d5e4;--field-radius:8px;--muted:#686877}
@media(min-width:761px){.workbench:not(.validated-workbench){grid-template-columns:repeat(2,minmax(0,1fr))}}
.editor-panel,.review-panel{padding-inline:var(--panel-gutter);padding-bottom:var(--space-4)}
.workbench .field-help,.workbench .field small,.clarification-answer>span,.source-heading #save-status{font-size:13px;line-height:1.6}
.workbench .field>span,.section-heading h3{font-size:14px}
.workbench .field{margin-bottom:var(--space-3)}
.workbench .button,.panel-header-actions .button{font-size:13px;border-radius:var(--field-radius)}
.workbench .button.small{min-height:36px;padding:8px 12px}
.workbench :is(.field textarea,.clarification-answer textarea,.evaluation-table textarea,.question-card input){
 width:100%;padding:12px 16px;border:1px solid var(--field-border);border-radius:var(--field-radius);background:#fff;font-size:14px;line-height:1.6;outline-offset:2px;
}
#criterion-form .source-block textarea{line-height:1.6}
.workbench :is(.field textarea,.clarification-answer textarea,.evaluation-table textarea,.question-card input):hover:not(:disabled){border-color:#aaa2ca}
.workbench :is(.field textarea,.clarification-answer textarea,.evaluation-table textarea,.question-card input):focus-visible{border-color:var(--purple);outline:2px solid #7065ed40;outline-offset:2px}
#criterion-form .field textarea:focus-visible{outline-color:#7065ed40}
#criterion-form .evaluation-table-wrap{border:0;border-radius:0;background:transparent}
#criterion-form .evaluation-table td{padding:0 0 var(--space-1);border:0}
#criterion-form .evaluation-table td:has(.remove-item){padding:8px 0 0 8px}
#criterion-form .evaluation-table tbody>tr:last-child>td{padding-bottom:0}
#criterion-form .evaluation-table .source-weight{padding:12px 8px;font-size:13px}
#criterion-form .subcriterion-title{margin:0 0 var(--space-1);font-size:14px}
.section-heading{margin-bottom:var(--space-1)}
.ambiguity-section>.field-help{margin-bottom:var(--space-3)}
.ambiguity-item{padding:var(--space-2);margin-bottom:var(--space-2);border:1px solid #ded8ec;border-left:3px solid #a69bdc;border-radius:var(--field-radius);background:#fdfcff}
.ambiguity-item-head{padding:0;margin-bottom:var(--space-1);font-size:13px}
.ambiguity-item-head .button.small{min-height:28px;padding:4px 8px}
.clarification-question{margin:0 0 var(--space-2);font-size:14px;line-height:1.6;font-weight:600}
.ambiguity-item .original-ambiguity,.ambiguity-item .feasibility-note{margin:0 0 var(--space-2)}
.clarification-answer{margin:0 0 var(--space-2)}
.clarification-answer>span{margin-bottom:var(--space-1)}
.ambiguity-item .clarification-answer textarea{margin:0}
.answer-actions{margin:0;gap:var(--space-1)}
.ambiguity-item .proposal{margin:var(--space-2) 0 0;padding:var(--space-2)}
.ambiguity-item [data-discard-point]{color:var(--muted);font-weight:400}
.ambiguity-item [data-discard-point]:hover{color:var(--blue);text-decoration:underline}
.handled-points,.final-review{margin-block:var(--space-3)}
.handled-point,.question-card,.final-review{padding:var(--space-2);border-radius:var(--field-radius)}
.question-card{margin-bottom:var(--space-2)}
.question-heading{margin-bottom:var(--space-2)}
.question-card .field{margin-bottom:var(--space-2)}
.questions-section,.final-approval{margin-top:var(--space-3);padding-top:var(--space-2)}
.review-flow li{font-size:13px}
.review-flow small{font-size:12px;line-height:1.4}
.review-flow .flow-action{padding:8px;gap:var(--space-1)}
.review-section-heading{margin-bottom:var(--space-3)}
@media(max-width:760px){.workbench :is(.field textarea,.clarification-answer textarea,.evaluation-table textarea,.question-card input){font-size:16px}}

.question-card .weight-field{width:96px;flex:0 0 96px}
.workbench .question-card .weight-field input{padding:8px 10px;text-align:right;font-variant-numeric:tabular-nums;appearance:textfield;-moz-appearance:textfield}
.question-card .weight-field input::-webkit-inner-spin-button,.question-card .weight-field input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

.proposed-criteria{margin:8px 0 0;padding-left:20px}
.proposed-criteria li+li{margin-top:12px}
.proposed-criteria li>strong{display:block;font-size:13px}
.proposed-criteria li>p{margin:4px 0 0}

.auth-page{display:grid;place-items:center;min-height:100vh;background:#f7f6fc;padding:24px}
.auth-card{width:min(440px,100%);padding:32px;background:white;border:1px solid var(--line);border-radius:12px}
.auth-card h1{font-size:24px;margin:24px 0 12px}.auth-card p{color:var(--muted);margin-bottom:24px}
.auth-card form{display:inline-block;margin-left:8px}
.auth-card .auth-form{display:grid;gap:14px;margin:0;text-align:left}.auth-form label{display:grid;gap:6px;font-size:13px;font-weight:600}.auth-form input{width:100%;padding:11px 13px;border:1px solid #dedce8;border-radius:7px;font-size:16px;min-height:44px;background:#fff}.auth-form input:disabled{color:var(--muted);background:#f6f5f9}.auth-form .button{margin-top:6px}.auth-error{color:var(--rose);font-size:13px}
.team-collaboration{margin:0 0 24px;padding:12px 16px;border:1px solid #ded9ed;border-radius:8px;background:#f7f5ff;font-size:13px}
.team-collaboration>.row{margin-top:8px;gap:8px}.team-collaboration .button{font-size:12px}
.team-history{list-style:none;padding:0;margin:0}.team-history li{display:grid;gap:4px;padding:12px 0;border-bottom:1px solid var(--line)}
.team-history span{font-size:12px;color:var(--muted)}
.team-users{display:grid;gap:16px}.team-users form{display:flex;gap:12px;align-items:end;flex-wrap:wrap;padding:16px;border:1px solid var(--line);border-radius:8px}
.team-users strong,.team-users small{width:100%}.team-users label{display:grid;gap:4px;font-size:12px;flex:1}
.team-users select{padding:8px;border:1px solid var(--field-border);border-radius:6px;background:white}
.team-users input[type=email]{padding:8px;border:1px solid var(--field-border);border-radius:6px;background:white;min-width:0}.team-users .team-invite{background:var(--soft);border-color:#dcd4f5}
.team-invite-link{display:grid;gap:12px}.team-invite-link input{width:100%;padding:10px;border:1px solid var(--field-border);border-radius:6px;font-size:13px;font-family:ui-monospace,monospace}
.draft-comparison{display:grid;grid-template-columns:1fr 1fr;gap:24px}.draft-comparison section{min-width:0;overflow-wrap:anywhere}
.draft-comparison h3{font-size:14px}.draft-comparison .preview-definition{font-size:13px}
@media(max-width:600px){.draft-comparison{grid-template-columns:1fr}}
