/* Business body: one workspace, quiet summaries and a single explicit save. */
.business-body{--body-ink:var(--text-primary);--body-muted:var(--text-tertiary);--body-border:var(--border-default);--body-soft:var(--surface-subtle);--body-accent:var(--text-primary);width:100%;max-width:1100px;margin:0 auto;color:var(--body-ink)}
.business-body [hidden]{display:none!important}
.body-layout{display:block;min-width:0}
.body-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.business-body .body-page-heading{position:sticky;top:0;z-index:4;display:flex;justify-content:space-between;align-items:center;gap:20px;padding:6px 0 20px;margin:0;background:var(--surface-canvas,#fff)}
.body-heading-copy{min-width:0}
.business-body .body-page-heading h1{margin:0 0 5px;font-size:23px;font-weight:600;letter-spacing:-.025em;line-height:1.4}
.body-heading-caption{display:flex;align-items:center;gap:12px;min-width:0;font-size:13px;line-height:1.6;color:var(--text-secondary)}
.body-heading-caption>span:first-child{max-width:380px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.body-saved-tag{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;font-size:12px;font-weight:400;color:var(--body-muted);white-space:nowrap}
.body-saved-tag::before{content:'';width:4px;height:4px;border-radius:50%;background:currentColor;opacity:.7}
.body-saved-tag.is-dirty{color:var(--text-secondary)}
.body-saved-tag.is-dirty::before{background:var(--body-accent);opacity:1}
.body-heading-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.portal-page .business-body .portal-button{min-height:36px;padding:7px 12px;border-radius:8px;font-size:13px;line-height:20px;font-weight:500;transition:background .16s,border-color .16s,color .16s}
/* Shared controls render from these tokens; page intent must win over their role defaults. */
.portal-page #view-company .body-start{--control-fill:transparent;--control-ink:var(--text-secondary);--control-stroke:transparent;--control-hover:var(--surface-hover);--control-pressed:#eaeaec;gap:7px;box-shadow:none}
.portal-page .business-body .body-start:hover{background:var(--surface-hover);color:var(--text-primary)}
.portal-page #view-company .body-action-save{--control-fill:var(--text-primary);--control-ink:#fff;--control-stroke:var(--text-primary);--control-hover:#35383d;--control-pressed:#18181b;min-width:110px;gap:7px;box-shadow:none}
.body-action-save svg{width:16px;height:16px}
.portal-page .business-body .body-action-save:hover:not(:disabled){background:#35383d;border-color:#35383d;transform:none;box-shadow:none}
.portal-page #view-company .body-action-save:disabled{--control-fill:var(--surface-hover);--control-ink:var(--text-tertiary);--control-stroke:transparent;opacity:1;box-shadow:none;cursor:default}
.portal-page .business-body .body-action-save[aria-busy="true"] svg{display:none}
.business-body .body-context-bar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin:0 0 26px;padding:0;border:0}
.business-body .body-context-entry{display:flex;align-items:center;gap:12px;min-width:0;min-height:76px;text-align:left;padding:18px 20px;border:1px solid var(--border-default);border-radius:var(--radius-panel);background:#fff;color:var(--text-primary);font:inherit;transition:background .16s,border-color .16s}
.business-body .body-context-entry:hover{background:var(--surface-subtle);border-color:var(--border-strong)}
.body-context-icon{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border-radius:8px;background:var(--surface-subtle);color:var(--text-secondary)}
.body-context-icon svg{width:19px;height:19px}
.body-context-entry>span:nth-child(2){min-width:0;flex:1}
.body-context-entry strong{display:block;font-size:14px;font-weight:600;line-height:1.5;color:var(--text-primary)}
.body-context-entry small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:12px;color:var(--body-muted);margin-top:3px;line-height:1.6}
.body-context-arrow{font-size:22px;font-weight:300;color:var(--text-tertiary);transition:transform .16s}
.body-context-entry:hover .body-context-arrow{transform:translateX(2px)}
.portal-page .business-body .portal-dialog.body-detail-panel{position:fixed;inset:0 0 0 auto;margin:0;padding:0;width:min(560px,calc(100% - 24px));max-width:none;height:100dvh;max-height:100dvh;border:0;border-left:1px solid var(--border-subtle);border-radius:14px 0 0 14px;background:#fff;box-shadow:-14px 0 50px #20202010;overflow:hidden;animation:body-panel-arrive .2s ease-out}
.portal-page .business-body .body-detail-panel[open]{display:flex;flex-direction:column}
.portal-page .business-body .body-detail-panel::backdrop{background:#10131824;backdrop-filter:blur(2px)}
.body-panel-heading{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:18px 24px;border-bottom:1px solid var(--border-subtle);flex-shrink:0}
.body-panel-heading h2{font-size:19px;font-weight:550;letter-spacing:-.025em;line-height:1.5;margin:0}
.portal-page .business-body .body-panel-close{display:grid;place-items:center;width:36px;height:36px;padding:0;border-radius:8px;border:0;background:transparent;color:var(--text-tertiary);font-size:26px;font-weight:300;line-height:1;flex-shrink:0}
.portal-page .business-body .body-panel-close:hover{background:var(--surface-hover);color:var(--text-primary)}
.body-panel-content{padding:22px 24px 26px;overflow-y:auto;overscroll-behavior:contain;min-height:0;flex:1;scrollbar-width:thin;scrollbar-color:var(--border-strong) transparent}
.body-panel-footer{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:17px 28px;border-top:1px solid var(--border-subtle);background:#fff;flex-shrink:0;padding-bottom:max(17px,env(safe-area-inset-bottom))}
.body-panel-footer p{font-size:12px;color:var(--text-tertiary);line-height:1.7;margin:0}
.portal-page #view-company .body-panel-done{--control-fill:var(--text-primary);--control-stroke:var(--text-primary);--control-ink:#fff;--control-hover:#35383d;white-space:nowrap;flex-shrink:0}
.portal-page .business-body .body-panel-done:hover{background:#35383d}
.body-section+.body-section{border-top:1px solid var(--border-subtle);padding-top:26px;margin-top:28px}
.body-section h3{font-size:14px;font-weight:550;line-height:1.6;margin:0 0 22px;color:var(--text-primary)}
.body-section .portal-field{margin-bottom:23px}
.body-section .portal-field:last-child{margin-bottom:0}
.business-body .portal-label{display:block;margin:0 0 8px;font-size:13px;color:var(--text-secondary);font-weight:500}
.business-body .portal-label>span{font-size:12px;margin-left:5px;color:var(--text-tertiary);font-weight:400}
.portal-page .business-body :is(input.portal-input,textarea.portal-textarea){width:100%;min-width:0;border:1px solid var(--border-default);border-radius:8px;background:#fafbfc;font-size:14px;line-height:1.65;padding:9px 11px;transition:border-color .15s,background .15s}
.portal-page .business-body :is(input.portal-input,textarea.portal-textarea):is(:focus,:focus-visible){outline:none;box-shadow:none;background:#fff;border-color:var(--field-focus-border,#c4cfda)}
.portal-page .business-body :is(input.portal-input,textarea.portal-textarea)::placeholder{color:#8a9099;font-size:13px;line-height:1.8}
.business-body textarea{resize:vertical;scroll-margin-block:20px}
.body-field-note{display:block;margin:8px 0 0;font-size:12px;line-height:1.7;color:var(--text-tertiary)}
.body-choice-grid,.body-market-shortcuts,.body-market-tags{display:flex;flex-wrap:wrap;gap:8px}
.body-choice{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:36px;padding:7px 12px;border:1px solid var(--border-default);border-radius:8px;background:#fff;color:var(--text-secondary);font:inherit;font-size:13px;line-height:1.6;transition:background .15s,border-color .15s}
.body-choice:hover:not(:disabled){background:var(--surface-subtle);border-color:var(--border-strong)}
.body-choice[aria-pressed="true"]{background:var(--surface-hover);border-color:#bac0c8;color:var(--text-primary)}
.body-choice[aria-pressed="true"]::before{content:'✓';font-size:12px;flex-shrink:0}
.body-choice:disabled{opacity:.5;cursor:default}
.body-materials,.body-more-buyers{margin-top:15px;font-size:13px;color:var(--text-secondary)}
.body-materials>summary,.body-more-buyers>summary{padding:7px 0;cursor:pointer}
.body-more-buyers .body-choice-grid{margin-top:12px}
.business-body .company-file-zone{margin-top:12px;padding:15px;border:1px dashed var(--border-default);border-radius:9px;background:var(--surface-subtle)}
.business-body .company-file-zone p{font-size:12px;line-height:1.7}
.business-body .company-file-zone label[aria-disabled="true"]{color:var(--text-tertiary);background:var(--surface-hover);cursor:default}
.body-country-search{display:block;position:relative;width:100%;height:auto;padding:0;margin:22px 0 12px;border:0;border-radius:0}
.body-country-search:focus-within{border:0;box-shadow:none}
.body-country-search .country-search-results{top:100%;margin-top:6px;max-height:min(240px,35dvh)}
.body-market-tags{margin-top:15px}
.body-market-tag{display:inline-flex;align-items:center;gap:7px;padding:4px 5px 4px 10px;border:1px solid var(--border-default);border-radius:7px;background:#fff;color:var(--text-secondary);font-size:13px}
.body-market-tag button{display:grid;place-items:center;width:26px;height:26px;padding:0;border:0;border-radius:4px;background:transparent;font-size:18px;line-height:1;color:var(--text-tertiary)}
.body-market-tag button:hover{background:var(--surface-hover);color:var(--text-primary)}
.body-market-empty{font-size:13px;color:var(--text-tertiary);margin:0}
.body-load-error{padding:16px 18px;border:1px solid #e4c7bf;border-radius:10px;background:#fff;color:#834b3d;font-size:14px;line-height:1.8;margin-bottom:20px}
.body-load-error p{margin:0 0 10px}
.body-load-error summary{cursor:pointer}
.body-load-error dd{margin:5px 0 13px;overflow-wrap:anywhere}
.body-load-error dt{font-weight:550}
.body-conflict-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:14px}
@keyframes body-panel-arrive{from{opacity:.7;transform:translateX(18px)}to{opacity:1;transform:none}}
@media(max-width:700px){
 .business-body .body-page-heading{padding:4px 0 16px;gap:14px;flex-wrap:wrap}
 .business-body .body-page-heading h1{font-size:22px;margin-bottom:4px}
 .body-heading-caption>span:first-child{max-width:220px}
 .body-heading-actions{width:100%;justify-content:space-between}
 .portal-page #view-company .body-action-save{min-width:110px}
 .business-body .body-context-bar{grid-template-columns:1fr;gap:8px;margin-bottom:22px}
 .business-body .body-context-entry{padding:11px 12px;min-height:68px;gap:12px}
 .body-context-entry small{white-space:nowrap}
 .portal-page .business-body :is(input.portal-input,textarea.portal-textarea){font-size:16px}
 .body-choice{min-height:40px}
}
@media(max-width:500px){
 .portal-page .business-body .portal-dialog.body-detail-panel{width:100%;border-left:0;border-radius:0}
 .body-panel-heading{padding:19px 20px}
 .body-panel-content{padding:23px 20px 28px}
 .body-panel-footer{padding:15px 20px;padding-bottom:max(15px,env(safe-area-inset-bottom))}
 .body-panel-footer p{max-width:160px}
 .body-panel-heading h2{font-size:20px}
}
@media(prefers-reduced-motion:reduce){.portal-page .business-body .portal-dialog.body-detail-panel{animation:none}body.portal-page #view-company *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
@media(forced-colors:active){
 .body-saved-tag::before{background:CanvasText}
 .body-choice[aria-pressed="true"]{border-color:Highlight}
 .portal-page .business-body .body-action-save{border:1px solid ButtonText}
 .portal-page .business-body :is(input.portal-input,textarea.portal-textarea):is(:focus,:focus-visible){outline:2px solid Highlight!important;outline-offset:2px}
}
