:root{--brown:#5c4637;--red:#a92724;--ink:#25211e;--muted:#756d67;--line:#e7e1dc;--soft:#f7f4f1;--green:#417348}*{box-sizing:border-box}body{margin:0;font-family:Inter,Arial,sans-serif;color:var(--ink);background:#fbfaf9}button,input,textarea,select{font:inherit}header{height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 28px;gap:36px;position:sticky;top:0;z-index:20}.brand{display:flex;flex-direction:column;color:var(--brown);letter-spacing:.08em}.brand b{font-size:20px}.brand span{font-size:10px;letter-spacing:.22em}nav{display:flex;align-self:stretch}nav button{border:0;background:none;padding:0 16px;color:#655b54;font-weight:600;cursor:pointer;border-bottom:3px solid transparent}nav button.active{color:var(--red);border-color:var(--red)}.user{margin-left:auto;font-size:13px;color:var(--brown)}main{max-width:1500px;margin:auto;padding:52px 42px}.eyebrow{font-size:11px;letter-spacing:.2em;color:var(--red);font-weight:800}h1,h2,h3{font-family:Georgia,serif;color:var(--brown);font-weight:500}h1{font-size:48px;margin:12px 0 8px}h2{font-size:34px;margin:8px 0}h3{font-size:25px}.lead{max-width:780px;color:var(--muted);font-size:17px;line-height:1.6}.muted,.toolbar span,.docRow small,.items small,.timeline small,.recentRow small{color:var(--muted)}.intake{background:#fff;border:1px solid #dcd4ce;box-shadow:0 12px 34px #4b34250d;margin:28px 0 32px;border-radius:6px;overflow:hidden}textarea{width:100%;min-height:120px;resize:vertical;padding:15px;border:1px solid var(--line);outline:none}.intake textarea{min-height:145px;border:0;padding:25px;font-size:16px}.actions{border-top:1px solid var(--line);padding:14px;display:flex;justify-content:space-between}.upload{padding:12px 16px;color:var(--brown);font-weight:600;cursor:pointer}.primary,.panelhead>button:not(.linkBtn){border:0;background:var(--red);color:#fff;padding:13px 22px;border-radius:3px;font-weight:700;cursor:pointer}.outline{background:#fff;border:1px solid #cfc5be;color:var(--brown);padding:11px 16px;border-radius:3px;font-weight:700;cursor:pointer}.danger{background:#fff;border:1px solid #d6aaa8;color:var(--red);padding:11px 16px;border-radius:3px;font-weight:700;cursor:pointer}.metrics,.summaryGrid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:24px 0}.metrics article,.summaryGrid article,.panel,.result{background:#fff;border:1px solid var(--line);padding:22px}.metrics span,.summaryGrid span{font-size:10px;letter-spacing:.12em;color:var(--muted)}.metrics strong{display:block;font:34px Georgia,serif;color:var(--brown);margin-top:8px}.summaryGrid strong{display:block;font-size:20px;color:var(--brown);margin-top:9px}.grid,.twoCol{display:grid;grid-template-columns:1.6fr 1fr;gap:18px}.twoCol{grid-template-columns:1.35fr 1fr}.panelhead,.sectionhead,.toolbar{display:flex;justify-content:space-between;align-items:center}.panelhead{padding-bottom:16px;border-bottom:1px solid var(--line)}.live{font-size:10px;color:var(--green)}.agentrow{display:flex;justify-content:space-between;padding:12px 0;border-top:1px solid var(--line);font-size:13px}.agentrow b{color:var(--green)}.hidden{display:none!important}.result{margin:-14px 0 30px;border-left:4px solid var(--red)}.question{padding:8px 0;border-top:1px solid var(--line)}.sectionhead{margin-bottom:24px}.flush{padding:0;overflow:hidden}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:14px;border-bottom:1px solid var(--line);font-size:13px}th{font-size:10px;letter-spacing:.1em;color:var(--muted);background:#fcfbfa}tbody tr{cursor:pointer}tbody tr:hover{background:#faf7f5}.empty{padding:26px 0;color:var(--muted)}.recentRow{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;background:none;border:0;border-bottom:1px solid var(--line);padding:14px 0;cursor:pointer}.recentRow span:first-child{display:flex;flex-direction:column;gap:5px}.emptyPage,.moduleEmpty{padding:90px 30px;text-align:center;border:1px dashed #d8cec7;background:#fff}.emptyPage p,.moduleEmpty p{color:var(--muted);max-width:650px;margin:15px auto 25px;line-height:1.6}.emptyPage span,.moduleEmpty span{display:inline-block;background:var(--soft);padding:8px 12px;font-size:11px;font-weight:700;color:var(--brown)}.workspace{position:fixed;inset:72px 0 0;background:#fbfaf9;z-index:10;overflow:auto}.wsTop{background:#fff;padding:22px 34px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:24px}.wsTop h2{font-size:27px;margin:4px 0}.back{border:0;background:none;color:var(--brown);font-weight:700;cursor:pointer}.wsStatus{margin-left:auto;display:flex;align-items:center;gap:14px}.wsStatus>span,.pill{font-size:10px;letter-spacing:.08em;font-weight:800;background:#f3ebe8;color:var(--red);padding:7px 9px;border-radius:20px}.pill.neutral{background:var(--soft);color:var(--brown)}.wsTabs{background:#fff;border-bottom:1px solid var(--line);padding:0 34px;display:flex;overflow:auto}.wsTabs button{border:0;background:none;padding:16px 13px;border-bottom:3px solid transparent;font-size:12px;font-weight:700;color:#6b625c;white-space:nowrap;cursor:pointer}.wsTabs button.active{color:var(--red);border-color:var(--red)}.wsBody{max-width:1500px;margin:auto;padding:28px 36px 60px}.details{margin:0}.details>div{display:grid;grid-template-columns:160px 1fr;padding:14px 0;border-bottom:1px solid var(--line)}dt{font-size:11px;color:var(--muted);font-weight:700}dd{margin:0;font-size:13px}.linkBtn,.dots{border:0;background:none;color:var(--red);font-weight:700;cursor:pointer}.timeline{display:flex;gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}.timeline i{width:8px;height:8px;background:var(--red);border-radius:50%;margin-top:4px}.timeline div{display:flex;flex-direction:column;gap:4px;font-size:12px}.toolbar{margin-bottom:16px}.toolbar>div:first-child{display:flex;flex-direction:column;gap:5px}.toolbar>div:last-child{display:flex;gap:8px}.items td:nth-child(2){min-width:320px}.items td:nth-child(2) b,.items td:nth-child(2) small{display:block}.items td:nth-child(2) small{margin-top:5px;max-width:520px;line-height:1.35}.lotStrip{display:flex;gap:8px;margin:0 0 15px;flex-wrap:wrap}.lotStrip span{font-size:10px;font-weight:800;color:var(--brown);background:var(--soft);padding:8px 10px}.docRow{display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid var(--line)}.docRow div{display:flex;flex-direction:column;gap:4px}.docIcon{width:42px;height:42px;background:var(--soft);display:grid;place-items:center;font-size:10px;font-weight:900;color:var(--brown)}.modal{position:fixed;inset:0;background:#211b1799;z-index:100;display:grid;place-items:center;padding:30px}.modalCard{width:min(760px,100%);max-height:90vh;overflow:auto;background:#fff;box-shadow:0 25px 70px #0003}.modalHead{display:flex;justify-content:space-between;align-items:center;padding:18px 22px;border-bottom:1px solid var(--line)}.modalHead h3{margin:0}.modalHead button{border:0;background:none;font-size:28px;cursor:pointer;color:var(--brown)}#modalBody{padding:22px}.formGrid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.formGrid label{display:flex;flex-direction:column;gap:7px}.formGrid label>span{font-size:11px;font-weight:800;color:var(--brown)}.formGrid input,.formGrid select{border:1px solid var(--line);padding:11px 12px;background:#fff}.full{grid-column:1/-1}.formActions{display:flex;justify-content:flex-end;align-items:center;gap:8px}.formActions span{flex:1}.aiItem{display:grid;grid-template-columns:30px 1fr auto;gap:12px;align-items:center;border-top:1px solid var(--line);padding:12px 0}.aiItem div{display:flex;flex-direction:column;gap:4px}.aiItem small{color:var(--muted)}.lineNo{width:25px;height:25px;background:var(--soft);display:grid;place-items:center;font-size:11px;font-weight:800}.resultActions{margin-top:18px;text-align:right}@media(max-width:1000px){nav{display:none}.metrics,.summaryGrid,.grid,.twoCol{grid-template-columns:1fr 1fr}.user{font-size:11px}.workspace{inset:72px 0 0}.wsTop{padding:18px}.wsTabs{padding:0 10px}.wsBody{padding:20px}.items{min-width:1000px}.flush{overflow:auto}}@media(max-width:650px){main{padding:28px 18px}h1{font-size:36px}.metrics,.summaryGrid,.grid,.twoCol{grid-template-columns:1fr}.formGrid{grid-template-columns:1fr}.full{grid-column:auto}.wsTop{align-items:flex-start;flex-wrap:wrap}.wsStatus{margin-left:0}.back{width:100%;text-align:left}.toolbar{align-items:flex-start;gap:14px;flex-direction:column}.actions{gap:8px;flex-direction:column}}
.sourceGrid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}.sourceItem,.runRow{width:100%;border:0;border-top:1px solid #ece7df;background:#fff;padding:15px 18px;display:flex;justify-content:space-between;align-items:center;text-align:left;cursor:pointer;color:inherit}.sourceItem:hover,.runRow:hover{background:#faf8f5}.sourceItem small,.runRow small,.aiBrief small{display:block;margin-top:4px;color:#766b60}.runRow>span:last-child{text-align:right}.runDetail{margin-top:18px}.searchBrief{padding:14px 18px;background:#f8f5f0;border:1px solid #ebe3d9;margin:0 18px 18px;border-radius:6px}.candidateList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:0 18px 18px}.candidate{border:1px solid #e6ded4;border-radius:8px;padding:18px;background:#fff}.candidateTop{display:flex;justify-content:space-between;gap:18px}.candidate h3{margin:5px 0 6px;font-size:20px}.candidate p{margin:0;color:#665d55;line-height:1.5}.score{text-align:center;min-width:74px}.score strong{font-size:28px;display:block}.score span{font-size:9px;letter-spacing:.08em;color:#887c70}.evidence{margin:15px 0;padding:13px;background:#faf8f5;border-radius:5px}.evidence b{font-size:12px}.evidence p{font-size:13px;margin:6px 0}.evidence a{font-size:12px;color:#60452f}.candidateActions{display:flex;justify-content:space-between;align-items:center;gap:10px}.small{padding:7px 10px!important;font-size:11px!important}.good{background:#e9f4ec!important;color:#2d6b3d!important}.errorBox{margin:0 18px 18px;padding:12px;background:#fff0f0;border:1px solid #e7bcbc;color:#8b2d2d}.aiBrief{padding:14px;background:#f8f5f0;border-radius:6px}.formHint{font-size:12px;color:#766b60}.supplierCards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.supplierCard{border:1px solid #e6ded4;background:#fff;padding:20px;border-radius:8px}.supplierCard h3{margin:7px 0}.supplierCard p{color:#766b60}@media(max-width:900px){.sourceGrid,.candidateList,.supplierCards{grid-template-columns:1fr}}

.threeCols{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;padding:18px}.threeCols>div{border-right:1px solid var(--line);padding-right:16px}.threeCols>div:last-child{border:0}.check{display:block!important;padding:5px 0;font-size:13px}.check input{width:auto!important;margin-right:7px}.analysisBox{padding:18px;background:#faf8f5;margin-top:15px}.analysisBox p{line-height:1.6;color:var(--muted)}.awardRow{display:flex;justify-content:space-between;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}.awardRow div{display:flex;flex-direction:column;gap:5px}.awardCard{padding:16px 0;border-bottom:1px solid var(--line)}.awardCard h3{margin:5px 0}@media(max-width:800px){.threeCols{grid-template-columns:1fr}.threeCols>div{border-right:0;border-bottom:1px solid var(--line);padding-bottom:15px}}
/* v0.13 product polish */
:root{--ink:#3f3028;--muted:#81746c;--red:#9f2727;--soft:#f7f4f1;--line:#e7dfd9;--green:#2f6d4f}.topbar{box-shadow:0 1px 0 var(--line);position:sticky;top:0;z-index:20}.metric{transition:transform .15s ease,box-shadow .15s ease}.metric:hover{transform:translateY(-2px);box-shadow:0 10px 30px rgba(63,48,40,.08)}.workspaceTabs{position:sticky;top:68px;z-index:15;background:#fff}.aiDock{position:fixed;right:24px;bottom:24px;border:0;border-radius:999px;background:var(--ink);color:white;padding:14px 18px;font-weight:700;box-shadow:0 12px 35px rgba(0,0,0,.18);cursor:pointer}.progressRail{height:7px;background:#eee7e2;border-radius:9px;overflow:hidden}.progressRail>i{display:block;height:100%;background:var(--red)}.statusDot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--green);margin-right:6px}


/* v0.14-v0.16 product-quality layer */
:root{
  --rp-brown:#49352b;--rp-brown-2:#6b5143;--rp-red:#a12b2b;--rp-red-soft:#f8eeee;
  --rp-ink:#211d1a;--rp-muted:#746d68;--rp-line:#e8e3df;--rp-bg:#f7f5f3;--rp-card:#fff;
  --rp-green:#26734d;--rp-amber:#9a6500;--rp-shadow:0 8px 28px rgba(56,42,34,.07);
}
body{background:var(--rp-bg);color:var(--rp-ink)}
.shell{max-width:1540px;margin:0 auto}
.topbar{box-shadow:0 1px 0 rgba(73,53,43,.08);position:sticky;top:0;z-index:40;background:rgba(255,255,255,.97);backdrop-filter:blur(12px)}
.brand-mark{letter-spacing:.12em}
.page{padding-top:26px}
.hero,.card,.metric,.panel{border-color:var(--rp-line)!important;box-shadow:var(--rp-shadow)}
.metric{position:relative;overflow:hidden}
.metric:after{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--rp-brown)}
.metric:nth-child(4n+1):after{background:var(--rp-red)}
.status-chip,.pill{border-radius:999px}
.workspace-tabs{position:sticky;top:72px;z-index:20;background:var(--rp-card);box-shadow:0 4px 14px rgba(56,42,34,.04)}
.workspace-tabs button.active{background:var(--rp-red)!important;color:#fff!important;border-color:var(--rp-red)!important}
.rp-control-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(310px,.75fr);gap:20px;align-items:start;margin-top:20px}
.rp-stack{display:grid;gap:16px}
.rp-section{background:#fff;border:1px solid var(--rp-line);border-radius:14px;box-shadow:var(--rp-shadow);overflow:hidden}
.rp-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--rp-line)}
.rp-section-head h2,.rp-section-head h3{margin:0;font-size:15px;letter-spacing:.01em}
.rp-section-body{padding:16px 18px}
.rp-eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:var(--rp-muted);font-weight:700}
.rp-attention{display:grid;gap:9px}
.rp-task{display:grid;grid-template-columns:9px 1fr auto;gap:12px;align-items:center;padding:11px 0;border-bottom:1px solid #f0ece9}
.rp-task:last-child{border-bottom:0}
.rp-task-dot{width:8px;height:8px;border-radius:50%;background:var(--rp-red)}
.rp-task small{display:block;color:var(--rp-muted);margin-top:3px}
.rp-mini-btn{border:1px solid var(--rp-line);background:#fff;color:var(--rp-brown);border-radius:8px;padding:7px 10px;font-weight:700;cursor:pointer}
.rp-mini-btn:hover{border-color:var(--rp-brown)}
.rp-health{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.rp-health-card{border:1px solid var(--rp-line);border-radius:11px;padding:13px;background:#fff}
.rp-health-card strong{font-size:21px;display:block;margin-top:4px}
.rp-progress{height:6px;background:#eee9e5;border-radius:999px;overflow:hidden;margin-top:9px}
.rp-progress span{display:block;height:100%;background:var(--rp-red);border-radius:999px}
.rp-deadline{display:flex;gap:12px;padding:11px 0;border-bottom:1px solid #f0ece9}
.rp-deadline:last-child{border:0}
.rp-date{width:44px;height:44px;border-radius:9px;background:var(--rp-red-soft);display:grid;place-items:center;color:var(--rp-red);font-weight:800;line-height:1}
.rp-date small{font-size:9px;display:block;text-transform:uppercase}
.rp-ai-rail{position:fixed;right:18px;bottom:18px;width:370px;max-height:calc(100vh - 105px);background:#fff;border:1px solid var(--rp-line);border-radius:16px;box-shadow:0 20px 55px rgba(45,33,27,.18);z-index:80;display:none;overflow:hidden}
.rp-ai-rail.open{display:flex;flex-direction:column}
.rp-ai-head{padding:14px 16px;background:var(--rp-brown);color:#fff;display:flex;align-items:center;justify-content:space-between}
.rp-ai-body{padding:15px;overflow:auto;min-height:190px}
.rp-ai-context{background:#f6f2ef;border-radius:10px;padding:10px 12px;margin-bottom:12px;font-size:12px;color:var(--rp-muted)}
.rp-ai-launch{position:fixed;right:22px;bottom:22px;z-index:79;border:0;border-radius:999px;background:var(--rp-brown);color:#fff;padding:12px 17px;font-weight:800;box-shadow:0 10px 30px rgba(45,33,27,.22);cursor:pointer}
.rp-ai-rail.open + .rp-ai-launch{display:none}
.rp-lifecycle{display:flex;align-items:center;gap:0;overflow:auto;padding:4px 0 12px}
.rp-stage{min-width:105px;position:relative;padding-right:22px}
.rp-stage:after{content:"";position:absolute;top:10px;left:18px;right:0;height:2px;background:#ddd6d1}
.rp-stage:last-child:after{display:none}
.rp-stage-dot{position:relative;z-index:2;width:20px;height:20px;border-radius:50%;border:2px solid #cfc6c0;background:#fff}
.rp-stage.done .rp-stage-dot{background:var(--rp-green);border-color:var(--rp-green)}
.rp-stage.current .rp-stage-dot{background:var(--rp-red);border-color:var(--rp-red);box-shadow:0 0 0 4px var(--rp-red-soft)}
.rp-stage label{display:block;font-size:10px;font-weight:800;margin-top:7px;color:var(--rp-muted);text-transform:uppercase;letter-spacing:.04em}
.rp-supplier-360{display:grid;grid-template-columns:1fr 290px;gap:18px}
.rp-score{width:62px;height:62px;border-radius:50%;display:grid;place-items:center;border:6px solid #e8e0da;font-size:18px;font-weight:900;color:var(--rp-brown)}
.rp-compare{overflow:auto}
.rp-compare table{min-width:900px}
.rp-compare th:first-child,.rp-compare td:first-child{position:sticky;left:0;background:#fff;z-index:2}
.rp-recommend{border-left:4px solid var(--rp-green);background:#f3f9f6;padding:13px 15px;border-radius:8px}
@media(max-width:1000px){.rp-control-grid,.rp-supplier-360{grid-template-columns:1fr}.rp-health{grid-template-columns:repeat(2,1fr)}.rp-ai-rail{left:12px;right:12px;width:auto}}

/* v0.17 integrated product surfaces */
.cc-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:20px}.cc-head h1{margin:.2rem 0;font-size:32px}
.wsTop{background:#fff;border-bottom:1px solid var(--rp-line);padding-bottom:18px}.wsBody{max-width:1500px;margin:0 auto}#workspace{background:var(--rp-bg);min-height:100vh}
#workspace .rp-lifecycle{background:#fff;margin:0;padding:14px 28px 18px;border-bottom:1px solid var(--rp-line)}
@media(max-width:760px){.cc-head{align-items:start;flex-direction:column}}
