/* Porkbelly Agencies 2.8.2: scoped matching and referral UI, no global theme overrides. */
.pbcore-agency-match-panel{display:grid;gap:24px;max-width:1200px;margin:40px auto 28px;padding:clamp(22px,4vw,38px);border:1px solid #f1d6e1;border-radius:24px;background:linear-gradient(125deg,#fff4f8,#fff 58%,#faf0f4);box-shadow:0 18px 38px rgba(56,17,37,.055)}
.pbcore-agency-match-panel h2{font-size:clamp(26px,3vw,42px);line-height:1.15;margin:10px 0 12px}
.pbcore-agency-match-panel p{max-width:820px;color:#685d68;line-height:1.65}
.pbcore-agency-matching-form{display:grid;gap:18px;width:100%;min-width:0;max-width:100%}
.pbcore-agency-matching-form .pbcore-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.pbcore-agency-matching-form .pbcore-field{display:grid;gap:7px;min-width:0;max-width:100%}
.pbcore-agency-matching-form :is(input,select,textarea){width:100%;max-width:100%;min-width:0;box-sizing:border-box}
.pbcore-agency-brief-consent{display:flex;align-items:flex-start;gap:12px;line-height:1.55}
.pbcore-agency-brief-consent input{flex:0 0 auto;width:auto!important;margin-top:5px}
.pbcore-agency-matching-work,.pbcore-agency-staff-routing{margin:30px 0;padding:clamp(16px,3vw,28px);border:1px solid #eed8e2;border-radius:20px;background:#fff}
.pbcore-agency-matching-work .pbcore-agency-brief-card,.pbcore-agency-staff-routing .pbcore-agency-brief-card{max-width:none;overflow-wrap:break-word;margin:16px 0}
.pbcore-agency-route-action{border:1px solid #edd7df;border-radius:12px;background:#fff9fb;padding:15px;margin:10px 0}
.pbcore-agency-route-action p{margin:6px 0 12px;color:#6a6070}
@media(max-width:720px){.pbcore-agency-match-panel{margin:22px 0;padding:20px 16px;border-radius:16px}.pbcore-agency-matching-form .pbcore-form-grid{grid-template-columns:minmax(0,1fr)}.pbcore-agency-match-panel .pbcore-button,.pbcore-agency-staff-routing .pbcore-button{max-width:100%;white-space:normal;text-align:center}.pbcore-agency-matching-work,.pbcore-agency-staff-routing{padding:16px 12px}}

/* Stage 5: eligible organisations and optional Enterprise team seats */
.pbcore-admission{width:100%;max-width:100%;margin-top:30px}
.pbcore-admission .pbcore-collab-agency{border:1px solid #ebd8df;border-radius:20px;padding:clamp(17px,3vw,28px);background:linear-gradient(140deg,#fff,#fff9fb);margin:18px 0;min-width:0}
.pbcore-admission .pbcore-collab-agency > details{border:1px solid #ecd7e0;border-radius:14px;margin:18px 0;padding:12px 16px}
.pbcore-admission summary{font-weight:750;color:#a51d4c;cursor:pointer;line-height:1.5}
.pbcore-admission form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px;margin-top:18px;min-width:0}
.pbcore-admission label{display:flex;flex-direction:column;gap:8px;font-size:14px;font-weight:650;min-width:0}
.pbcore-admission label:has(textarea),.pbcore-admission label:has([type=checkbox]),.pbcore-admission form > p{grid-column:1/-1}
.pbcore-admission label:has([type=checkbox]){flex-direction:row;align-items:flex-start}
.pbcore-admission :is(input:not([type=checkbox]),select,textarea){width:100%;max-width:100%;min-width:0;border:1px solid #e0ccd4;border-radius:12px;padding:12px 13px;font:inherit;background:#fff;color:#222}
.pbcore-admission textarea{min-height:105px;resize:vertical}
.pbcore-admission .pbcore-button{width:fit-content;min-width:0;justify-self:start}
.pbcore-admission form[style*="inline-block"]{display:inline-block!important;margin:4px 10px 4px 0!important}
.pbcore-admission .pbcore-collab-staff-note{padding:12px 15px;border-radius:12px;background:#fff5f8;border:1px solid #eedce4;margin:12px 0;overflow-wrap:anywhere}
@media(max-width:640px){.pbcore-admission form{grid-template-columns:minmax(0,1fr)}.pbcore-admission .pbcore-button{width:100%;justify-self:stretch}.pbcore-admission .pbcore-collab-agency>details{padding:12px}.pbcore-admission form[style*="inline-block"]{width:100%;display:block!important}}

/* Stage 6: evidence-based Enterprise Lead Allocation, scoped to agency work only */
.pbcore-allocation{box-sizing:border-box;margin:32px 0;padding:clamp(16px,3vw,30px);border:1px solid #eed5df;border-radius:23px;background:linear-gradient(140deg,#fffafc,#fff);width:100%;max-width:100%;min-width:0}
.pbcore-allocation *{box-sizing:border-box}
.pbcore-allocation-intro h2{font-size:clamp(25px,3vw,39px);line-height:1.15;margin:8px 0}
.pbcore-allocation-intro p{max-width:760px;color:#695c68;line-height:1.65}
.pbcore-allocation-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:22px 0}
.pbcore-allocation-metrics>div{display:flex;flex-direction:column;gap:4px;padding:18px;border:1px solid #eedce3;border-radius:15px;background:#fff}
.pbcore-allocation-metrics strong{font-size:clamp(24px,3vw,38px);line-height:1.1;color:#9a1a50}
.pbcore-allocation-metrics span{font-size:13px;color:#675b67}
.pbcore-allocation-card{max-width:100%;min-width:0;background:#fff;border:1px solid #eedbe2;border-radius:18px;padding:clamp(17px,2.6vw,25px);margin:18px 0;overflow-wrap:anywhere}
.pbcore-allocation-card h3{font-size:clamp(21px,2.2vw,28px);margin:8px 0}
.pbcore-allocation-card p{line-height:1.6;overflow-wrap:break-word}
.pbcore-allocation-card details{border-top:1px solid #f0e1e7;margin:18px 0 0;padding-top:13px}
.pbcore-allocation-card summary{color:#9d194c;cursor:pointer;font-weight:700}
.pbcore-allocation :is(form,.pbcore-allocation-compact){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:15px 0}
.pbcore-allocation form label{display:flex;flex-direction:column;gap:6px;min-width:0;font-weight:650;font-size:14px}
.pbcore-allocation form :is(input,select,textarea){display:block;min-width:0;max-width:100%;width:100%;padding:12px;border:1px solid #e5cfda;border-radius:12px;background:#fff;color:#24202b;font:inherit}
.pbcore-allocation form label:has(textarea),.pbcore-allocation form button{grid-column:1/-1}
.pbcore-allocation form button{justify-self:start}
.pbcore-allocation-brief{padding:16px 20px;background:#fff6fa;border:1px solid #efdbe3;border-radius:14px}
.pbcore-allocation-deadline{color:#a0164d}
@media(max-width:800px){.pbcore-allocation-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.pbcore-allocation{padding:18px 14px;border-radius:16px}.pbcore-allocation-metrics{gap:9px}.pbcore-allocation-metrics>div{padding:13px}.pbcore-allocation :is(form,.pbcore-allocation-compact){grid-template-columns:minmax(0,1fr)}.pbcore-allocation form button{width:100%;justify-self:stretch;white-space:normal}}

.pbcore-allocation-table-wrap{width:100%;max-width:100%;overflow-x:auto;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.pbcore-allocation-table-wrap table{width:100%;border-collapse:collapse;min-width:690px;font-size:14px}
.pbcore-allocation-table-wrap :is(th,td){padding:12px 14px;text-align:left;border-bottom:1px solid #ecdce3;vertical-align:top}
.pbcore-allocation-table-wrap th{font-weight:750;color:#45152c}
.pbcore-allocation-performance{border-top:1px solid #ecdce3;margin-top:24px;padding-top:22px}
