.brand-workspace-detail:has(.guided-brand-profile){box-sizing:border-box;width:min(720px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;background:var(--fk-color-surface-elevated);color:var(--fk-color-text-primary)}
.guided-brand-profile{display:grid;gap:16px;min-width:0;overflow-wrap:anywhere}
.guided-brand-profile h3,.guided-brand-profile h4,.guided-brand-profile p{margin:0 0 8px}
.guided-brand-profile .profile-header{display:flex;align-items:center;gap:16px;min-width:0}
.guided-brand-profile .profile-header>div:last-child{min-width:0}
.profile-logo{display:grid;place-items:center;width:64px;height:64px;flex:0 0 64px;overflow:hidden;border:1px solid var(--fk-color-border-default);border-radius:12px;background:var(--fk-color-surface-input)}
.profile-logo img{max-width:100%;max-height:100%;object-fit:contain}
.guided-brand-profile nav,.profile-actions{display:flex;flex-wrap:wrap;gap:8px}
.guided-brand-profile button{font:inherit;min-height:44px;max-width:100%;padding:10px 14px;white-space:normal;overflow-wrap:anywhere;border:1px solid var(--fk-color-border-default);border-radius:8px;color:inherit;background:var(--fk-color-surface-input)}
.guided-brand-profile button.fk-btn{min-height:44px}
.guided-brand-profile button[aria-current=step]{border-color:var(--fk-color-focus-ring);box-shadow:inset 0 0 0 1px var(--fk-color-focus-ring);font-weight:700}
.guided-brand-profile button:hover:not(:disabled){border-color:var(--fk-color-focus-ring)}
.guided-brand-profile button.fk-btn-primary{background:var(--fk-color-primary-action);border-color:var(--fk-color-primary-action);color:var(--fk-color-button-primary-text,#fff)}
.brand-workspace-detail.profile-guided-mode #brand-workspace-detail-close{min-height:44px;min-width:44px}
.brand-workspace-detail.profile-guided-mode #brand-workspace-detail-close:focus-visible{outline:3px solid var(--fk-color-focus-ring);outline-offset:3px}
.guided-brand-profile button:disabled{opacity:.65;cursor:not-allowed}
.guided-brand-profile :focus-visible{outline:3px solid var(--fk-color-focus-ring);outline-offset:3px}
.profile-section{display:grid;gap:12px;min-width:0}
.guided-brand-profile label{display:grid;gap:6px;min-width:0}
.guided-brand-profile input,.guided-brand-profile textarea{box-sizing:border-box;width:100%;min-width:0;min-height:44px;font:inherit;color:inherit;background:var(--fk-color-surface-input);border:1px solid var(--fk-color-border-default);border-radius:8px;padding:10px}
.guided-brand-profile textarea{resize:vertical}
.profile-logo-candidate{width:96px;height:96px;object-fit:contain;border:1px solid var(--fk-color-border-default);border-radius:8px}
.profile-persona,.profile-proposal{display:grid;gap:10px;border:1px solid var(--fk-color-border-default);border-radius:10px;padding:12px;min-width:0}
.profile-proposal p{white-space:pre-wrap}
.guided-brand-profile [role=status]{min-height:1.5em}
.brand-workspace-detail.profile-guided-mode>.brand-workspace-detail-actions,.brand-workspace-detail.profile-guided-mode>#brand-workspace-edit-form{display:none!important}
.brand-workspace-detail.profile-guided-mode>[data-project-setup]{display:none}
.project-brand-card:hover:not(:disabled){border-color:var(--fk-color-focus-ring)}
.project-brand-selection{font-size:.8rem}
@media(max-width:1024px){.guided-brand-profile nav button{flex:1 1 30%}}
@media(max-width:768px){.guided-brand-profile nav button{flex-basis:40%}}
@media(max-width:480px){.brand-workspace-detail:has(.guided-brand-profile){width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:16px}.profile-actions button{flex:1 1 100%}}
@media(max-width:375px){.guided-brand-profile nav button{flex-basis:100%}.guided-brand-profile .profile-header{gap:10px}}
@media(max-width:320px){.brand-workspace-detail:has(.guided-brand-profile){padding:12px}.profile-logo{width:48px;height:48px;flex-basis:48px}}
@media(forced-colors:active){.guided-brand-profile button,.guided-brand-profile input,.guided-brand-profile textarea,.profile-proposal,.profile-persona{border:1px solid CanvasText}.guided-brand-profile button[aria-current=step],.guided-brand-profile :focus-visible{outline:3px solid Highlight}}
/* Regular navigation reuses the same controller and dialog as an in-flow view. */
.brand-workspace-detail.profile-page-mode[open]{position:relative;inset:auto;box-sizing:border-box;display:block;flex:1 1 auto;width:100%;max-width:960px;max-height:none;margin:0 auto;padding:24px;box-shadow:none}
.brand-workspace-detail.profile-page-mode:not([open]){display:none}
.brand-workspace-detail.profile-page-mode .brand-workspace-detail-content{overflow:visible}
@media(max-width:480px){.brand-workspace-detail.profile-page-mode[open]{padding:12px}}
/* BW-36.13R5: internal leave decisions preserve the profile until confirmation. */
.brand-leave-dialog{box-sizing:border-box;width:min(460px,calc(100vw - 24px));max-height:calc(100dvh - 24px);margin:auto;padding:var(--fk-space-5,24px);overflow:auto;border:1px solid var(--fk-color-border);border-radius:var(--fk-radius-md);background:var(--fk-color-surface-elevated);color:var(--fk-color-text);box-shadow:var(--fk-shadow-md);font:inherit}
.brand-leave-dialog::backdrop{background:rgb(0 0 0 / .45)}
.brand-leave-dialog h2{margin:0 0 16px;color:var(--fk-color-heading);font-size:1.125rem}
.brand-leave-actions{display:flex;flex-wrap:wrap;gap:8px}.brand-leave-actions button{min-width:44px;min-height:44px;white-space:normal}.brand-leave-discard{color:var(--fk-color-danger,#b42318)}
.brand-leave-dialog :focus-visible{outline:2px solid var(--fk-color-primary);outline-offset:3px}
@media(max-width:480px){.brand-leave-actions{display:grid;grid-template-columns:1fr}.brand-leave-dialog{padding:16px}}
@media(forced-colors:active){.brand-leave-dialog,.brand-leave-actions button{border:1px solid CanvasText}.brand-leave-dialog :focus-visible{outline-color:Highlight}.brand-leave-discard{color:LinkText}}
@media(prefers-reduced-motion:reduce){.brand-leave-dialog,.brand-leave-dialog *{animation:none!important;transition:none!important}}

.profile-brand-avatar{width:min(320px,100%);height:auto;aspect-ratio:1;object-fit:contain;border-radius:16px;border:1px solid var(--fk-color-border-default)}
.guided-brand-profile .brand-dna-score-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));gap:12px}

/* Saved readiness and selection use separate visual cues. */
.guided-brand-profile nav button[data-readiness=complete]{border-color:#23854b;background:color-mix(in srgb,#23854b 13%,var(--fk-color-surface-input))}
.guided-brand-profile nav button[data-readiness=partial]{border-color:#b8860b;background:color-mix(in srgb,#b8860b 13%,var(--fk-color-surface-input))}
.guided-brand-profile nav button[data-readiness=empty]{border-color:#cb4848;background:color-mix(in srgb,#cb4848 13%,var(--fk-color-surface-input))}
.guided-brand-profile nav button[data-status-icon]::after{content:attr(data-status-icon);margin-inline-start:8px}
.guided-brand-profile nav button[aria-current=step]{outline:2px solid var(--fk-color-focus-ring);outline-offset:2px;text-decoration:underline;text-underline-offset:4px}
.profile-identity-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));gap:16px;min-width:0}
.profile-identity-cards>section{display:grid;align-content:start;justify-items:start;gap:12px;padding:16px;border:1px solid var(--fk-color-border-default);border-radius:12px;min-width:0}
.profile-official-logo,.profile-overview-avatar{width:96px;height:96px;object-fit:contain}
@media(forced-colors:active){.guided-brand-profile nav button[data-readiness]{border-color:CanvasText;background:Canvas;color:CanvasText}.guided-brand-profile nav button[aria-current=step]{outline-color:Highlight}.profile-identity-cards>section{border-color:CanvasText}}

.profile-official-logo{display:grid;place-items:center;overflow:hidden;border:1px solid var(--fk-color-border-default);border-radius:12px;background:var(--fk-color-surface-input)}
.profile-official-logo img{max-width:100%;max-height:100%;object-fit:contain}

/* BW-36.13R6: blocked deletion remains prominent in both themes and narrow dialogs. */
.brand-delete-dialog{box-sizing:border-box;max-height:calc(100dvh - 24px);overflow:auto;overflow-wrap:anywhere}
.brand-delete-dialog [hidden]{display:none!important}
.brand-delete-blocked,.profile-proposal-error{padding:12px;border:2px solid var(--fk-color-danger,#b42318);border-radius:8px;color:var(--fk-color-text-primary);background:color-mix(in srgb,var(--fk-color-danger,#b42318) 12%,var(--fk-color-surface-elevated));font-weight:600}
.brand-delete-dialog .brand-delete-actions button{min-height:44px;white-space:normal;max-width:100%}
.brand-delete-dialog :focus-visible{outline:3px solid var(--fk-color-focus-ring);outline-offset:3px}
@media(max-width:480px){.brand-delete-dialog{padding:16px}.brand-delete-actions{display:grid;grid-template-columns:1fr}}
@media(forced-colors:active){.brand-delete-blocked,.profile-proposal-error{border-color:CanvasText;background:Canvas;color:CanvasText}}
.ai-brand-proposal { box-sizing: border-box; width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; overflow-wrap: anywhere; }
.ai-brand-proposal textarea { box-sizing: border-box; width: 100%; min-height: 120px; resize: vertical; color: inherit; background: var(--fk-color-surface-input); border: 1px solid var(--fk-color-border-default); border-radius: 8px; padding: 10px; font: inherit; }
.ai-brand-proposal p { white-space: pre-wrap; }
.ai-brand-proposal button { min-height: 44px; white-space: normal; }
.ai-brand-proposal :focus-visible { outline: 2px solid var(--fk-color-focus-ring); outline-offset: 2px; }
