/* Auto optimizer styles are isolated from the manual workflow and shared header. */
.oa-required{margin-top:1rem;padding-top:.7rem;border-top:1px solid #d7e1db}
.oa-required summary{font-weight:700;cursor:pointer}
.oa-required-controls,.oa-required-list li{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:.45rem;align-items:end}
.oa-required-combo,.oa-required-controls label{display:grid;gap:.2rem;min-width:0}
.oa-required-combo{position:relative}
.oa-required-combo input{width:100%;min-width:0;font:inherit}
.oa-required-matches,.oa-required-empty{position:absolute;top:100%;left:0;right:0;z-index:8;margin:0;padding:.25rem;border:1px solid #b8c9c0;border-radius:0 0 .4rem .4rem;background:#fff}
.oa-required-matches{display:grid;gap:.15rem;max-height:13rem;overflow-y:auto}
.oa-required-matches .picker-skill{padding:.4rem .5rem;background:#f5f9f4;color:inherit;cursor:pointer;overflow-wrap:anywhere}
.oa-required-matches .picker-skill:hover,.oa-required-matches [aria-selected="true"]{background:#d9eadf}
.oa-required select{max-width:100%;min-width:0;font:inherit}
.oa-required-list{display:grid;gap:.35rem;list-style:none;padding:0;margin:.6rem 0 0}
.oa-required-list li{align-items:center}
.oa-required-list span{overflow-wrap:anywhere}
.oa-page{margin:0;background:#f5f6f3;color:#233b31;font:15px/1.5 system-ui,"Yu Gothic",sans-serif}
.oa-page .oa-shell{max-width:1160px;margin:0 auto;padding:22px 20px}
.oa-shell *, .oa-shell *::before,.oa-shell *::after{box-sizing:border-box}
.oa-shell [hidden]{display:none!important}
.oa-hero{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;margin:0 0 12px;padding:0;color:#233b31;background:transparent}
.oa-hero h1{margin:2px 0;line-height:1.5;font-size:23px}
.oa-hero p{margin:12px 0 0;max-width:42rem;color:#6b786f;font-size:13px}
.oa-hero .oa-eyebrow{margin:0;font-size:12px;color:#39715a;font-weight:750}
.oa-header-tools{display:grid;justify-items:end;gap:8px;flex:none}.oa-manual{color:#39715a;font-size:12px;text-underline-offset:3px;padding:3px 0}
.oa-manual:hover{color:#194f36}
.oa-grid{display:grid;gap:18px;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:start}
.oa-setup{display:grid;gap:14px;min-width:0}
.oa-card{background:#fff;border:1px solid #dce5db;border-radius:10px;padding:16px;min-width:0}
.oa-heading{display:flex;align-items:center;gap:10px;margin:-3px -16px 12px;padding:0 16px 13px;border-bottom:1px solid #edf0eb}
.oa-heading h2{font-size:15px;line-height:1.3;margin:0}
.oa-kicker,.oa-time{display:inline-flex;font-size:.75rem;align-items:center;justify-content:center;min-height:27px;border-radius:999px;padding:2px 8px;font-weight:750;background:#e6f2ed;color:#215d4e}
.oa-kicker{border-radius:6px;min-width:27px;background:#e8f0e8;color:#233b31}.oa-time{margin-left:auto;font-variant-numeric:tabular-nums;white-space:nowrap}
.oa-time:empty{visibility:hidden}
.oa-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:13px}
.oa-fields label{min-width:0;display:grid;gap:5px;font-size:13px;font-weight:700}
.oa-shell button,.oa-shell select,.oa-shell input{font:inherit}
.oa-shell button,.oa-shell select,.oa-shell input:not([type=checkbox]):not([type=radio]):not([type=range]){color:inherit;border:1px solid #bdcdc1;border-radius:7px;background:#fff;min-height:44px;padding:9px}
.oa-shell button{cursor:pointer;font-weight:680}
.oa-shell button:disabled{cursor:not-allowed;opacity:.57}
.oa-shell :focus-visible{outline:3px solid #14795d;outline-offset:3px}
.oa-shell .oa-fields input,.oa-shell .oa-fields select{width:100%;min-width:0}
.oa-shell input[type=checkbox]{accent-color:#176651;width:1.1rem;height:1.1rem}
.oa-hr{display:flex;align-items:center;gap:6px;font-size:12px}.oa-hr label{white-space:nowrap}.oa-shell .oa-hr button{font-size:12px}
.oa-hr input{width:65px}
.oa-switch{display:flex;align-items:center;gap:7px;margin-top:12px;font-size:.9rem;font-weight:650}
.oa-muted{color:#738075;font-size:12px;margin:.55em 0}
.oa-actions{display:flex;gap:8px}
.oa-shell #oa-start{color:white;background:#356a51;border-color:#356a51;flex:1;min-height:46px}
.oa-shell #oa-start:hover:not(:disabled){background:#145140}
.oa-shell .oa-quiet{background:#f4f8f6}
.oa-flow{position:sticky;top:15px}
.oa-steps{list-style:none;margin:0;padding:0}
.oa-steps li{display:grid;grid-template-columns:31px minmax(0,1fr);gap:11px;position:relative;padding:10px 0 18px}
.oa-steps li:not(:last-child)::after{content:"";width:2px;background:#dae7e2;position:absolute;left:14px;top:41px;bottom:-9px}
.oa-steps h3{margin:0;font-size:.93rem}
.oa-steps p{margin:4px 0 0;color:#4d655e;font-size:.8rem}
.oa-dot{position:relative;z-index:1;display:grid;place-items:center;border:1px solid #c5d7d1;background:#f2f7f5;color:#416557;width:30px;height:30px;border-radius:50%;font-size:.78rem;font-weight:750}
.oa-steps li[data-status=active] .oa-dot{color:#fff;border-color:#006d59;background:#006d59;box-shadow:0 0 0 4px #d9eee6}
.oa-steps li[data-status=done] .oa-dot{color:#175d48;background:#dff2e8;border-color:#9bcab7}
.oa-stage-items{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
.oa-chip{max-width:100%;overflow-wrap:anywhere;background:#e9f4ef;color:#184c3c;border:1px solid #d7eae1;border-radius:5px;font-size:.74rem;padding:2px 6px}
.oa-status{margin:2px 0 0;padding:9px 11px;background:#edf5f0;border-radius:9px;font-size:.85rem}
.oa-status[data-mode=error]{background:#fff0eb;color:#7f2f20}
.oa-results{margin-top:18px}
#oa-result-list{display:grid;gap:9px;margin-top:14px}
.oa-result{background:#f7faf8;border:1px solid #d0e4db;border-radius:10px}
.oa-result summary{cursor:pointer;list-style:none;display:grid;grid-template-columns:2em minmax(0,1fr) auto;gap:9px;align-items:center;padding:12px}
.oa-result summary::-webkit-details-marker{display:none}
.oa-rank{width:2em;height:2em;background:#d9eee5;color:#155940;font-weight:750;border-radius:50%;display:grid;place-items:center}
.oa-result:first-child .oa-rank{background:#e9d49a;color:#4d3a10}
.oa-score{text-align:right;color:#125443;font-variant-numeric:tabular-nums;white-space:nowrap}
.oa-score small{display:block;font-size:.69rem}
.oa-result-body{border-top:1px solid #d0e4db;padding:10px 12px}
.oa-build-list{padding-left:1.3em;margin:4px 0 10px;font-size:.83rem}
.oa-result-body h3{font-size:.9rem;margin:5px 0}
.oa-link{color:#0b6149;font-weight:680}
@media(max-width:740px){.oa-grid{grid-template-columns:minmax(0,1fr)}.oa-flow{position:static}.oa-hero{align-items:flex-start;flex-direction:column}.oa-shell .oa-actions{position:sticky;bottom:0;z-index:2;background:#f5f6f3;padding:7px 0}.oa-result summary{font-size:.87rem}.oa-hr,.oa-fields label{font-size:.88rem}}
@media(prefers-reduced-motion:no-preference){.oa-steps li[data-status=active] .oa-dot{animation:oa-pulse 1.6s ease-in-out infinite}@keyframes oa-pulse{50%{box-shadow:0 0 0 7px #edf8f3}}}

.oa-rate-card .auto-rate-editor{display:grid;gap:9px;margin-top:8px}
.oa-rate-card .auto-rate-editor p{margin:0;font-size:.8rem;color:#4d655e}
.auto-rate-presets{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:center}
.auto-rate-presets :is(select,input){width:100%;min-width:0}
.auto-rate-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
.oa-shell .auto-rate-tabs button{min-width:0;padding:5px 3px;font-size:.78rem;background:#f1f7f4;overflow-wrap:anywhere}
.oa-shell .auto-rate-tabs button[aria-selected=true]{background:#1c6956;color:white;border-color:#1c6956}
.oa-shell .auto-rate-editor input[type=search]{width:100%}
.auto-rate-list{max-height:330px;overflow:auto;scrollbar-gutter:stable;border:1px solid #d9e6df;border-radius:9px}
.auto-rate-row{padding:9px;border-bottom:1px solid #e6eee9;display:grid;gap:4px}
.auto-rate-row:last-child{border-bottom:0}
.auto-rate-row label{display:flex;gap:6px;align-items:center;justify-content:space-between;font-size:.86rem}
.auto-rate-row label span{overflow-wrap:anywhere}
.oa-shell .auto-rate-row input:not([type=range]){width:4.9em;min-width:4.1em;min-height:35px}
.auto-rate-row details{font-size:.76rem;color:#4d655e}
.auto-rate-row summary{cursor:pointer}
.auto-rate-priority{display:inline-block;color:#59420c;background:#f5e9b7;border-radius:4px;padding:0 4px;margin-right:4px;font-size:.69rem}
.oa-result[open] summary{background:#edf6f1;border-radius:9px 9px 0 0}
.oa-result summary::after{content:"⌄";grid-column:2;grid-row:1;justify-self:end;margin-right:.35em;color:#537568;pointer-events:none}
.oa-result[open] summary::after{content:"⌃"}
.oa-result summary>div:nth-child(2){padding-right:1.5em}
.oa-result summary>div:nth-child(3){grid-column:3;grid-row:1}
.oa-result-body h3{margin-top:9px}
@media(max-width:480px){.auto-rate-list{max-height:274px}.oa-shell .auto-rate-tabs button{font-size:.7rem}.oa-shell .auto-rate-row input:not([type=range]){font-size:.85rem}.auto-rate-row{padding:6px}}

.oa-result summary>.oa-rank{grid-column:1;grid-row:1}
.oa-result summary>div:nth-child(2){grid-column:2;grid-row:1;min-width:0;overflow-wrap:anywhere}
.oa-result-jump{display:inline-block;margin-top:8px;font-size:.85rem}

.auto-rate-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}
.auto-rate-preference label{justify-content:flex-start}
.auto-rate-preference input[type=checkbox]{flex:none}
@media(max-width:420px){.auto-rate-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}}

.auto-rate-preference{padding:6px 9px;border-bottom:1px solid #e6eee9}
.auto-rate-preference:last-child{border-bottom:0}
.auto-rate-preference label{display:flex;align-items:center;gap:8px;font-size:.86rem;min-height:31px;cursor:pointer}
.auto-rate-preference label small{margin-left:auto;color:#547165;white-space:nowrap}
.oa-step-route{display:inline-block;margin-left:6px;color:#326452;font-size:.74rem}
.oa-steps li:not([data-status=active]) .oa-step-route{display:none}
.oa-steps .oa-stage-items:empty{display:none}

.oa-fields.oa-meat-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:end;gap:clamp(6px,2vw,12px)}
.oa-meat-fields .oa-switch{display:flex;align-items:center;gap:5px;margin:0;min-height:44px;max-width:9rem;padding-inline:2px}
.oa-shell .oa-meat-fields .oa-switch input{width:16px;height:16px;margin:0;flex:none}
.oa-fields.oa-result-limit{display:flex;margin-top:10px}
.oa-result-limit label{display:flex;align-items:center;gap:8px}
.oa-shell .oa-result-limit select{width:auto;min-width:57px}

@media(max-width:740px){.oa-header-tools{justify-items:start}.oa-hero h1{font-size:21px}.oa-page .oa-shell{padding:14px 12px}.oa-card{padding:12px}.oa-heading{margin:-1px -12px 12px;padding:0 12px 11px}}
